Agentic RAG
Move beyond static retrieval. Agentic RAG puts autonomous agents in control of the retrieval pipeline — dynamically planning queries, reflecting on results, and orchestrating multi-source knowledge.
RAG Learning Path
This lesson focuses on how agents control retrieval — routing, reflection, and multi-source orchestration. For the retrieval engine itself (chunking, hybrid search, reranking, evaluation), see P13: Industrial RAG. For the pre-built graph alternative to live agentic exploration — and when it wins versus loses — see P17: GraphRAG.
The Evolution of RAG
RAG has evolved through three distinct stages:
Stage 1: Static RAG (Naive)
Query → Retrieve → Generate → Done
Single retrieval, single generation. No feedback loop.
Stage 2: Iterative RAG (Advanced)
Query → Retrieve → Check → Re-retrieve → Generate
Multi-step retrieval with predefined pipelines.
Stage 3: Agentic RAG (Autonomous)
Query → Agent decides strategy → Retrieve/Search/Ask
→ Reflect on quality → Adjust → Generate
Agent controls the entire workflow dynamically.Why Agentic RAG?
Traditional RAG fails on complex queries because it treats retrieval as a one-shot black box. Agentic RAG solves this by adding four key capabilities:
| Capability | What It Does | Example |
|---|---|---|
| Reflection | Self-assess retrieval quality | "These results don't answer the question — I need to reformulate" |
| Planning | Decompose complex queries | Break "compare X vs Y" into sub-queries for each |
| Tool Use | Orchestrate multiple retrieval sources | Vector DB + Web search + SQL query + API call |
| Multi-Agent | Specialized agents collaborate | Retriever agent + Fact-checker agent + Synthesizer agent |
Architecture Patterns
Single-Agent Agentic RAG
One agent controls the full retrieval-generation cycle with dynamic routing: