Skip to main content
exa-reference-architecture Implement Exa reference architecture for search pipelines, RAG, and content discovery.
Use when designing new Exa integrations, reviewing project structure,
or establishing architecture standards for neural search applications.
Trigger with phrases like "exa architecture", "exa project structure",
"exa RAG pipeline", "exa reference design", "exa search pipeline".
Zur Installation springen Skills Marktplatz Entdecken und erkunden Sie KI-Skills, die von der Community erstellt wurden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fรผgen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prรผfen und installieren.
Prompt kopierenPrompt-Details anzeigen Ein direkter Befehl รผberspringt den Prรผf-Prompt. Prรผfen Sie die Quelle, bevor Sie ihn ausfรผhren.
npx skills add https://github.com/jeremylongshore/claude-code-plugins-plus-skills --skill exa-reference-architectureDer Befehl bleibt in einer Zeile. Scrollen Sie horizontal, um ihn vor dem Kopieren vollstรคndig zu prรผfen.
Sie bevorzugen eine lokale Kopie? Laden Sie die Dateien herunter, die SkillsMP derzeit vorliegen.
ZIP herunterladen Herunterladen... Mehr aus diesem Repository Implement user sign-up and sign-in flows with Clerk.
Use when building authentication UI, customizing sign-in experience,
or implementing OAuth social login.
Trigger with phrases like "clerk sign-in", "clerk sign-up",
"clerk login flow", "clerk OAuth", "clerk social login".
Implement session management and middleware with Clerk.
Use when managing user sessions, configuring route protection,
or implementing token refresh and custom JWT templates.
Trigger with phrases like "clerk session", "clerk middleware",
"clerk route protection", "clerk token", "clerk JWT".
Configure enterprise SSO, role-based access control, and organization management.
Use when implementing SSO integration, configuring role-based permissions,
or setting up organization-level controls.
Trigger with phrases like "clerk SSO", "clerk RBAC",
"clerk enterprise", "clerk roles", "clerk permissions", "clerk organizations".
Verwandte Berufe SOC
Basierend auf der SOC-Berufsklassifikation
name exa-reference-architecture description Implement Exa reference architecture for search pipelines, RAG, and content discovery.
Use when designing new Exa integrations, reviewing project structure,
or establishing architecture standards for neural search applications.
Trigger with phrases like "exa architecture", "exa project structure",
"exa RAG pipeline", "exa reference design", "exa search pipeline".
allowed-tools Read, Grep version 1.11.0 license MIT author Jeremy Longshore <jeremy@intentsolutions.io> tags ["saas","exa","architecture","rag"] compatibility Designed for Claude Code, also compatible with Codex and OpenClaw
Exa Reference Architecture
Overview
Production architecture for Exa neural search integration. Covers search service design, content extraction pipeline, RAG integration, domain-scoped search profiles, and caching strategy.
Architecture Diagram
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Application Layer โ
โ RAG Pipeline | Research Agent | Content Discovery โ
โโโโโโโโโโโโฌโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโ
โ โ โ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Exa Search Service Layer โ
โ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โ
โ โ search() โ โ findSimilarโ โ getContents() โ โ
โ โ neural/ โ โ (URL seed) โ โ (known URLs) โ โ
โ โ keyword/ โ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โ
โ โ auto/fast โ โ
โ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โ
โ โ answer() / โ โ
โ Content Options: โ streamAnswer() โ โ
โ text | highlights | summary โโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Result Cache (LRU + Redis) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ api.exa.ai โ Exa Neural Search API โ
โ Auth: x-api-key header | Rate: 10 QPS default โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Instructions
Step 1: Search Service Layer
import Exa from "exa-js" ;
const exa = new Exa (process.env .EXA_API_KEY );
interface SearchRequest {
query : string ;
type ?: "auto" | "neural" | "keyword" | "fast" | ;
?: ;
?: ;
?: ;
?: [];
?: [];
?: | | | | ;
}
{
?: | { ?: };
?: | { ?: ; ?: };
?: | { ?: };
}
( ) {
exa. (req. , {
: req. || ,
: req. || ,
: req. ,
: req. ,
: req. ,
: req. ,
: req. ,
...content,
});
}
( ) {
exa. (url, {
numResults,
: { : },
: ,
});
}
"instant"
numResults
number
startDate
string
endDate
string
includeDomains
string
excludeDomains
string
category
"company"
"research paper"
"news"
"tweet"
"people"
interface
ContentOptions
text
boolean
maxCharacters
number
highlights
boolean
maxCharacters
number
query
string
summary
boolean
query
string
export
async
function
searchWithContents
req : SearchRequest ,
content : ContentOptions = { text: { maxCharacters: 2000 } }
return
searchAndContents
query
type
type
"auto"
numResults
numResults
10
startPublishedDate
startDate
endPublishedDate
endDate
includeDomains
includeDomains
excludeDomains
excludeDomains
category
category
export
async
function
findRelated
url : string , numResults = 5
return
findSimilarAndContents
text
maxCharacters
1000
excludeSourceDomain
true
Step 2: Research Pipeline
export async function researchTopic (topic : string ) {
const sources = await exa.searchAndContents (topic, {
type : "neural" ,
numResults : 15 ,
text : { maxCharacters : 2000 },
highlights : { maxCharacters : 500 , query : topic },
startPublishedDate : "2024-01-01T00:00:00.000Z" ,
});
const topUrl = sources.results [0 ]?.url ;
const similar = topUrl
? await exa.findSimilarAndContents (topUrl, {
numResults : 5 ,
text : { maxCharacters : 1500 },
excludeSourceDomain : true ,
})
: { results : [] };
const answer = await exa.answer (
`Based on recent research, summarize: ${topic} ` ,
{ text : true }
);
return {
primary : sources.results ,
related : similar.results ,
aiSummary : answer.answer ,
sources : answer.results .map (r => ({ title : r.title , url : r.url })),
};
}
Step 3: RAG Integration Pattern
export async function ragSearch (userQuery : string , contextWindow = 5 ) {
const results = await exa.searchAndContents (userQuery, {
type : "neural" ,
numResults : contextWindow,
text : { maxCharacters : 2000 },
highlights : { maxCharacters : 500 , query : userQuery },
});
const context = results.results
.map ((r, i ) =>
`[Source ${i + 1 } ] ${r.title} \n` +
`URL: ${r.url} \n` +
`Content: ${r.text} \n` +
`Key points: ${r.highlights?.join(" | " )} `
)
.join ("\n\n---\n\n" );
return {
context,
sources : results.results .map (r => ({
title : r.title ,
url : r.url ,
score : r.score ,
})),
};
}
Step 4: Domain-Specific Search Profiles const SEARCH_PROFILES = {
technical : {
includeDomains : [
"github.com" , "stackoverflow.com" , "arxiv.org" ,
"developer.mozilla.org" , "docs.python.org" ,
],
},
news : {
category : "news" as const ,
includeDomains : ["techcrunch.com" , "theverge.com" , "arstechnica.com" ],
},
research : {
category : "research paper" as const ,
includeDomains : ["arxiv.org" , "nature.com" , "science.org" ],
},
companies : {
category : "company" as const ,
},
};
export async function profiledSearch (
query : string ,
profile : keyof typeof SEARCH_PROFILES
) {
const config = SEARCH_PROFILES [profile];
return searchWithContents ({ query, ...config, numResults : 10 });
}
Step 5: Competitor Discovery export async function discoverCompetitors (companyUrl : string ) {
const similar = await exa.findSimilarAndContents (companyUrl, {
numResults : 10 ,
excludeSourceDomain : true ,
text : { maxCharacters : 500 },
summary : { query : "What does this company do?" },
});
return similar.results .map (r => ({
name : r.title ,
url : r.url ,
description : r.summary || r.text ?.substring (0 , 200 ),
score : r.score ,
}));
}
Error Handling Issue Cause Solution No results Query too specific Broaden query, switch to neural search Low relevance Wrong search type Use auto type for hybrid results Empty text/highlights Site blocks scraping Use livecrawl: "preferred" or try summary Rate limit Too many concurrent requests Add request queue with 8-10 concurrency
Resources
Next Steps For architecture variants at different scales, see exa-architecture-variants.