Seven RAG Architectures, and the Two I'd Ship Before Touching the Other Five
Seven RAG architectures, what each one actually fixes, and why hybrid search plus a reranker should come before graphs, agents, or self-critique.
Every RAG demo works. That’s the trap.
You chunk a PDF, embed it, ask three questions you already know the answers to, and the model nails all three. Everyone nods. Then you point the same pipeline at real documents, and a real user types “what’s the refund window for SKU-4471 on the annual plan?” and gets a confident, fluent, completely wrong answer about a different product.
The instinct at that moment is to reach for something fancier. Graphs, agents, self-critique loops. There’s a whole menu of “advanced” RAG now, and the names alone make you feel like you’re falling behind. I want to walk through seven of the common ones, say what each actually fixes, and then argue for something less exciting than the menu suggests: most teams should stop at hybrid search plus a reranker and spend the saved effort on evaluation.
The seven architectures aren’t rungs on a ladder. Each one patches a different stage.
Most guides list these from Vanilla to Agentic as if you’re climbing. You’re not. Each one patches a specific spot in the pipeline, and if you don’t know which spot is broken, you’ll buy the wrong patch.
Think of a RAG system as having four places where things go wrong. First is what you indexed and how you search it. Hybrid RAG and Graph RAG live there. Second is what you do with the candidates after you fetch them, which is where reranking and Corrective RAG work. Third is the model’s own judgment while it generates, which is Self-RAG’s territory. Fourth is who controls the flow: a fixed pipeline, or an agent deciding what to do next. That’s Agentic RAG.
Before you pick anything, diagnose. Take twenty questions your system gets wrong and look at the top fifty retrieved chunks for each. If the right chunk isn’t in there at all, you have a recall problem, and you should be looking at hybrid search, chunking, or a graph. If the right chunk is in there but buried at position 31, you have a precision problem, and a reranker is your answer. If the right chunk is sitting at position one and the model still botches the answer, retrieval isn’t your problem, and no architecture on this list will save you from a bad prompt or a weak model.
The pattern got its name from the 2020 Lewis et al. paper out of Facebook AI Research, but the version most of us build is simpler than what’s in the paper. Split documents into chunks, embed them, store the vectors. At query time, embed the question, pull the top-K nearest chunks by cosine similarity, and paste them into the prompt.
It’s fast, it’s cheap, and you can build it in an afternoon. For an internal FAQ bot over clean, well-structured docs, it might be all you ever need.
It breaks in two predictable ways. The first is noise: top-K always returns K chunks, whether or not K relevant ones exist, so the model gets handed junk and dutifully tries to use it. The second is multi-part questions. If someone asks “how does billing work and what’s the cancellation policy?”, the query embedding lands somewhere between the two topics and may sit close to neither. One vector can’t point at two places.
Build this first anyway. It’s your baseline, and every other architecture here has to earn its extra complexity by beating it on your data.
Dense embeddings capture meaning, which is great until someone searches for an error code, a product ID, or a person’s name. Embeddings blur exact tokens. “ERR_4471” and “ERR_4417” look nearly identical to a vector model, and nothing about that is a bug. Keyword search (BM25) has the opposite problem: it matches the exact string beautifully and has no idea that “cancel my plan” and “terminate subscription” mean the same thing.
Hybrid search runs both and merges the results. The merging part trips people up, because BM25 scores and cosine similarities live on completely different scales, and you can’t just add them. The standard trick is Reciprocal Rank Fusion, from a 2009 paper by Cormack and colleagues. It ignores the scores and only uses the ranks: each document gets 1 / (k + rank) from every list it appears in, and you sum. The paper’s constant is k = 60.
Rank fusion ignores raw scores and rewards documents that both searches agree on.
type Hit = { id: string; text: string };
export function reciprocalRankFusion( lists: Hit[][], k = 60, topN = 20,): Hit[] { const scores = new Map<string, number>(); const byId = new Map<string, Hit>();
for (const list of lists) { list.forEach((hit, i) => { byId.set(hit.id, hit); // rank is 1-based, so position i has rank i + 1 scores.set(hit.id, (scores.get(hit.id) ?? 0) + 1 / (k + i + 1)); }); }
return [...scores.entries()] .sort((a, b) => b[1] - a[1]) .slice(0, topN) .map(([id]) => byId.get(id)!);}The cost is real. You’re now maintaining two indexes that have to stay in sync, tuning how many candidates each side contributes, and debugging results that come from two different retrieval paths. Metadata filtering (by date, product, tenant) usually gets bolted on here too, and it’s worth it, because filtering before you search is far cheaper than hoping the model ignores the wrong tenant’s data.
My view: if your documents contain identifiers, acronyms, or proper nouns, hybrid isn’t an advanced technique. It’s the floor.
Embedding models are bi-encoders. They embed the query and each document separately, which is why you can precompute document vectors and search millions of them quickly. The price is that the model never sees the query and the document together, so it can’t reason about how they relate.
A cross-encoder reads both at once and outputs a relevance score. It’s much more accurate and much too slow to run over your whole corpus. So you use it as a second stage: let the fast first pass grab a generous pool, say fifty candidates, then have the cross-encoder re-score them and keep the best five.
Here’s the whole pipeline with hybrid and reranking together. The search and rerank functions are injected so you can plug in whatever backends you use.
ts
type ScoredHit = Hit & { score: number };
interface Deps { vectorSearch(q: string, n: number): Promise<Hit[]>; keywordSearch(q: string, n: number): Promise<Hit[]>; // one relevance score per document, same order as the input rerank(q: string, docs: Hit[]): Promise<number[]>;}
export async function retrieve( q: string, deps: Deps, pool = 50, keep = 5,): Promise<ScoredHit[]> { const [dense, sparse] = await Promise.all([ deps.vectorSearch(q, pool), deps.keywordSearch(q, pool), ]);
const candidates = reciprocalRankFusion([dense, sparse], 60, pool); const scores = await deps.rerank(q, candidates);
return candidates .map((doc, i) => ({ ...doc, score: scores[i] })) .sort((a, b) => b.score - a.score) .slice(0, keep);}The trade-off is an extra model call on the critical path. That hurts, but it’s a bounded, predictable hurt, and sending five sharp chunks to the LLM instead of twenty mushy ones can claw back some of that time in generation. Fewer irrelevant chunks also means fewer chances for the model to latch onto the wrong one, which is where a lot of “hallucinations” in RAG systems actually come from. The model wasn’t making things up. It was faithfully summarizing bad context.
This is the pair I’d ship first: hybrid retrieval, then a reranker. Together they fix both recall and precision, they stay a fixed pipeline you can reason about, and they don’t need a new database.
Everything above retrieves chunks. Some questions can’t be answered by any chunk. “What are the main themes across these two thousand support tickets?” or “which suppliers are connected to the company that failed the audit?” The answer isn’t written down in one place. It’s a pattern across many places, or a chain of relationships.
Some answers live in the connections between documents, not in any one chunk.
Graph RAG tackles this at index time. An LLM reads your documents and extracts entities and the relationships between them. Those become a graph, and instead of retrieving isolated text, you traverse edges to collect connected context across multiple hops. Microsoft Research’s GraphRAG work (the “From Local to Global” paper, 2024) goes further: it detects communities in the graph and pre-summarizes them, so a question about the whole corpus can be answered from summaries rather than raw text.
The pitch is strong for legal research, audits, investigations, anything where relationships are the point. The bill is also strong. Building the graph means running an LLM over your entire corpus up front, which is slow and costs real money. Entity resolution is miserable: is “Acme Inc.”, “Acme”, and “ACME Corporation” one node or three? And the graph goes stale the moment your documents change, so you need an update strategy before you need a query strategy. You’ll also be operating graph infrastructure (Neo4j, or NetworkX if you’re prototyping) next to the vector store you already have.
If your questions are mostly “what does the doc say about X,” skip it. If they’re mostly “how does X relate to Y across everything we have,” nothing else on this list gets close.
The CRAG paper (Yan et al., 2024) adds a small evaluator after retrieval. It judges how relevant the fetched documents are to the question and sorts the outcome into roughly three buckets: good, wrong, or unsure. Good results get used, with irrelevant bits stripped out. Wrong results get thrown away, the query is rewritten, and the system falls back to something else, usually web search. Unsure results get a mix.
The idea fits an uncomfortable truth: retrieval silently fails, and a standard pipeline has no way to notice. It’ll stuff whatever came back into the prompt either way. A gate gives you somewhere to say “this isn’t good enough” and do something different.
Here’s the shape of it, using the reranker score as the gate.
ts
const MIN_RELEVANCE = 0.35; // placeholder: calibrate on your own eval set
export async function correctiveRetrieve( query: string, deps: Deps & { rewriteQuery(q: string): Promise<string>; webSearch(q: string): Promise<Hit[]>; },) { const first = await retrieve(query, deps); if (first[0]?.score >= MIN_RELEVANCE) { return { hits: first, source: "internal" as const }; }
const rewritten = await deps.rewriteQuery(query); const second = await retrieve(rewritten, deps); if (second[0]?.score >= MIN_RELEVANCE) { return { hits: second, source: "internal" as const }; }
const web = await deps.webSearch(rewritten); return { hits: web, source: "web" as const };}Two gotchas. The threshold is not a universal number. Reranker scores vary by model, so the 0.35 above means nothing until you’ve plotted scores for known-good and known-bad retrievals on your data. And the web fallback deserves more suspicion than most tutorials give it. You’re pulling uncontrolled text from the open internet into your prompt, which is a prompt-injection surface and a trust problem. If your product promises answers from your company’s documents, quietly answering from the web is a different product. At minimum, tag the source in your response.
Latency also becomes variable: fast when retrieval works, much slower when the fallback chain fires. Users feel that.
Self-RAG (Asai et al., 2023) goes after a different problem. Instead of an external evaluator, the model itself is trained to emit special reflection tokens while it generates. They decide whether retrieval is needed at all, whether a retrieved passage is relevant, whether the draft is actually supported by that passage, and whether the answer is useful. If a check fails, the model retrieves again or regenerates.
The part that almost nobody mentions: Self-RAG is a training method. The reflection tokens come from fine-tuning a model on that purpose. You can’t switch it on in a hosted API model by flipping a setting. What most teams ship under the Self-RAG name is a prompted imitation, where a second LLM call plays judge and checks the draft against the retrieved text. That’s a legitimate and useful pattern, a grounding check, but it’s a different thing, and it comes with its own weakness: a model grading output from a model like itself shares many of the same blind spots.
Either way, you’re paying in tokens and time. Every critique is another generation, and the loop can run several times. That makes sense for answers where being wrong is expensive, like medical or compliance content, and very little sense for a chatbot answering “where’s my invoice.”
Agentic RAG puts retrieval inside an agent loop. The agent reads the question, decides what to search for, looks at the result, decides whether it needs more, maybe calls other tools, and finally writes an answer. It’s the only option here that handles questions like “compare how our 2023 and 2024 contracts treat termination, then check whether either conflicts with the new policy,” where the second search depends on what the first one found.
It’s also where systems go to die quietly. Agents loop. They re-run the same query with slightly different wording and call that progress. Costs compound, because every step carries the growing context of every previous step. And debugging a non-deterministic multi-step trace is a different, slower job than debugging a pipeline. Two runs of the same question can take completely different paths.
Agents loop. A hard step cap is the barrier that stops them.
If you build one, put the guardrails in first.
ts
type Step = | { action: "search"; query: string } | { action: "answer"; text: string };
export async function agenticAnswer( question: string, deps: Deps & { decide(question: string, notes: string[]): Promise<Step> }, maxSteps = 5,) { const notes: string[] = []; const seen = new Set<string>();
for (let i = 0; i < maxSteps; i++) { const step = await deps.decide(question, notes); if (step.action === "answer") return step.text;
const key = step.query.trim().toLowerCase(); if (seen.has(key)) { notes.push("You already searched that. Answer with what you have, or try a different angle."); continue; } seen.add(key);
const hits = await retrieve(step.query, deps); notes.push( `Query: ${step.query}\n` + hits.map((h) => h.text).join("\n---\n"), ); }
return "I couldn't find enough to answer this confidently.";}A hard step cap, a duplicate-query check, and a defined way to give up. Log every step, because you will need the trace. This is a skeleton, not production code, but those three things are the part people forget.
| Architecture | Latency | Complexity | Best suited for |
|---|---|---|---|
| Vanilla RAG | Very fast | Low | Simple internal FAQs |
| Hybrid RAG | Fast | Medium | Keyword-heavy technical docs |
| Reranking RAG | Moderate | Medium | High-precision search |
| Graph RAG | Slower | High | Entity-heavy relational data |
| Corrective RAG | Variable | High | Real-time or fallback-dependent data |
| Self-RAG | Slow | High | Fact-critical generation |
| Agentic RAG | Slow | Very high | Multi-step reasoning tasks |
Read those latency labels as relative, not as measurements. I haven’t put numbers in this article on purpose. Your embedding model, reranker, hosting region, and corpus size will move everything, and a benchmark from someone else’s setup won’t transfer to yours.
You can’t evaluate any of these claims without an eval set, and most teams don’t have one. Twenty to fifty real questions with known good source passages, scored before and after each change, will teach you more than any architecture diagram. Without it, you’re picking techniques by how they sound.
Paper results are also slippery. The CRAG, Self-RAG, and GraphRAG papers each show gains on their own benchmarks, but benchmarks are not your support tickets. Treat them as evidence that an idea works somewhere, not that it’ll work for you.
And chunking deserves more of your attention than it gets. Splitting a table in half, cutting a section off from its heading, or chopping at an arbitrary token count will sink a system that has every architecture above bolted onto it. It’s unglamorous, and I’d look at it before adding a single component from this list.
One more honest gap: these seven overlap and combine. Real systems are often hybrid plus rerank plus a corrective gate, with an agent on top for a few hard queries. The tidy categories are for learning. Production doesn’t care about them.
Look at what actually works in this list. BM25 is decades old. Rank fusion is from 2009. Cross-encoder reranking is a standard search-engineering move. The best-performing upgrades to RAG are mostly information retrieval techniques that the vector database boom made everyone forget for a couple of years.
I think that’s where this goes. Retrieval is going to be treated as its own engineering discipline, with eval sets, relevance tuning, and index maintenance, and the LLM becomes one component downstream of it instead of the star of the show. The teams that win won’t be the ones who adopt the newest architecture name. They’ll be the ones who measure retrieval quality separately from answer quality, so they know which half is broken.
Bigger context windows don’t change this much. You still pay for every token you send, and you still have to decide which tokens deserve to be there. That decision is retrieval, whatever you call it.
If you’ve built a basic RAG prototype and it’s disappointing on real data, this is for you, especially if you’re about to adopt something heavy because it sounded impressive. It’s also for anyone who has to choose between these on a roadmap and needs to know what each one costs.
Skip it if your whole knowledge base fits comfortably in a prompt and rarely changes. Put it all in context and don’t build retrieval at all. And skip the advanced stuff entirely if you haven’t built an eval set yet, because you won’t be able to tell whether any of it helped.
The most advanced RAG architecture is the simplest one your failure cases will allow.
Related posts
-
Business · Startups
Alikolo Raised $100,000 and Couldn't Answer One Question.
-
Technology · AI
AI Agent Frameworks in 2026: LangGraph, CrewAI, ADK Compared