Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计通过

exa-performance-tuningex 性能调优

Agent Skill

exa-performance-tuning 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

593

周安装

24

GitHub Stars

2,066

下载量

186
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:exa-performance-tuning(ex 性能调优)
来源仓库:https://github.com/jeremylongshore/claude-code-plugins-plus-skills
仓库路径:skills/exa-performance-tuning
安装命令:
npx skills add https://github.com/jeremylongshore/claude-code-plugins-plus-skills --skill exa-performance-tuning
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jeremylongshore/claude-code-plugins-plus-skills --skill exa-performance-tuning

简介

exa-performance-tuning 优化 Exa 搜索响应时间与吞吐量,适配 RAG 管道性能要求。

  • 根据延迟预算选择 keyword/neural/auto 搜索模式,平衡速度与相关性。
  • 引入缓存层减少重复查询开销,利用 LRU 策略保持热点数据可用。
  • 支持批量查询合并与异步处理,提升高并发场景下的系统吞吐能力。
  • 建议先在小流量环境验证调优效果,再逐步扩大应用范围。

SKILL.md

Exa Performance Tuning

Overview

Optimize Exa AI search API response times and throughput for production RAG pipelines and search integrations. Exa search latency varies by type: keyword search (200-500ms), neural search (500-2000ms), and auto mode (300-1500ms).

Prerequisites

  • Exa API integration (exa-js SDK or REST API)
  • Cache infrastructure (Redis or in-memory LRU)
  • Understanding of search patterns in your application

Instructions

Step 1: Choose Search Type by Latency Requirement

import Exa from 'exa-js';

// Match search type to latency budget
function optimizedSearch(exa: Exa, query: string, latencyBudgetMs: number) {
  if (latencyBudgetMs < 500) {  # HTTP 500 Internal Server Error
    // Fast path: keyword search for structured/exact queries
    return exa.search(query, { type: 'keyword', numResults: 3 });
  } else if (latencyBudgetMs < 1500) {  # 1500 = configured value
    // Balanced: auto mode picks best approach
    return exa.search(query, { type: 'auto', numResults: 5 });
  } else {
    // Quality: neural search for semantic understanding
    return exa.search(query, { type: 'neural', numResults: 10 });
  }
}

Step 2: Cache Search Results

import { LRUCache } from 'lru-cache';

const searchCache = new LRUCache<string, any>({
  max: 10000,  # 10000: 10 seconds in ms
  ttl: 2 * 3600_000, // 2-hour TTL for most searches
});

async function cachedSearch(exa: Exa, query: string, options: any) {
  const key = `${query}:${options.type}:${options.numResults}`;
  const cached = searchCache.get(key);
  if (cached) return cached; // Cache hit: 0ms vs 500-2000ms  # HTTP 500 Internal Server Error

  const results = await exa.search(query, options);
  searchCache.set(key, results);
  return results;
}

Step 3: Minimize Result Count

// Each additional result adds latency (content retrieval)
const RESULT_CONFIGS: Record<string, number> = {
  'rag-context':     3,   // Only need top 3 for RAG
  'autocomplete':    5,   // Quick suggestions
  'deep-research':  10,   // Comprehensive coverage
};

// Don't default to numResults: 10 when 3 suffices
// Reducing from 10 to 3 results saves ~200-500ms per search  # HTTP 200 OK

Step 4: Parallelize Independent Searches

// When RAG needs multiple search contexts, run them in parallel
async function parallelContextSearch(exa: Exa, queries: string[]) {
  const searches = queries.map(q =>
    cachedSearch(exa, q, { type: 'auto', numResults: 3 })
  );
  return Promise.all(searches);
  // 3 parallel searches: ~600ms total
  // 3 sequential searches: ~1800ms total
}

Step 5: Use Content Retrieval Selectively

// The /get-contents endpoint is separate from search
// Only fetch full content for results you'll actually use
async function searchThenFetch(exa: Exa, query: string) {
  // Step 1: Fast search for URLs only
  const results = await exa.search(query, { type: 'auto', numResults: 5 });

  // Step 2: Only fetch content for top 2 results
  const topUrls = results.results.slice(0, 2).map(r => r.url);
  const contents = await exa.getContents(topUrls, { text: { maxCharacters: 2000 } });  # 2000: 2 seconds in ms

  return contents;
}
// Saves content retrieval time for 3 results you won't use

Error Handling

IssueCauseSolution
Search taking 3s+Neural search on complex querySwitch to keyword or auto mode
Timeout on content retrievalLarge pages, slow source serversSet maxCharacters limit on content
Cache miss rate highUnique queries every timeNormalize queries before caching
Rate limit (429)Too many concurrent searchesAdd request queue with concurrency limit

Examples

Basic usage: Apply exa performance tuning to a standard project setup with default configuration options.

Advanced scenario: Customize exa performance tuning for production environments with multiple constraints and team-specific requirements.

Output

  • Configuration files or code changes applied to the project
  • Validation report confirming correct implementation
  • Summary of changes made and their rationale

Resources

  • Official ORM documentation
  • Community best practices and patterns
  • Related skills in this plugin pack

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.09%
按下载量换算67

Claude

29.89%
按下载量换算56

Cursor

18.33%
按下载量换算34

Gemini CLI

9.62%
按下载量换算18

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills