| name | exa-performance-tuning |
| description | Optimize Exa API performance with search type selection, caching, and parallelization.
Use when experiencing slow responses, implementing caching strategies,
or optimizing request throughput for Exa integrations.
Trigger with phrases like "exa performance", "optimize exa",
"exa latency", "exa caching", "exa slow", "exa fast".
|
| allowed-tools | Read, Write, Edit |
| version | 1.11.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","exa","api","performance","optimization"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Exa Performance Tuning
Overview
Optimize Exa search API response times for production workloads. Key levers: search type selection (instant < fast < auto < neural < deep), result count reduction, content scope control, result caching, and parallel query execution.
Latency by Search Type
| Type | Typical Latency | Use Case |
|---|
instant | < 150ms | Real-time autocomplete, typeahead |
fast | p50 < 425ms | Speed-critical user-facing search |
auto | 300-1500ms | General purpose (default) |
neural | 500-2000ms | Best semantic quality |
deep | 2-5s | Maximum coverage, light deep search |
deep-reasoning | 5-15s | Complex research questions |
Instructions
Step 1: Match Search Type to Latency Budget
import Exa from "exa-js";
const exa = new Exa(process.env.EXA_API_KEY);
function selectSearchType(latencyBudgetMs: number) {
if (latencyBudgetMs < 200) return "instant";
if (latencyBudgetMs < 500) return "fast";
if (latencyBudgetMs < 1500) return "auto";
if (latencyBudgetMs < ) ;
;
}
() {
= (latencyBudgetMs);
numResults = latencyBudgetMs < ? : latencyBudgetMs < ? : ;
exa.(query, { , numResults });
}