Back to glossary

Term

Agentic RAG

Agentic RAG is a RAG architecture in which an agent drives retrieval — it decomposes the question, searches iteratively, checks the hits, and decides itself whether a second or third pass is needed.

Agentic RAG — explained in detail

Classic RAG is a single pass: embed the question, fetch top-k, generate an answer. Agentic RAG wraps that flow in a loop controlled by an agent that decides at each step: Are these hits relevant? Is the context enough? Should the query be rephrased? Are other tools (web search, SQL, code execution) needed? Only when the agent is satisfied is the final answer generated. Retrieval shifts from a static step to a dynamic process with self-correction built in.

Example / Practical use

A typical flow for a multi-hop question over a legal corpus: 1) Decomposition — the agent splits the query into sub-questions. 2) Iterative retrieval — for each sub-question, fetch, check relevance, rephrase the query if needed. 3) Synthesis — merge all contexts and generate the final answer. 4) Self-check — verify the answer against the original question. Frameworks in 2026: LangGraph (state machine), LlamaIndex Workflows, CrewAI for multi-agent setups. Realistic numbers from production guides: cost 0.02–0.10 USD per query versus around 0.001 USD for naive RAG, and latency of 2–8 seconds instead of 200 ms.

Agentic RAG is not the same as multi-query RAG (several search phrasings in parallel) and not the same as GraphRAG (a structured knowledge layer). The difference: agentic RAG is a control architecture — the underlying retrieval method can be vector search, BM25, GraphRAG, or hybrid. The added complexity only pays off for hard multi-hop questions or when accuracy is non-negotiable (legal, medical, finance). For simple factual queries, classic RAG is faster and cheaper.

Entdecke mehr

Themenuebersicht