Agentic RAG
RAG where the model decides what to search for, reads the results and searches again if needed, instead of one fixed retrieval step.

Agentic RAG is retrieval where the model decides what to search for, reads the results and searches again if needed, instead of one fixed retrieval step. Search becomes a tool the model calls in a loop until it has enough to answer.
Classic RAG retrieves once and answers. In the agentic version, search is a tool: the model can rewrite the query, pick between sources, follow up on what it found and stop when it has enough. It handles multi-part questions better, at the cost of more model calls, more latency and less predictable behavior. Anthropic’s context engineering post describes the same shift as “just in time” retrieval, and a January 2025 survey maps the main designs, from a single agent to several cooperating ones.
Evaluating it means checking the steps as well as the answer, see trajectory evals. Cost varies per question, so track cost per task rather than per call. Use it when questions need several lookups; for simple FAQ answers, one retrieval step is cheaper and easier to test.
Sources
- Anthropic: Effective context engineering for AI agents anthropic.com
- arXiv: Agentic Retrieval-Augmented Generation: A Survey on Agentic RAG arxiv.org
Related terms
- RAG (retrieval-augmented generation): Finding relevant documents first and putting them into the prompt, so the model answers from them.
- Tool use (function calling): The model returns a structured request to run a function you defined; your code runs it.
- Trajectory evals: Tests that grade an agent’s whole path to an answer: which tools it called, in what order, how many steps and at what cost, not only the final output.
- Query expansion: Rewriting a user’s search into several fuller queries, with synonyms and related terms, before searching, so short or vague questions still find matches.
- GraphRAG: A RAG variant that builds a knowledge graph of entities and relations from documents and retrieves along it, not only by text similarity.
- Agentic loop: The cycle of model call, tool call and result that an agent repeats until it stops.
- Cost per task (agent unit economics): What one finished agent task really costs: tokens, retries, tool calls and the human time to review it, compared with doing it another way.
