Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
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, also compatible with Codex and OpenClaw
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)
functiondeduplicateResults(results: any[]): any[] {
const seen = newMap<string, any>();
for (const result of results) {
const domain = newURL(result.url).hostname;
const key = `${domain}:${result.title}`;
if (!seen.has(key) || result.score > seen.get(key).score) {
seen.set(key, result);
}
}
returnArray.from(seen.values());
}
Step 5: Structured Summary Extraction
// Use summary.schema for structured data extractionconst results = await exa.searchAndContents(
"YC-backed AI startups Series A 2025",
{
numResults: 10,
category: "company",
summary: {
query: "company name, funding amount, what they do",
// schema can define JSON structure for the summary output
},
}
);
// Each result.summary contains a structured summaryfor (const r of results.results) {
console.log(`${r.title}: ${r.summary}`);
}