1:1 Mentoring with Big Tech AI Engineers
System Design
33

Advanced RAG Patterns

Agentic RAG (Tool-Augmented Retrieval)

Basic RAG follows a fixed retrieve-then-generate pattern. Agentic RAG gives the LLM agency to decide when, what, and how many times to retrieve. The model acts as an autonomous agent that can use retrieval as a tool, chain multiple searches, and synthesize across sources — much like a human researcher.

AspectNaive RAGAgentic RAG
Retrieval DecisionAlways retrieves (even for "hello")Agent decides if retrieval is needed
Retrieval IterationsSingle-shotMulti-step, iterative refinement
Tool UsageVector search onlyVector search + SQL + API + web search
Query FormulationUses raw user queryRewrites query, decomposes into sub-queries
Source SelectionSingle indexRoutes to appropriate knowledge source
Failure HandlingReturns whatever it getsDetects low-quality retrieval, retries or falls back

Continue Reading

This topic continues with more in-depth content, code examples, and diagrams. Sign up free to unlock the full guide with all 87 sections.

Sign Up Free to Unlock

Free access · No credit card required

More in System Design

Get full access to all 87 sections with code examples, diagrams, and interactive animations.

Sign Up Free