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.
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. Evaluating it means checking the steps as well as the answer, see trajectory evals.
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.
