Skip to content
LinkedInX

What is Agentic RAG?

About 10 minutes

Prerequisites: What is RAG and What is an AI agent?

Agentic RAG is a design in which retrieval, reading, and verification are not handled by a fixed pipeline but instead planned and executed by an AI agent that adapts to the situation. Rather than simply searching documents, the agent decides what to investigate, whether the retrieved evidence is sufficient, and which source to consult next.[1]

In conventional RAG, the developer fixes the retrieval procedure.

graph LR
    Q["Question"] --> R["Retrieve"]
    R --> C["Evidence"]
    C --> G["Generate"]
    G --> A["Answer"]

In Agentic RAG, the agent treats retrieval not as a single operation but as a sequence of actions that unfolds over multiple steps.

graph TD
    Q["Question"] --> Plan["Investigation plan"]
    Plan --> Tool["Select retrieval tool"]
    Tool --> Observe["Observe results"]
    Observe --> Judge["Is evidence sufficient?"]
    Judge -->|Insufficient| Refine["Refine query / try another source"]
    Refine --> Tool
    Judge -->|Sufficient| Verify["Verify evidence"]
    Verify --> Answer["Generate answer"]

The critical difference is that an LLM participates in the retrieval decision-making process.

DimensionConventional RAGAgentic RAG
Number of retrievalsFixedAdjusted as needed
SourcesFixed in advanceSelected per question
QueryPrimarily one rewriteRefined based on observed results
VerificationLight check after generationEvidence gaps and contradictions checked mid-process
ScopeFAQ, single-document searchInvestigation, analysis, multi-source integration

Once RAG is deployed in production, complex questions become the main challenge — not simple ones.

Consider the following question.

From the customer inquiries of the past three months, classify the product issues
likely to lead to churn, and organise the related existing tickets with suggested
response priorities.

This question contains multiple subtasks.

  1. Find only the inquiries from “the past three months.”
  2. Extract inquiries related to churn risk.
  3. Classify by product issue.
  4. Cross-reference with existing tickets.
  5. Assess response priority.
  6. Summarise with supporting evidence.

A single vector search is not enough. An investigation plan, multiple retrievals, cross-referencing, and verification are all required.

Agentic RAG is composed of the following components.

ComponentRole
PlannerDecomposes the question and determines the investigation steps
Tool RouterSelects which retrieval tools and data sources to use
Retriever ToolsKeyword search, semantic search, database queries, web search, and so on
ReaderReads retrieved documents and extracts the relevant portions
CriticEvaluates sufficiency of evidence, contradictions, and citation accuracy
MemoryRetains discoveries made during investigation, reasons for excluding sources, and already-read documents
GeneratorProduces the final answer from verified evidence

This structure mirrors how a human researcher works: search first, read what is found, adjust the search if the results are insufficient, then organise the evidence before answering.

Retrieval quality is assessed; if it is poor, corrections are applied. This is closely related to the CRAG design.[2]

graph LR
    Q["Question"] --> R["Retrieve"]
    R --> E["Evaluate retrieval quality"]
    E -->|Good| G["Generate"]
    E -->|Ambiguous| RR["Re-retrieve"]
    E -->|Poor| WS["Search alternative source"]
    RR --> E
    WS --> E

Suited for FAQ, medical, legal, or internal policy search scenarios where retrieval failure directly affects answer quality.

A design that follows a chain of evidence in sequence.

Question: How did the pricing policy for Product B change after Company A's acquisition?

1. Find when Company A was acquired.
2. Search for Product B documents published after the acquisition.
3. Extract changes to the pricing policy.
4. Compare with pre-acquisition documents.

The first retrieval result becomes the condition for the second retrieval. Fixed top-k search alone tends to miss questions of this type.

Uses not only document retrieval but also APIs, SQL, calculations, and code execution.

ToolExample
SQLAggregate sales figures, usage statistics, or logs
Web searchVerify public or recent information
File searchFind documents in internal repositories
Code executionPerform numerical analysis or run tests
Browser controlAccess information on web interfaces

RAG expands from “document retrieval” to “tool use for obtaining evidence.”

Research such as A-RAG (2026) points toward having LLMs interact directly with hierarchical retrieval interfaces.[4]

For example, an agent might be given the following tools.

  • Keyword search
  • Semantic search
  • Reading a chunk’s content
  • Reading an entire section
  • Expanding related documents

The agent can search broadly first, then read deeply only where needed — similar to how a human scans a table of contents before turning to the relevant page.

A question can be decomposed and investigated in stages. Where conventional RAG tries to find an answer in one shot, Agentic RAG performs exploration toward the answer.

The agent can choose sources appropriate to the question — official documentation for product specifications, tickets for incident information, a database for usage data, and the web for recent public information.

When retrieved evidence is weak, the agent can adjust the query or try a different source. This makes recovery from failure easier compared with a fixed pipeline.

The agent can record every retrieval action taken, which evidence was accepted, which was rejected, and why. In business contexts, “why this answer was produced” is sometimes more important than the answer itself.

Agentic RAG is powerful, but a poorly designed implementation can be dangerous.

RiskDescriptionMitigation
Cost overrunMultiple rounds of retrieval, generation, and verificationSet maximum step counts, budget limits, and timeouts
LatencyMulti-step processing slows responsesUse parallel retrieval, caching, and early termination
Runaway loopsAgent continues unnecessary retrieval or actionsDefine explicit action rules and stopping conditions
Permission leakageAgent accesses sources it should notEnforce user permissions at the retrieval layer
Evidence conflationContradictions across multiple sources go undetectedVerify per citation and surface contradictions explicitly
Prompt injectionAgent follows instructions embedded in retrieved documentsTreat retrieved documents as reference material, not commands

More autonomy does not always mean better outcomes. In business contexts, the tools available, sources accessible, step count, and response format should all be explicitly constrained.

Permitted:
- Product documentation search
- Ticket search
- FAQ search

Prohibited:
- Searching customer data outside the user's permission scope
- Sending confidential information to external web endpoints
- Making assertions without evidence

Record not only the final answer but also the intermediate retrieval steps.

  • Generated sub-queries
  • Sources used
  • Evidence accepted
  • Evidence rejected
  • Reasons for re-retrieval
  • Citations in the final answer

Logs make it substantially easier to diagnose incorrect answers and drive improvements.

Even with Agentic RAG, the system must be able to decline answering when evidence is insufficient.[3]

The available evidence is not sufficient to draw a conclusion.
The missing information is: contract plan and target version.

An agent that always attempts an answer — regardless of evidence — is dangerous no matter how capable its retrieval is.

Evaluation of Agentic RAG must cover the agent’s actions, not only the final answer.

Evaluation dimensionWhat to check
Retrieval SuccessWere the necessary documents found?
Tool ChoiceWas the right source selected?
Step EfficiencyDid the agent over-retrieve unnecessarily?
Evidence FaithfulnessIs the answer faithful to the evidence?
Citation AccuracyDo the citations actually support the answer?
Refusal QualityDid the agent decline appropriately when evidence was insufficient?

Does Agentic RAG replace conventional RAG?

Section titled “Does Agentic RAG replace conventional RAG?”

Agentic RAG does not replace all forms of RAG.

For simple FAQ, short internal policy lookup, and finding the relevant section of a product manual, Advanced RAG is often sufficient. Agentic RAG becomes necessary when the retrieval process itself is complex: investigation, comparison, multi-source integration, and code understanding.

Question typeRecommended approach
”How do I change my password?”Advanced RAG
”What causes this error code?”Hybrid search + reranking
”Classify the inquiry trends from the past month.”Agentic RAG
”How do I modify the authentication logic in this repository?”Code RAG + Agentic RAG
”What are the main themes across all internal documents?”Graph RAG or Agentic RAG
  • Agentic RAG is a form of RAG in which an agent plans the retrieval, reading, and verification process.
  • It is suited to complex investigation, multi-source tasks, code understanding, and situations requiring re-retrieval.
  • The greater flexibility requires careful attention to permissions, logging, stopping conditions, and refusal design.
  • In practice, a realistic approach is to introduce Agentic RAG only where Advanced RAG falls short.
  1. Agentic Retrieval-Augmented Generation: A Survey on Agentic RAG
  2. Corrective Retrieval Augmented Generation
  3. Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection
  4. A-RAG: Scaling Agentic Retrieval-Augmented Generation via Hierarchical Retrieval Interfaces