Agentic RAG
Also called: agentic retrieval-augmented generation
Agentic RAG is retrieval-augmented generation restructured as an agent loop: instead of retrieving once and generating, the model plans a query, retrieves, judges whether the results are sufficient, reformulates or switches sources, and repeats until it can answer.
Classic retrieval-augmented generation is a fixed two-step pipeline: embed the user's question, pull the top matching chunks from a vector store, and stuff them into the prompt for the model to answer from. It works well when the answer sits in one place and the question is phrased close to the source. It struggles with multi-hop questions, ambiguous phrasing, or cases where the first search misses.
Agentic RAG makes retrieval a decision the model drives, inside a loop. The model plans what to look for, issues a retrieval call as a tool (function-tool-calling), reads the results, and judges: is this enough to answer, or do I need to search again with a better query, or query a different source? It might decompose a question into sub-questions, retrieve for each, and combine. The structure is the agent-loop / react-prompting pattern applied to search.
By 2026 this is a mainstream production pattern rather than a research curiosity. The tradeoff is cost and latency — several model calls and retrieval round-trips instead of one — plus a need for guardrails so the loop terminates. It's used when questions are genuinely multi-step or the knowledge is spread across sources, and plain RAG is still the right choice when they aren't.
How it works
The loop typically covers: planning (what information is needed, broken into sub-queries if useful); routing (which index, database, API, or web search is the right source for each part); retrieval via a tool call; evaluation (are the results relevant and sufficient? the model or a separate check decides); and reformulation (rewrite the query, try another source, or narrow/broaden) before looping again. It exits when the model judges it has enough, or a step budget is hit. Compared with plain RAG, the extra machinery is the model's control over query formulation, source choice, and stopping — none of which are fixed in advance.
Example
Question: "Did the framework our payments service depends on change its license after the version we pinned?" Plain RAG retrieves chunks about the framework's license and likely answers from whatever it finds. Agentic RAG plans two sub-questions — which version is pinned, and what the license history is — retrieves the lockfile for the first, retrieves the framework's changelog and license file for the second, notices the changelog reference is ambiguous, re-queries for the specific version range, and only then answers, citing both sources.
How it differs
Agentic RAG vs. classic RAG: classic RAG does one embedding search and passes the top-k chunks to the model in a fixed pipeline. Agentic RAG lets the model iterate — rewrite queries, choose among sources, decompose the question, and decide when to stop — at the cost of more model calls, higher latency, and the need to bound the loop.
Common misconceptions
FAQ
What is agentic RAG?
How is agentic RAG different from normal RAG?
When should you use agentic RAG?
Last checked: 2026-08-30