A traditional retrieval pipeline does one thing: take a query, embed it, find the top-K nearest chunks, and hand them to the model. The model reads the chunks, writes an answer, and the loop ends. The retrieval step is a fixed lookup, executed once, before the model ever has a chance to think.

This pattern works for narrow questions with one correct answer. It works less well the moment a question becomes multi-hop, the corpus gets large, or the answer depends on joining two passages that do not look similar on embedding distance alone. The model is given a fixed slice of context and told to make the best of it. If the slice is wrong, the answer is wrong.

Agentic RAG is the discipline of letting the agent itself drive retrieval. Instead of treating search as a single pre-model step, the agent plans what to fetch, picks the tool to fetch it with (vector store, web search, SQL, file system), evaluates whether the result is good enough, and re-queries when it is not. Retrieval becomes part of the agent loop, not a separate phase that precedes it.

The shift is small in code and large in behavior. The cost is mostly paid in complexity: agentic RAG systems are harder to debug, slower per turn, and more likely to enter runaway retrieval loops if the success criteria are vague. The benefit is that they answer harder questions correctly more often, with the agent deciding when "enough context" has been assembled rather than the operator guessing in advance.

This article walks through what changes when retrieval becomes agentic, when the added complexity is worth it, and when a simple lookup is still the right answer.

What traditional RAG actually does

A traditional RAG pipeline is a static graph with three nodes and one path through it: query → embed → top-K retrieve → stuff into context → answer. Every step is fixed. Every step happens exactly once per turn. The model never gets a vote on whether the retrieved chunks are sufficient, whether the query needs reformulation, or whether a different tool would surface better evidence.

The good part: it is fast, predictable, easy to evaluate, and hard to break in unexpected ways. For narrow lookups — "find the section in this manual that talks about cron jobs," "which customer support ticket mentions a refund from Tuesday," "what does this contract say about termination clauses" — a well-indexed corpus with a fixed top-K retrieval beats most alternatives on cost and latency.

The bad part: the agent has no way to repair a bad retrieval. If the corpus has synonyms, idiomatic variants, or domain-specific vocabulary that the embedding model did not see at index time, the top-K chunks will be confidently wrong. The model will then confidently answer based on confidently wrong context. There is no self-correction step.

Traditional RAG is a lookup with extra steps. Agentic RAG is a loop with retrieval as one of its branches.

What changes when retrieval becomes agentic

Three things change in agentic RAG, and each one shifts where the system's complexity lives.

Retrieval becomes a tool call, not a stage. The agent has access to one or more retrieval tools — vector search, web search, structured query, file grep, API call — and decides at runtime which to invoke. A question about yesterday's earnings call might pull a transcript via web search. A question about a specific customer's billing history might pull from a SQL endpoint. A question about an internal process might pull from a vector store over the operator's docs. The same agent selects differently for different questions.

Query reformulation happens in the loop, not before it. A traditional pipeline embeds the user's raw query once. An agentic system can rewrite the query based on what it has already seen. "What was the Q2 revenue split by region?" becomes, after the agent reads the Q2 summary, "What was the Q2 EMEA revenue line item, in euros?" — a query the corpus is much more likely to match.

Sufficiency is checked before answering. The agent evaluates whether the retrieved context is enough to answer. If it is, the agent answers. If it is not, the agent queries again, possibly with a different tool, possibly with a reformulated question, possibly with a constraint like "find a passage that mentions the date." Only when the agent decides the context is sufficient does it generate the final response.

The pattern looks like this in plain prose:

1. Read the question. 2. Decide what kind of evidence would answer it. 3. Pick the right tool and fetch some. 4. Read what was fetched. 5. Ask: is this enough? 6. If yes, answer. If no, reformulate the query, pick a different tool, or query again. 7. Stop after a budgeted number of iterations, even if "enough" was never reached.

That loop is identical in shape to any other agent loop. The only thing that makes it "agentic RAG" is that the tool calls are retrieval calls and the budget is measured in fetches rather than dollars.

When agentic RAG earns its complexity

Agentic RAG is not a free upgrade. The added autonomy costs latency, determinism, observability, and the ability to debug a bad answer by replaying one retrieval. The question worth asking is: when does the benefit — better answers on hard questions — outweigh the cost?

Agentic RAG is worth it when:

  • The questions are multi-hop. "What did the third-quarter letter to shareholders say about the X division's revenue, and how does that compare to what management said on the Q3 call?" requires the agent to retrieve a letter, retrieve a transcript, and join them. A single-shot retrieval almost never lands both pieces in the same top-K.
  • The corpus is large and heterogeneous. A 10,000-document knowledge base with mixed structure (PDFs, markdown, tables, code) cannot be served by one embedding index. An agent that can pick between "search the vector store," "grep the docs folder," and "query the structured table index" finds what it needs more often.
  • The user's question is ambiguous and needs refinement. "Why is the build slow?" is not a retrieval query until the agent knows which build, which time window, and which system. A single-shot retrieval either gives up or hallucinates. An agent can ask the user, or infer from context, which subsystem is meant.
  • Freshness matters. Web search is a retrieval tool. An agent that can fall back to web search when its internal index is stale stays useful as the world changes. A static pipeline cannot.

Agentic RAG is not worth it when:

  • The corpus is small enough to fit in context.
  • The questions are narrow lookups with one correct answer.
  • The system runs on the hot path of a latency-sensitive application and cannot afford three retrieval calls per turn.
  • The operator does not have a clear definition of "good enough" — without one, the agent will keep retrieving until the budget runs out, which is a worse failure mode than answering with imperfect context.

What the agent loop looks like with retrieval as a tool

The simplest way to make retrieval agentic is to add it as a tool call inside an existing agent loop. The agent already has a model, a context, and a budget; retrieval becomes one more decision the agent can make during a turn.

A practical pattern:

  • The agent receives a question.
  • The system prompt lists available tools, including retrieval tools. Each tool has a clear contract: vector search over corpus X returns up to K passages with scores; web search returns up to N results with snippets; SQL over table Y returns rows matching a query.
  • The agent decides whether to call a tool, which tool, and with what arguments.
  • The tool returns. The agent reads the result.
  • The agent decides whether to call another tool, answer, or escalate.
  • The loop terminates on a budget (number of tool calls, total tokens, wall-clock time, or an explicit "answer now" tool call).

This is the same loop the agent uses for any other tool. The retrieval is not special. The only difference is that the corpus lives outside the agent's prompt and the call is expensive.

Two failure modes dominate in practice. The first is the runaway retrieval loop: the agent keeps querying because its success criteria are vague, and it never decides the context is sufficient. The second is the false sufficiency: the agent answers after one retrieval even though the corpus has more relevant evidence. Both are solved by making the success criterion explicit. "Find a passage that explicitly states the date and amount of the acquisition" is a better criterion than "find information about the acquisition." The first can be checked. The second cannot.

How to evaluate an agentic RAG system

A traditional RAG system has a clean evaluation surface: given a question and a gold answer, did the retrieved top-K contain the supporting evidence? That evaluation is well-defined.

An agentic RAG system does not. The retrieved chunks differ per run because the agent decides differently each time. The answer differs per run because the agent decides differently each time. Evaluation has to move up a level: given a question, does the system usually produce an answer that is correct, supported, and within budget?

A practical evaluation loop:

  • Hold-out question set. A few hundred questions with known correct answers, drawn from real operator workflows rather than textbook examples. Textbook questions are too easy.
  • Pass rate. What fraction of questions does the system answer correctly? Track this over time. A regression in pass rate is the early warning that something has shifted — corpus, embedding model, agent prompt, or tool availability.
  • Citation accuracy. Of the passages the agent cited, what fraction actually supported the answer? This is the second metric that catches the "confident wrong" failure mode.
  • Tool-call budget. What fraction of questions required more than N tool calls? This is the latency proxy. A system that answers 95% of questions correctly with one tool call is better than one that answers 99% correctly with five.
  • Runaway rate. What fraction of questions hit the maximum tool-call budget without producing an answer? This is the failure mode the system has to design against.

The metrics are coarser than traditional RAG metrics. That is the trade. The benefit is the system answers harder questions correctly. The cost is the operator has less certainty about any single run.

A worked example

Consider an agent supporting an operator who runs a small operations team. The agent has access to three retrieval tools: a vector store over internal SOPs, a structured query over the team's task database, and web search. The operator asks: "Why did last week's onboarding task fail for customer 4271?"

A single-shot RAG pipeline embeds the question, finds the top-K passages in the SOP corpus, and produces an answer from those passages. The result is a confident description of the standard onboarding flow with no specific reference to customer 4271.

An agentic RAG agent does the following:

1. Recognizes that "customer 4271" is a specific identifier and pulls that customer's task record from the structured store. Reads the failure log. 2. Recognizes that the failure mode is referenced in the SOP for the onboarding flow. Pulls the SOP section on known onboarding failure modes. 3. Notices that the failure happened during an external service call and queries the service status via web search. 4. Joins the three sources, identifies that the external service was down for 14 minutes during the customer's onboarding window, and answers: the onboarding task failed because the external service was unavailable during the relevant window; the SOP suggests retrying after a 30-minute delay.

The agent used three different tools. Each tool's output was a partial answer. The agent decided when to stop, when to switch tools, and how to join the results. The same loop, applied to a question that no static pipeline could answer correctly.

What this changes for operators

Three operator-level implications are worth naming.

First, the prompt matters more than the index. A traditional RAG system's quality is bounded by the embedding model and the corpus. An agentic RAG system's quality is bounded by the agent's ability to choose tools, reformulate queries, and judge sufficiency. That ability lives in the prompt. Investing in prompt engineering for the retrieval loop pays back more than re-indexing.

Second, the corpus needs to be queryable in more than one way. A flat vector store is a starting point. A system where the agent can choose between semantic search, lexical search, structured query, and external lookup will answer more questions correctly.

Third, success criteria must be explicit. The single biggest source of agentic RAG failure is vague success criteria. "Find information about X" is not a criterion; the agent cannot check it. "Find a passage that explicitly states the date and amount of X" is a criterion; the agent can check it. Operators who write good retrieval prompts write good retrieval success criteria. Operators who do not, get runaway loops.

What agentic RAG cannot fix

Agentic RAG is a structural improvement on retrieval, not a fix for bad data, bad indexing, or bad questions. If the corpus does not contain the answer, no amount of agentic reformulation will produce it. If the embedding model is poorly suited to the domain, the agent's reformulated queries will be poorly suited too. If the operator's questions are vague, the agent will spend its budget guessing.

The honest framing is: agentic RAG raises the ceiling on what a retrieval system can answer correctly, and it lowers the floor on how much the operator has to know about their own corpus to get good results. For some operators that is a win. For others — those with small, well-indexed corpora answering narrow questions — it is an expensive way to make a working system slower and harder to debug.

Related reading

  • Inside the Agent Loop — the loop structure that agentic RAG plugs into.
  • Loops vs Graphs — when a static retrieval pipeline is the right graph shape; when the agent needs to branch.
  • Agent Memory — short-term, long-term, semantic layers; semantic memory is the cousin of retrieval.
  • Graph-Based Memory — when retrieval needs to be entity-aware rather than chunk-aware.
  • Agent Loop — the basic shape every agentic system repeats.