|
|
Agentic RAG - Combining Agents and Retrieval
Author: Venkata Sudhakar
Standard RAG is a fixed pipeline: retrieve then generate. Agentic RAG gives the LLM control over when and how to retrieve, enabling it to decide whether to search, what to search for, and whether the retrieved results are sufficient or require a follow-up query. This produces more accurate answers for complex multi-hop questions that cannot be resolved with a single retrieval step. In Agentic RAG, retrieval is a tool the agent can call multiple times with different queries, rather than a fixed preprocessing step. The agent can retrieve product specs from one knowledge base, warranty policies from another, and then combine both to answer a complex customer question - all in a single agent run. The below example builds an Agentic RAG system using Google ADK where a ShopMax India customer service agent uses a retrieval tool to answer product and policy questions dynamically.
It gives the following output,
The Sony WH-1000XM5 headphones at ShopMax India come with a
1-year manufacturer warranty. If the headphones are defective,
you can return them within 10 days with free pickup arranged
by ShopMax. An extended 2-year warranty is also available
for additional coverage.
The agent called both search_products and search_policies independently, then combined the results into a coherent answer. Unlike static RAG, the agent decided which tools to call and in what order based on the question. Use Agentic RAG for ShopMax customer queries that span multiple knowledge domains - product specifications, pricing, policies, and availability - where a single retrieval step would be insufficient.
|
|