Agentic RAG
Treat retrieval itself as an agent loop — the agent decides what to retrieve, critiques results, and re-queries — rather than a single upfront fetch.
This page is the complete instruction page for one pattern called "Agentic RAG." It explains the problem this pattern solves, the idea behind the solution, when you should (and should not) use it, and what happens afterward — both the good effects and the costs.
This matters because building AI agents is not just about making them clever. It is also about making them safe and predictable. Following a well-tested pattern like this one helps avoid common mistakes, and shows you exactly which safety rules and regulations it connects to, listed under "Standards Mesh" on this page.
Context
Complex questions often require iterative retrieval: first finding context, then following references, then retrieving details. One-shot RAG misses what it did not initially query for.
Problem
Static retrieval limits coverage on multi-hop or exploratory questions.
Forces
- Latency vs thoroughness
- Cost of additional retrievals vs answer quality
Solution
Expose retrieval as a tool the agent can call iteratively. The agent plans queries, reviews retrieved content, formulates follow-up queries, and terminates when sufficient evidence is gathered. Cap iteration depth.
Applicability
- Research agents
- Multi-hop Q&A
- Due-diligence agents
Anti-Patterns
- Unbounded iteration
- Retrieval decisions left entirely to the model without quality checks
Consequences
- +Better coverage of complex questions
- +Adapts to what is and is not in the corpus
- −Higher latency
- −Harder to predict cost