| name | exa-data-handling |
| description | Implement Exa search result processing, content extraction, caching, and RAG context management.
Use when handling search results, implementing caching, building citation pipelines,
or managing content payloads for LLM context windows.
Trigger with phrases like "exa data", "exa results processing",
"exa cache", "exa RAG context", "exa content extraction".
|
| allowed-tools | Read, Write, Edit |
| version | 1.11.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","exa","data","rag","caching"] |
| compatibility | Designed for Claude Code |
Exa Data Handling
Overview
Manage search result data from Exa's neural search API. Covers content extraction scope control (text vs highlights vs summary), result caching with TTL, citation deduplication, token budget management for LLM context windows, and structured summary extraction.
Prerequisites
exa-js SDK installed and configured
- Optional:
lru-cache for in-memory caching, ioredis for Redis
- Understanding of Exa content options (text, highlights, summary)
Instructions
Step 1: Control Content Extraction Scope
import Exa from "exa-js";
const exa = new Exa(process.env.EXA_API_KEY);
async function searchMetadataOnly(query: string) {
return exa.search(query, {
type: "auto",
numResults: 10,
});
}
async function searchWithHighlights(query: string) {
return exa.searchAndContents(query, {
numResults: 10,
highlights: {
maxCharacters: 500,
query: query,
},
});
}
() {
exa.(query, {
: ,
: { : maxChars },
: { : },
});
}
() {
exa.(query, {
: ,
: { : query },
});
}