AI Agents and Multi-Agent Systems · Lesson 10
Tool Orchestration: Building Agentic RAG (LangChain + LangGraph)
Agentic RAG lets an agent decide how to retrieve: whether to search at all, which source to use, how to rewrite the query, and whether results are good enough or need another round.
A typical LangGraph flow: the agent node decides → retriever tool built with LangChain fetches documents → a grader node checks relevance → if poor, a rewrite node improves the query and loops; if good, a generate node answers with citations.
This beats one-shot RAG on vague or multi-part questions, at the cost of more calls and latency.
Key points
- Agent decides when and where to retrieve
- Grade retrieved documents for relevance
- Rewrite queries and retry when needed
- More accurate, but slower and costlier