Retrieval-Augmented Agents
Retrieval-augmented agents decide what to look up, when to look it up, and how far to follow the evidence before acting.
Classic RAG retrieves a fixed set of chunks before a model answers. Agentic RAG exposes retrieval as a tool inside the loop. The agent can search, inspect, reformulate, follow links, stop early, or branch into subagents.
Spectrum
| Pattern | Control | Best for |
|---|---|---|
| Naive RAG | fixed top-k retrieval | simple factual Q&A over stable corpus |
| Enhanced RAG | routing, rewriting, reranking, self-correction | production Q&A with known failure modes |
| Agentic RAG | model chooses retrieval steps and iteration | open-ended research, debugging, multi-hop questions |
Enhanced RAG is not obsolete. If the task is narrow and repeated, a tuned pipeline can beat an agentic loop on cost and predictability. Agentic retrieval earns its cost when the task is ambiguous, multi-hop, or likely to need query reformulation.
The reviewed @_avichawla visual keeps the terms clean: standard RAG embeds data, stores vectors, retrieves context, then calls the LLM; Graph RAG adds entity and relationship extraction plus a graph database before retrieval; Agentic RAG wraps retrieval tools such as web search, databases, and APIs inside an LLM agent loop. Treat it as a mental model, not a package recommendation. Source: X/@_avichawla, 2026-05-27; Source: local video artifact review, 2026-07-03
Agentic Retrieval Loop
The key design choice is the stopping rule. A good retrieval agent knows when it has enough evidence. A bad one keeps searching until the prompt smells like a browser history.
Kevin's Wiki as Agentic RAG
The wiki is not just docs. It is Kevin's retrieval substrate:
_index.mdis the catalog.- qmd is hybrid search over the corpus.
- backlinks and
related:fields provide graph traversal. - timelines preserve evidence.
- compiled truth gives the current answer.
- external sources fill freshness gaps.
The agent decides whether to use exact search, semantic query, page reads, backlinks, or web verification. That is agentic retrieval in practice.
Failure Modes
- Retrieving when not needed: wastes tokens and may introduce irrelevant context.
- Single-query myopia: first query phrasing misses the right page.
- Chunk without page context: answer loses the actual article's purpose.
- Citation laundering: citing a page that cites another source without checking the root claim.
- Stale index: qmd returns old chunks after docs changed.
- No write-back: useful synthesis disappears after the session.
Evaluation
Evaluate retrieval and generation separately:
- Retrieval: did the agent find the right source pages?
- Selection: did it read enough and avoid noise?
- Generation: did the final answer faithfully use the sources?
- Write-back: did reusable synthesis update the wiki?
This is why qmd update && qmd embed is part of the maintenance loop after broad edits.
Timeline
- 2026-07-03 | Deep-reviewed the RAG/Graph RAG/Agentic RAG video artifact and saved the distinction as a mental model: vector retrieval, graph-backed retrieval, and tool-using retrieval agent. Source: X/@_avichawla, 2026-05-27
- 2026-06-18 | Expanded with the agentic retrieval loop, qmd/wiki mapping, failure modes, and evaluation split. Source: User request, 2026-06-18
- 2026-05-31 | Page created from the arXiv "Is Agentic RAG worth it?" comparison and Anthropic's static-vs-dynamic retrieval framing. Source: https://arxiv.org/pdf/2601.07711, 2026-05-31
- 2026-05-27 | High-engagement visual explainer of RAG vs Graph RAG vs Agentic RAG reinforced the naive/enhanced/agentic spectrum. Source: X/@_avichawla, 2026-05-27