Fundamentals · 4 August 2026
The five stages of RAG: from keyword search to agents
Whether an AI system answers a question or fails at it rarely depends on the language model. It depends on which RAG stage it works at. Research distinguishes five.
By Aidocr
Key takeaways
- Research distinguishes five RAG stages: naive RAG, advanced RAG, modular RAG, GraphRAG and agentic RAG.
- All five use the same language model. The difference sits upstream, in how information is retrieved and organised.
- For building data the jump from stage 3 to stage 4 is the decisive one, because validity is a relationship, not a text similarity.
- In an enterprise benchmark, accuracy rose from 16.7 to 54.2 percent purely by representing the same data as a knowledge graph (Sequeda et al. 2023).
- Higher is not automatically better. Every stage costs effort to build, and without clean underlying data even stage 5 delivers nothing.
Which maintenance contract applies today to the ventilation units in building B? The question sounds trivial. In practice an AI assistant finds five documents and cannot say which of them is in force. That is the moment most pilot projects in construction and real estate lose their credibility.
The obvious explanation would be that the language model is too weak. It is almost never true. The model simply is not handed the right information. What a system achieves here is decided before the answer is written: in how information is retrieved and organised. And that is exactly what the stages describe.
Where the classification comes from
The stages are not a marketing invention but an established classification from the research literature. The standard survey on RAG by Gao and colleagues describes three development stages in 2023: naive RAG, advanced RAG and modular RAG. A survey by Singh and colleagues continues the line in 2025 and adds two further stages, graph RAG and agentic RAG, and additionally subdivides the fifth stage into single-agent, multi-agent and hierarchical architectures.
One thing matters for understanding them: the stages are not product categories and not a ranking with a winner at the end. They describe how much work a system does between the question and the answer. Each stage solves a problem the previous one leaves open, and takes on effort in return.
| Stage | What is added | Where it stops |
|---|---|---|
| 1. Naive RAG | Meaning-based search across text chunks, answers with source references | Also surfaces long-superseded versions, knows no relationships |
| 2. Advanced RAG | Preparation before and after the search: synonyms, rewritten questions, re-ranked hits | Better hits, but the world remains a set of loose texts |
| 3. Modular RAG | The question is decomposed and routed to several sources and tools | Someone has to build the connection between the sources first |
| 4. GraphRAG | A knowledge graph holds things and relationships explicitly, including validity | Requires an ontology and maintained links |
| 5. Agentic RAG | The system plans its own path, checks intermediate results and follows up | More compute, longer runtimes, needs clear boundaries |
Stage 1: naive RAG
The basic form, and still the full feature set of many tools on the market. Documents are split into chunks, each chunk is translated into a numerical representation that captures meaning. For a question, the most similar chunks are retrieved and handed to the language model, which writes the answer from them.
That is a genuine advance over keyword search, because it compares meaning rather than letters. And it is quick to set up: load documents, build the index, done. Which is why the first prototype almost always looks impressive.
On our question: the system finds twelve documents mentioning ventilation. Three are outdated, two concern a different building. To a similarity search the 2019 contract version and the 2024 one look nearly identical, after all they use the same words. Which one applies today is written in neither text. It follows from their relationship to each other.
How to spot stage 1 in daily use: the answers are linguistically good and factually wrong sometimes. The system confidently cites a document that was superseded two years ago.
Stage 2: advanced RAG
Nothing is done fundamentally differently here, just more carefully. Before the search the question is prepared: technical terms are expanded, an ambiguous question is rewritten into several variants, filters by asset or period are applied. After the search the hits are scored again and re-ordered, and chunk boundaries are placed so that a paragraph does not end mid-sentence.
On our question: the system now understands that AHU, air handling unit and ventilation mean the same thing, and finds documents that never use the word ventilation. Hit quality rises noticeably. What is still missing: the system does not know which units are installed in building B at all. It knows texts, not assets.
Stage 2 is the cheapest real improvement and in almost every project the right first investment. It lifts quality significantly without changing anything about how data is held. But it only moves the boundary, it does not remove it.
Stage 3: modular RAG
At this stage the system stops treating every question the same way. It decomposes the question and routes the parts to different sources and tools: the asset list comes from the CAFM system via a query, the contracts from document management, figures from a database rather than from running text. The partial answers are combined at the end.
This is the point where a chat over documents becomes a systems integration. And it is the point where the effort becomes visible. Every connection between two sources has to be built and maintained. That the asset numbered L-04 in the CAFM system is the same thing as AHU 4 in the maintenance contract is not something the system knows by itself. It is written in neither system.
At stage 3 a system can query two sources. Whether it combines the answers correctly depends on whether someone stated beforehand which thing corresponds to which.
In practice stage 3 works very well in a manageable system landscape with clean identifiers. It scales poorly as soon as many systems, many assets and several decades of history come together, which is precisely the situation owners and operators work in.
Stage 4: GraphRAG
Here something fundamental changes. Instead of establishing connections anew for every question, they are recorded explicitly once, in a knowledge graph. Things become nodes, relationships become edges: building B contains asset L-04, asset L-04 is maintained under contract 2024-118, contract 2024-118 supersedes contract 2019-042 as of 1 January 2024. The ontology defines which kinds of things and relationships exist in the first place.
The decisive gain is not the search, it is validity. Which contract applies today is not a matter of text similarity but an edge with a date. That turns a question of interpretation into a question of lookup. The interplay is described in detail in What is GraphRAG?
How much this step is worth can be quantified. Sequeda, Allemang and Jacob published a benchmark in 2023 on an enterprise data model from the insurance domain, 43 questions answered with GPT-4 and no examples in the prompt. Asked directly against the SQL database, accuracy was 16.7 percent. Asked against a knowledge graph representation of the same data, it was 54.2 percent. Same model, same data, same questions. The difference was purely the structure the information was held in.
The price of this stage is modelling work. An ontology has to be built, objects have to be reconciled across system boundaries and links have to be maintained. Anyone unwilling to take that on should skip stage 4, because a half-maintained graph is worse than an honest text search: it looks authoritative and is not.
Stage 5: agentic RAG
On the first four stages the path to the answer is predetermined. On the fifth the system plans it itself. It decides which source to query first, evaluates the intermediate result, asks a follow-up question when something is missing, and stops when it has enough. The technical term is agentic, and the literature distinguishes three architectures.
In the single-agent form one agent takes control and selects tool and source. In a multi-agent system several specialised agents share the work, for instance one for contracts, one for technical assets, one for deadlines. In the hierarchical form a superordinate agent coordinates the others and decides whose result enters the answer. Which form fits depends on the breadth of the task, not on ambition.
On our question: the system establishes that for two of the five units in building B the contract has expired. Instead of staying silent about it, it checks on its own whether a change order exists, finds none for one unit, and delivers the gap as part of the answer. What such a sequence looks like step by step is described in what an AI agent at Aidocr actually does.
The flip side: a system that plans by itself needs boundaries. It has to be clear which systems it may read, where it may write and when it hands over to a human. Without those boundaries you do not get an assistant, you get a risk. And without the structure from stage 4, an agent merely plans more elegantly in the dark.
Which stage is my system on?
You do not need to look at the architecture for this. Daily use reveals it, if you watch for the right symptoms.
| What you observe | Points to |
|---|---|
| The answer cites a document that has been superseded for years | Stage 1 |
| Hits improve markedly as soon as you phrase the question differently | Stage 1 or 2 |
| Questions with two conditions (which unit, and who is responsible) stay half answered | Stage 3 at most |
| Asset, contract and responsibility appear correctly in one answer, with sources | Stage 4 |
| The system flags a gap or a contradiction on its own | Stage 5 |
A second, harder test: ask the same question twice, once with the technical term and once in everyday language. If the answers differ in substance, the system works at text level. A system with a graph underneath arrives at the same object for both phrasings.
Which stage do you actually need?
The honest answer: the lowest one that answers your questions. Every stage costs effort to build and maintain, and an elaborate system answering questions nobody asks is expensive standstill. The useful question is therefore not which stage you would like to have, but which kind of questions actually come up in operations.
| Typical question | Stage required |
|---|---|
| Where does it say that? What does this document state? | 1 to 2 |
| Summarise this contract for me | 1 to 2 |
| Pull the same information together from two systems | 3 |
| What applies today, and who is responsible for it? | 4 |
| Check the change order against the bill of quantities and flag deviations | 5 |
In building operations the centre of gravity sits almost always in the bottom two rows, and that is why pure document chats disappoint there so often. Anyone who wants to know what applies today, who is responsible and what depends on what is asking relationship questions. On stages 1 to 3 those questions are not hard to answer, they are structurally unanswerable.
Conversely: the stages do not have to be worked through in order, and the highest one is rarely needed everywhere. A sensible setup is often mixed. For manuals, standards and minutes a good stage 2 is enough. For assets, contracts and responsibilities stage 4 is needed. And only where a process has to be checked repeatedly does stage 5 pay off.
What each stage presupposes
The stages differ less in the technology involved than in what has to be settled beforehand. Stages 1 and 2 essentially presuppose access to documents and a workable permission model. Stage 3 additionally presupposes interfaces and a decision about which system is the system of record for which information. Stage 4 presupposes an ontology, that is, an agreement on what an asset, a property and a contract actually are in your organisation. Stage 5 presupposes all of that plus clear boundaries on what the agent may do.
The most important sentence about preparation: data quality beats stage. A system on stage 2 with cleanly maintained asset master data delivers better answers than one on stage 4 built on contradictory identifiers. Why the operational layer in building operations is particularly prone to this is described in why generic AI does not really understand building data.
What stage 5 does not solve either
Three things remain open regardless of stage. First: no system can find what was never written down. If the link between an asset and its contract only exists in the property manager's head, no architecture helps. Second: contradictions between sources become visible but are not resolved. A good system shows both versions and states that they conflict. Which one is right is decided by a human.
Third: responsibility does not transfer. An answer with a source is a basis for a decision, not the decision. That is not a legal precaution but a design rule. Systems built so that their reasoning stays traceable get used. Systems that present a result without a path are never touched again after the first mistake.
And Aidocr?
This is exactly where we work. Aidocr connects existing sources into a knowledge graph with an ontology for construction and real estate, and lets agents work on that structure. The existing systems remain the system of record, nothing is migrated. Every answer carries its source, so that the decision stays with people.
Frequently asked questions about the RAG stages
- What are the five stages of RAG?
- Naive RAG (similarity search across text chunks), advanced RAG (better preparation before and after the search), modular RAG (decomposing the question across several sources and tools), GraphRAG (a knowledge graph with explicit relationships) and agentic RAG (the system plans its own path and checks intermediate results).
- Where does the classification into RAG stages come from?
- From two surveys. Gao and colleagues describe naive RAG, advanced RAG and modular RAG as development stages in 2023. Singh and colleagues continue the line in 2025 and add graph RAG and agentic RAG, which they further subdivide into single-agent, multi-agent and hierarchical architectures.
- What is the difference between naive RAG and advanced RAG?
- Both search text chunks by meaning. Advanced RAG prepares the question beforehand, for example through synonyms and rewrites, and re-scores the hits afterwards. That lifts hit quality significantly but does not change the fact that the system only knows texts, not relationships.
- What is modular RAG?
- Modular RAG decomposes a question and routes the parts to different sources and tools, for instance a database query into the CAFM system and a text search in document management. The connection between the sources has to be established beforehand, the system does not recognise on its own that two systems refer to the same object.
- When is GraphRAG worth it?
- As soon as questions concern relationships: what belongs to what, what applies today, who is responsible. In building operations that is the normal case, because documents continuously supersede each other and validity is a relationship with a date, not a text similarity. For pure lookup questions in manuals the effort rarely pays off.
- What is agentic RAG?
- Agentic RAG describes systems that plan the path to the answer themselves. They decide which source to query first, evaluate intermediate results, ask follow-up questions and report gaps. On the stages below, that sequence is fixed in advance.
- What is multi-agent RAG?
- One architecture of agentic RAG in which several specialised agents share the work, for example one for contracts and one for technical assets. The literature also distinguishes single-agent systems and hierarchical systems, in which a superordinate agent coordinates the others.
- Which stage does a building operations organisation need?
- Usually a mix. For manuals, standards and minutes stage 2 is enough. For assets, contracts and responsibilities stage 4 is needed, because those are relationship questions. Stage 5 pays off where a process has to be checked repeatedly, for instance in change order review.
- Does a higher stage automatically mean better answers?
- No. Every stage costs effort to build and maintain, and without clean master data a system on stage 4 gives worse answers than a well-maintained one on stage 2. A half-maintained knowledge graph is particularly tricky, because it looks authoritative and is not.
- Do the stages have to be worked through in order?
- No. The stages describe architectures, not a project plan. What makes sense is a setup shaped by the kind of question: the lowest stage that answers the questions actually arising, and more only where the questions require it.
Sources
- Gao, Y. et al. (2023): Retrieval-Augmented Generation for Large Language Models: A Survey. arXiv:2312.10997. arxiv.org/abs/2312.10997
- Singh, A. et al. (2025): Agentic Retrieval-Augmented Generation: A Survey on Agentic RAG. arXiv:2501.09136. arxiv.org/abs/2501.09136
- Sequeda, J., Allemang, D., Jacob, B. (2023): A Benchmark to Understand the Role of Knowledge Graphs on Large Language Model's Accuracy for Question Answering on Enterprise SQL Databases. arXiv:2311.07509. arxiv.org/abs/2311.07509