[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FACKH8GJMVYQRFBKFSCCAT":3,"skill-same:01M6FACKH8GJMVYQRFBKFSCCAT":85},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":28,"publishedAt":49,"linkOnly":50,"markdownContent":51,"markdownBody":52,"frontMatter":53,"refName":62,"commitSha":63,"skillDirectory":64,"forksCount":65,"repositoryHtmlUrl":66,"repositoryHomepageUrl":67,"ownerHtmlUrl":68,"ownerBlogUrl":6,"ownerDescription":69,"updatedAt":70,"install":71,"resources":84},"01M6FACKH8GJMVYQRFBKFSCCAT","exa-performance-tuning",null,"Optimize Exa API performance with search type selection, caching, and parallelization.\nUse when experiencing slow responses, implementing caching strategies,\nor optimizing request throughput for Exa integrations.\nTrigger with phrases like \"exa performance\", \"optimize exa\",\n\"exa latency\", \"exa caching\", \"exa slow\", \"exa fast\".","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",66,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fexa-performance-tuning\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"exa","exa performance tuning","performance tuning","tuning","performance","search","api","integrations","read","write","edit","openclaw","selection","optimize","caching","strategies","latency","io","throughput","code","2026-11-10 10:12:30",false,"---\nname: exa-performance-tuning\ndescription: |\n  Optimize Exa API performance with search type selection, caching, and parallelization.\n  Use when experiencing slow responses, implementing caching strategies,\n  or optimizing request throughput for Exa integrations.\n  Trigger with phrases like \"exa performance\", \"optimize exa\",\n  \"exa latency\", \"exa caching\", \"exa slow\", \"exa fast\".\nallowed-tools: Read, Write, Edit\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ncompatible-with: claude-code, codex, openclaw\ntags: [saas, exa, api, performance, optimization]\n\n---\n# Exa Performance Tuning\n\n## Overview\nOptimize Exa search API response times for production workloads. Key levers: search type selection (instant \u003C fast \u003C auto \u003C neural \u003C deep), result count reduction, content scope control, result caching, and parallel query execution.\n\n## Latency by Search Type\n\n| Type | Typical Latency | Use Case |\n|------|----------------|----------|\n| `instant` | \u003C 150ms | Real-time autocomplete, typeahead |\n| `fast` | p50 \u003C 425ms | Speed-critical user-facing search |\n| `auto` | 300-1500ms | General purpose (default) |\n| `neural` | 500-2000ms | Best semantic quality |\n| `deep` | 2-5s | Maximum coverage, light deep search |\n| `deep-reasoning` | 5-15s | Complex research questions |\n\n## Instructions\n\n### Step 1: Match Search Type to Latency Budget\n```typescript\nimport Exa from \"exa-js\";\n\nconst exa = new Exa(process.env.EXA_API_KEY);\n\nfunction selectSearchType(latencyBudgetMs: number) {\n  if (latencyBudgetMs \u003C 200) return \"instant\";\n  if (latencyBudgetMs \u003C 500) return \"fast\";\n  if (latencyBudgetMs \u003C 1500) return \"auto\";\n  if (latencyBudgetMs \u003C 3000) return \"neural\";\n  return \"deep\";\n}\n\nasync function optimizedSearch(query: string, latencyBudgetMs: number) {\n  const type = selectSearchType(latencyBudgetMs);\n  const numResults = latencyBudgetMs \u003C 500 ? 3 : latencyBudgetMs \u003C 2000 ? 5 : 10;\n\n  return exa.search(query, { type, numResults });\n}\n```\n\n### Step 2: Minimize Content Retrieval\n```typescript\n\u002F\u002F Each content option adds latency. Only request what you need.\n\n\u002F\u002F Fastest: metadata only (no content retrieval)\nconst metadataOnly = await exa.search(\"query\", { numResults: 5 });\n\n\u002F\u002F Medium: highlights only (much smaller than full text)\nconst highlightsOnly = await exa.searchAndContents(\"query\", {\n  numResults: 5,\n  highlights: { maxCharacters: 300 },\n  \u002F\u002F No text or summary — saves content retrieval time\n});\n\n\u002F\u002F Slower: full text (use maxCharacters to limit)\nconst withText = await exa.searchAndContents(\"query\", {\n  numResults: 3,  \u002F\u002F fewer results = faster\n  text: { maxCharacters: 1000 },  \u002F\u002F limit content size\n});\n```\n\n### Step 3: Cache Search Results\n```typescript\nimport { LRUCache } from \"lru-cache\";\n\nconst searchCache = new LRUCache\u003Cstring, any>({\n  max: 5000,\n  ttl: 2 * 3600 * 1000, \u002F\u002F 2-hour TTL\n});\n\nasync function cachedSearch(query: string, opts: any) {\n  const key = `${query}:${opts.type || \"auto\"}:${opts.numResults || 10}`;\n  const cached = searchCache.get(key);\n  if (cached) return cached; \u002F\u002F Cache hit: 0ms vs 500-2000ms\n\n  const results = await exa.search(query, opts);\n  searchCache.set(key, results);\n  return results;\n}\n```\n\n### Step 4: Parallelize Independent Searches\n```typescript\n\u002F\u002F Run independent queries concurrently instead of sequentially\nasync function parallelSearch(queries: string[]) {\n  const searches = queries.map(q =>\n    cachedSearch(q, { type: \"auto\", numResults: 3 })\n  );\n  return Promise.all(searches);\n  \u002F\u002F 3 parallel searches: ~600ms total (limited by slowest)\n  \u002F\u002F 3 sequential searches: ~1800ms total\n}\n```\n\n### Step 5: Two-Phase Search Pattern\n```typescript\n\u002F\u002F Phase 1: Fast search for URLs only\n\u002F\u002F Phase 2: Selective content retrieval for top results only\nasync function twoPhaseSearch(query: string) {\n  \u002F\u002F Phase 1: metadata only (fast)\n  const results = await exa.search(query, { type: \"auto\", numResults: 10 });\n\n  \u002F\u002F Phase 2: get content only for top 3 results\n  const topUrls = results.results.slice(0, 3).map(r => r.url);\n  const contents = await exa.getContents(topUrls, {\n    text: { maxCharacters: 2000 },\n    highlights: { maxCharacters: 500, query },\n  });\n\n  return contents;\n  \u002F\u002F Saves content retrieval time for 7 results you won't use\n}\n```\n\n### Step 6: Query Normalization for Cache Hits\n```typescript\nfunction normalizeQuery(query: string): string {\n  return query\n    .toLowerCase()\n    .trim()\n    .replace(\u002F\\s+\u002Fg, \" \")       \u002F\u002F collapse whitespace\n    .replace(\u002F[?.!,;:]+$\u002F, \"\"); \u002F\u002F strip trailing punctuation\n}\n\nasync function normalizedSearch(query: string, opts: any) {\n  return cachedSearch(normalizeQuery(query), opts);\n}\n\u002F\u002F Increases cache hit rate by 20-40% for user-generated queries\n```\n\n## Performance Comparison\n\n| Strategy | Latency Savings | Implementation |\n|----------|----------------|----------------|\n| `instant` type | 5-10x faster than neural | One-line change |\n| Reduce numResults (10 -> 3) | ~200-500ms saved | One-line change |\n| Highlights instead of text | ~100-300ms saved | Replace `text` with `highlights` |\n| LRU cache | 100% for cache hits | ~20 lines |\n| Parallel queries | 2-3x throughput | `Promise.all` wrapper |\n| Two-phase search | ~30-50% for large result sets | ~15 lines |\n\n## Error Handling\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Search taking 3s+ | Neural search on complex query | Switch to `fast` or `auto` type |\n| Timeout on content | Large pages, slow sources | Set `maxCharacters` limit |\n| Cache miss rate high | Unique queries each time | Normalize queries before caching |\n| Rate limit (429) | Too many concurrent searches | Add request queue with concurrency limit |\n\n## Resources\n- [Exa Search Types](https:\u002F\u002Fdocs.exa.ai\u002Freference\u002Fsearch)\n- [Exa Contents Retrieval](https:\u002F\u002Fdocs.exa.ai\u002Freference\u002Fcontents-retrieval)\n\n## Next Steps\nFor cost optimization, see `exa-cost-tuning`. For reliability, see `exa-reliability-patterns`.\n\n","# Exa Performance Tuning\n\n## Overview\nOptimize Exa search API response times for production workloads. Key levers: search type selection (instant \u003C fast \u003C auto \u003C neural \u003C deep), result count reduction, content scope control, result caching, and parallel query execution.\n\n## Latency by Search Type\n\n| Type | Typical Latency | Use Case |\n|------|----------------|----------|\n| `instant` | \u003C 150ms | Real-time autocomplete, typeahead |\n| `fast` | p50 \u003C 425ms | Speed-critical user-facing search |\n| `auto` | 300-1500ms | General purpose (default) |\n| `neural` | 500-2000ms | Best semantic quality |\n| `deep` | 2-5s | Maximum coverage, light deep search |\n| `deep-reasoning` | 5-15s | Complex research questions |\n\n## Instructions\n\n### Step 1: Match Search Type to Latency Budget\n```typescript\nimport Exa from \"exa-js\";\n\nconst exa = new Exa(process.env.EXA_API_KEY);\n\nfunction selectSearchType(latencyBudgetMs: number) {\n  if (latencyBudgetMs \u003C 200) return \"instant\";\n  if (latencyBudgetMs \u003C 500) return \"fast\";\n  if (latencyBudgetMs \u003C 1500) return \"auto\";\n  if (latencyBudgetMs \u003C 3000) return \"neural\";\n  return \"deep\";\n}\n\nasync function optimizedSearch(query: string, latencyBudgetMs: number) {\n  const type = selectSearchType(latencyBudgetMs);\n  const numResults = latencyBudgetMs \u003C 500 ? 3 : latencyBudgetMs \u003C 2000 ? 5 : 10;\n\n  return exa.search(query, { type, numResults });\n}\n```\n\n### Step 2: Minimize Content Retrieval\n```typescript\n\u002F\u002F Each content option adds latency. Only request what you need.\n\n\u002F\u002F Fastest: metadata only (no content retrieval)\nconst metadataOnly = await exa.search(\"query\", { numResults: 5 });\n\n\u002F\u002F Medium: highlights only (much smaller than full text)\nconst highlightsOnly = await exa.searchAndContents(\"query\", {\n  numResults: 5,\n  highlights: { maxCharacters: 300 },\n  \u002F\u002F No text or summary — saves content retrieval time\n});\n\n\u002F\u002F Slower: full text (use maxCharacters to limit)\nconst withText = await exa.searchAndContents(\"query\", {\n  numResults: 3,  \u002F\u002F fewer results = faster\n  text: { maxCharacters: 1000 },  \u002F\u002F limit content size\n});\n```\n\n### Step 3: Cache Search Results\n```typescript\nimport { LRUCache } from \"lru-cache\";\n\nconst searchCache = new LRUCache\u003Cstring, any>({\n  max: 5000,\n  ttl: 2 * 3600 * 1000, \u002F\u002F 2-hour TTL\n});\n\nasync function cachedSearch(query: string, opts: any) {\n  const key = `${query}:${opts.type || \"auto\"}:${opts.numResults || 10}`;\n  const cached = searchCache.get(key);\n  if (cached) return cached; \u002F\u002F Cache hit: 0ms vs 500-2000ms\n\n  const results = await exa.search(query, opts);\n  searchCache.set(key, results);\n  return results;\n}\n```\n\n### Step 4: Parallelize Independent Searches\n```typescript\n\u002F\u002F Run independent queries concurrently instead of sequentially\nasync function parallelSearch(queries: string[]) {\n  const searches = queries.map(q =>\n    cachedSearch(q, { type: \"auto\", numResults: 3 })\n  );\n  return Promise.all(searches);\n  \u002F\u002F 3 parallel searches: ~600ms total (limited by slowest)\n  \u002F\u002F 3 sequential searches: ~1800ms total\n}\n```\n\n### Step 5: Two-Phase Search Pattern\n```typescript\n\u002F\u002F Phase 1: Fast search for URLs only\n\u002F\u002F Phase 2: Selective content retrieval for top results only\nasync function twoPhaseSearch(query: string) {\n  \u002F\u002F Phase 1: metadata only (fast)\n  const results = await exa.search(query, { type: \"auto\", numResults: 10 });\n\n  \u002F\u002F Phase 2: get content only for top 3 results\n  const topUrls = results.results.slice(0, 3).map(r => r.url);\n  const contents = await exa.getContents(topUrls, {\n    text: { maxCharacters: 2000 },\n    highlights: { maxCharacters: 500, query },\n  });\n\n  return contents;\n  \u002F\u002F Saves content retrieval time for 7 results you won't use\n}\n```\n\n### Step 6: Query Normalization for Cache Hits\n```typescript\nfunction normalizeQuery(query: string): string {\n  return query\n    .toLowerCase()\n    .trim()\n    .replace(\u002F\\s+\u002Fg, \" \")       \u002F\u002F collapse whitespace\n    .replace(\u002F[?.!,;:]+$\u002F, \"\"); \u002F\u002F strip trailing punctuation\n}\n\nasync function normalizedSearch(query: string, opts: any) {\n  return cachedSearch(normalizeQuery(query), opts);\n}\n\u002F\u002F Increases cache hit rate by 20-40% for user-generated queries\n```\n\n## Performance Comparison\n\n| Strategy | Latency Savings | Implementation |\n|----------|----------------|----------------|\n| `instant` type | 5-10x faster than neural | One-line change |\n| Reduce numResults (10 -> 3) | ~200-500ms saved | One-line change |\n| Highlights instead of text | ~100-300ms saved | Replace `text` with `highlights` |\n| LRU cache | 100% for cache hits | ~20 lines |\n| Parallel queries | 2-3x throughput | `Promise.all` wrapper |\n| Two-phase search | ~30-50% for large result sets | ~15 lines |\n\n## Error Handling\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Search taking 3s+ | Neural search on complex query | Switch to `fast` or `auto` type |\n| Timeout on content | Large pages, slow sources | Set `maxCharacters` limit |\n| Cache miss rate high | Unique queries each time | Normalize queries before caching |\n| Rate limit (429) | Too many concurrent searches | Add request queue with concurrency limit |\n\n## Resources\n- [Exa Search Types](https:\u002F\u002Fdocs.exa.ai\u002Freference\u002Fsearch)\n- [Exa Contents Retrieval](https:\u002F\u002Fdocs.exa.ai\u002Freference\u002Fcontents-retrieval)\n\n## Next Steps\nFor cost optimization, see `exa-cost-tuning`. For reliability, see `exa-reliability-patterns`.\n\n",{"name":5,"tags":54,"author":57,"license":15,"version":58,"description":59,"allowed-tools":60,"compatible-with":61},[55,29,35,33,56],"saas","optimization","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Optimize Exa API performance with search type selection, caching, and parallelization.\nUse when experiencing slow responses, implementing caching strategies,\nor optimizing request throughput for Exa integrations.\nTrigger with phrases like \"exa performance\", \"optimize exa\",\n\"exa latency\", \"exa caching\", \"exa slow\", \"exa fast\".\n","Read, Write, Edit","claude-code, codex, openclaw","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fexa-performance-tuning",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":72,"prompt":82,"zipAvailable":83},[73,76,79],{"tool":74,"command":75},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill exa-performance-tuning",{"tool":77,"command":78},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill exa-performance-tuning",{"tool":80,"command":81},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill exa-performance-tuning","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fexa-performance-tuning\u002FSKILL.md",true,[],[86,98,108,117,123,130],{"skillNo":87,"name":88,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":94,"publishedAt":49},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[91],{"categoryNo":92,"categoryName":93,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[95,96,97],"model","model hierarchy","model hierarchy skill",{"skillNo":99,"name":100,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":104,"publishedAt":49},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[103],{"categoryNo":92,"categoryName":93,"taxonomyType":21,"taxonomyTypeDesc":22},[105,106,107],"MCP","zoom","zoom mcp",{"skillNo":109,"name":110,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":49},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[114,115,116,106],"sdk","zoom apps sdk","apps",{"skillNo":118,"name":119,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":49},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[119],{"skillNo":124,"name":125,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":129,"publishedAt":49},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[128],{"categoryNo":92,"categoryName":93,"taxonomyType":21,"taxonomyTypeDesc":22},[125],{"skillNo":131,"name":132,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":49},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[132]]