What is agentic retrieval-augmented generation (Agentic RAG)?

Agentic RAG is a form of RAG in which the language model plans the question, splits it into sub-questions, makes several retrievals and tool calls and combines the results into an answer.

It differs from naive RAG in flow: naive RAG retrieves and generates in one step, while in agentic RAG the model decides in a loop what to search, whether results suffice and which tool to call. For simple questions the multi-step flow adds needless cost and latency.

Topic
Embeddings, document processing and RAG
Also known as
Agent-based RAG

How agentic retrieval-augmented generation (Agentic RAG) works

  1. The model examines the question and splits it into sub-questions where needed (query decomposition).
  2. It writes a retrieval query for each; if results fall short, it rewrites the query or turns to another source.
  3. Where needed it uses tool calling to run a database query, perform a calculation or fetch data from another system.
  4. It weighs what it gathered, flags contradictions and writes one sourced answer; the loop stops at a set step limit.

In more detail

Indirect prompt injection and tool safety

Retrieved chunks from untrusted or external-origin documents can embed hidden instructions (indirect prompt injection) that hijack the agent's planning loop into calling sensitive tools or leaking data. Production deployments therefore separate retrieval content from system instructions, enforce strict tool-argument schemas and block high-risk tool invocations without explicit policy checks.

Query routing and latency budgeting

To avoid triggering multi-step loops on trivial lookups, enterprise systems place a lightweight query router or complexity classifier before the agentic loop. Simple factual queries go straight to single-pass hybrid search, while multi-hop or cross-system questions enter the iterative agentic pipeline with a strict token and latency budget.

Trajectory evaluation and observability

Evaluating agentic RAG requires measuring not only final answer faithfulness and relevance, but also trajectory quality: retrieval recall per sub-question, unnecessary tool calls and step efficiency. Continuous trace logging enables teams to spot dead-end query rewrites and tune prompts or index schemas systematically.

Hybrid search and standard connector protocols

Enterprise agentic RAG increasingly pairs hybrid search (dense vectors plus BM25 keyword search and cross-encoder reranking) with standardised protocols such as the Model Context Protocol (MCP) to connect uniformly to internal databases, ticket systems and document stores.

Commonly confused terms

TermHow it differs
Adaptive or corrective RAGAdaptive or corrective RAG typically uses lightweight routing or relevance checks (e.g., deciding whether to retrieve or fall back to web/internal search) within a mostly fixed pipeline. Agentic RAG gives the model broader autonomy to decompose tasks, invoke heterogeneous tools and loop dynamically.
General-purpose AI agentA general AI agent may execute side-effecting actions across external systems (sending emails, updating records) as its primary goal. Agentic RAG is scoped specifically to iterative information gathering, verification and grounded synthesis to answer queries.

Why agentic retrieval-augmented generation (Agentic RAG) matters for on-premises AI

For enterprise questions spanning several sources and steps it can gather what classic RAG misses. Loop length drives compute cost and latency, so step and time limits are set to in-house capacity. The user's permissions must apply to every retrieval and tool call; the agent must not reach systems the user cannot access using its own rights. Sources used at each step are logged for audit.

ON-PREMISES EXAMPLE

When a fault ticket arrives, a telecoms company's maintenance assistant first looks up the fault code, then retrieves network topology and past cases from in-house systems and offers a sourced fix.

Common questions

When is agentic RAG better than classic RAG?

When the answer needs information from several sources or steps, such as finding a record and then the related procedure and past cases. For simple single-source questions classic RAG is enough.

How is agentic RAG's cost capped?

Limits are set on steps, tool calls and total tokens; simple questions are routed straight to a classic RAG flow.

Sources

Related page on this site: Related FAQ · In the glossary: Glossary, A to D

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.