RAG
Agentic RAG
Retrieval as a tool the model calls, possibly several times, deciding what to search next.
What it is and why it exists
Instead of one fixed retrieve-then-answer pass, the model plans queries, inspects results, reformulates, searches other sources and stops when it has enough. Better on complex questions; slower, costlier and less predictable.
Quick prototype
Give an agent a search tool.
In production, at scale
Bounded loops (max searches, token budget), tools per source with clear descriptions, results summarised before re-entering context, and routing so simple questions take the one-pass path.
Vendors and tools
| LangGraph / LlamaIndex agents | Agentic retrieval loops |
|---|---|
| OpenAI file search / web search tools | Hosted retrieval tools |
On AWS: Bedrock Agents with Knowledge Bases as a tool; AgentCore for custom agent runtimes.
How it fails
- Searching ten times for simple questions
- Loops that keep re-querying the same thing
What the interviewer asks next
One-pass RAG or agentic RAG?
One-pass for the majority of direct questions (fast, cheap, predictable); agentic for multi-part research questions, routed by a classifier.