Seven RAG Architectures Beyond the Naive Pipeline and When Each Fits
Naive RAG breaks in predictable ways. Seven architectures, from contextual notes to multi-agent and memory retrieval, with their trade-offs and when to use each.
This article is published in English.
Sources: 7 Advanced RAG Architectures Every AI Developer Must Know: A Complete Guide
The first RAG pipeline most people build is short: split the documents into chunks, create embeddings, fetch the top few matches, stuff them into the prompt and let the LLM answer. The demo works and the replies sound convincing. Then real questions arrive. The wrong chunk comes back. The right document turns up but the needed passage doesn't. Sometimes the fact sits in the database and the model never gets to see it.
The odd part is that no component is faulty. The pipeline does precisely what it was built to do. Tutorials rarely stress the actual lesson: filling a vector database is easy, while putting the right information in front of the model is the hard problem. That first design is naive RAG. It has uses, being the natural starting point, but when documents get messy, questions get tougher or reliability matters, one retrieve-and-answer loop hits its ceiling. Seven more advanced architectures follow, each with the problem it fixes, its likely failure points and a way to judge whether a given system needs it.
Why RAG exists
An LLM only knows what it picked up in training. Ask about internal company documents or recent events and it either admits ignorance or, worse, makes up a confident answer. RAG fixes this much like letting a student bring notes into an exam. The system finds relevant material first and passes it over as reference, so the model needn't answer from memory alone.
The basic pipeline is below.
When a user asks something, the system runs four steps:
- Search the external knowledge base for relevant material
- Retrieve the best-matching chunks
- Append those chunks to the prompt next to the question
- Send it all to the LLM, which writes the answer from that context
In shorthand: question, search, retrieve, add context, LLM, answer. This works well for small, clean document sets. Real data rarely behaves, and five weaknesses tend to surface:
- Chunks lose context. A snippet saying revenue grew 3% doesn't reveal which company or quarter it describes.
- Information gets missed. Tables, charts and scanned pages often don't survive text-based retrieval.
- The first search may be wrong, and basic RAG doesn't stop to try a different one.
- Earlier conversations vanish. With no memory, each session starts at zero.
- Facts stay disconnected. When information is spread across documents, it may need linking before an answer makes sense.
These aren't five random problems. They explain why different architectures exist, and each one below targets a distinct failure in the basic pipeline.
1. Contextual chunk notes
Before a chunk is stored, a short note is attached saying what it's about, so it still makes sense after leaving its source document. Picture tearing one paragraph from a book and giving it to a stranger with no title or chapter number. They can't tell what it refers to. Now staple a note first: this is from Chapter 4, on the company's Q2 earnings. That's the entire idea.
The raw chunk says revenue grew 3% over the previous quarter, with the company and year unclear. With a note attached, it reads as coming from ACME Corp's Q2 2023 filing, followed by the same sentence.
Raw chunk: "revenue grew 3% over the previous quarter"
-> which company? which year? unclear
With a note attached: "From ACME Corp's Q2 2023 filing.
Revenue grew 3% over the previous quarter."
-> now it makes sense on its own
The upside is that retrieved chunks make sense on their own, and the search method itself stays untouched, since only what gets stored changes. The downside is cost: a note per chunk takes time and money before searching can even begin, and a poorly written note can steer a search the wrong way as readily as a good one steers it right.
2. Multimodal retrieval
Documents often aren't plain text at all. Converting a PDF page to text and searching that can mangle tables and charts, so the alternative is letting the system view the page as an image. Compare reading someone's description of a chart with looking at the chart itself. A description may omit details or misstate numbers, and the original can't.
In the older flow, a PDF page is extracted to text, the table layout gets guessed, and the text is searched, so numbers and structure can scramble along the way. In the multimodal flow the page is searched directly as an image.
Old way: PDF page -> extract text -> guess at the table layout -> search the text
(numbers and structure can get scrambled along the way)
Multimodal way: PDF page -> search the page as an image directly
(the table stays a table, the chart stays a chart)
This handles tables, charts and scans that text extraction garbles, and it removes a fragile pipeline step. The costs are heavier computing than plain-text search and a younger ecosystem with fewer tools and less community knowledge.
3. Hybrid search
Two kinds of search run together, one that understands meaning and one that matches exact words, and their results are combined. Imagine two librarians. One grasps what you mean even when your wording is off. The other has no sense of context but will always locate the document containing the specific code you typed. Having both on the case is the point.
Take the query "error E0502 borrow checker." The meaning-based search finds documents on a related concept even without the exact phrase, the exact-word search finds the literal string "E0502," and the combined result merges both.
Query: "error E0502 borrow checker"
Meaning-based search: finds docs about a similar concept, even without that exact phrase
Exact-word search: finds the literal string "E0502"
Combined: merges both into one final list
One search then covers loose conceptual questions and precise technical terms, which fixes a common blind spot: meaning-based search alone is often poor with codes, IDs and jargon. The price is operating two search systems, and deciding how much weight each one's results deserve takes real tuning.
4. Graph and map-style retrieval
Instead of storing isolated chunks, this approach maps how the people, companies and ideas in the documents connect, groups related ones, and writes a short summary for every group in advance. When a question is too broad for any one chunk, the system draws on those group summaries, and can even decide on its own which groups merit a look.
Say someone wants the big themes across everything published this year. No individual article answers that. If the organization were split into departments, each with a one-page summary of its work, reading just those pages would answer fast. That's the map. A smarter variant behaves like an assistant who first works out which departments are relevant to the question, rather than reading every summary regardless.
The process has two steps. First the map is built once, ahead of time: find how people and ideas connect, group related items, write a summary per group. Second, a broad question is answered from those summaries.
Step 1, build the map (done once, ahead of time):
Documents -> find how people/ideas connect -> group related ones
-> write a short summary for each group
Step 2, answer a broad question:
"What are the big themes here?"
-> pick the relevant groups (a smart version does this pick automatically)
-> read just their summaries -> combine into one answer
Benefits: broad thematic questions get answered when no single chunk could do so, connections across many documents can be traced at once, and the self-selecting version skips summaries that don't matter. Drawbacks: the map takes a real project to build, parts of it need rebuilding whenever documents change substantially, and the group-picking step is one more place where the system may choose badly.
5. Agentic, iterative retrieval
A map handles the big-picture question, but some questions need several searches however good the map is. Here the system searches, looks at what came back, decides whether that's enough, and repeats if needed. Compare a search engine with a research assistant. The engine returns one list and stops. The assistant reads the results, sees they fall short, and goes back for more, using what it learned to search more cleverly the second time.
The loop goes like this: a question arrives, one search runs, and the system asks whether that suffices. If not, it searches again with what it learned, and if that still fails, it tries another angle.
Question comes in
-> Search once -> "Is this enough to answer?"
-> No: search again, using what was just learned
-> No, still not enough: search again, from a different angle
-> Yes: now answer
It copes with questions that really need multiple lookups and doesn't quit after one poor search the way a fixed pipeline does. The cost is another round trip per extra search, adding expense and waiting time, and a badly chosen angle can burn several attempts before the error is noticed.
6. Multi-agent retrieval
Here one system doesn't plan, search, check and write all by itself. Those jobs are divided among smaller specialized systems, each doing one thing well, with a coordinator managing the whole process. A single person researching, writing and fact-checking at once tends to do a mediocre job on all three. A small team, with one planning, one digging, one verifying and one writing, usually does better at each part.
A question comes in, a planner decides what has to be looked up, searchers go find it, sometimes from different sources at the same time, and a checker reviews the findings for accuracy.
Question comes in
-> Planner decides what needs to be looked up
-> Searchers go look, sometimes from different sources at the same time
-> Checker reviews what came back for accuracy
-> Writer puts together the final answer
Every part of the job gets full focus instead of one system juggling all of it, and parallel searches save time. On the flip side, more cooperating systems push up the cost per question, and a wrong final answer takes real effort to trace back through several steps.
7. Memory-based retrieval
In this design the system searches not only a fixed document set but its own history with the user, treating past conversations as something to look back on instead of forgetting once they end. Think of a doctor who reads your file before each visit versus one who has you recount your whole medical history every time. Most of what you said last visit is still in a folder somewhere, and a good system likewise keeps the important material on hand and looks it up when relevant.
It lets a system recall things mentioned days or weeks earlier without keeping everything loaded at once, and it helps with anything personal or ongoing, beyond one-off document lookups. The trade-offs are an extra memory system layered on top of document search, which means more moving parts, and the fact that older memories are sometimes compressed or summarized to save space, so detail can be lost.
Choosing
Naive RAG fails quietly. It never crashes or raises an error. Users simply receive answers built on the wrong information, and all looks fine until someone checks.
Each architecture above exists because somebody traced a wrong answer to one specific, fixable cause. So the newest option isn't automatically the one to pick. Choose the one that matches the way retrieval is breaking. Look at the current pipeline and ask honestly: when it answers wrongly, did search find the wrong thing, did a chunk lose its context, or did the system never look a second time? That question alone points to the architecture needed next.