Track 02 · RetrievalLesson 06 of 11
Retrieval that plans, checks and retries
When retrieval becomes an agent, and what each extra loop costs.
- Lesson library · reference
- 35 min read
- 75 min hands-on
- Halden Freight
- Pro
What you'll be able to do
01- Explain the difference between single-shot RAG and agentic RAG, and name the question types where single-shot fails.
- Design a retrieval planning loop with an explicit decide-to-retrieve step, an evidence sufficiency check, a retry policy and hard stopping criteria.
- Implement a CRAG-style evidence grader and a slot-based sufficiency check, and carry citations from the first retrieval to the final answer.
- Choose between vector, keyword, SQL, graph and web sources per step, and defend the choice in a design review.
- Bound the latency and cost of an agentic retrieval loop, and explain the bound to a customer's platform owner.
- Diagnose agentic RAG failures from a trace: wrong source, premature stop, retry loop, citation drift.
Before you start
- Hybrid search and reranking: you should know what a good single retrieval looks like before you chain several.
- Rewriting, routing and fusing queries: rewriting and routing are the building blocks the loop calls.
- ReAct, chain of thought and reflection in practice: the reasoning patterns the planner uses.
- Typed output: schemas, validation and tool calls: how the model emits a tool call.
- Answers with receipts: grounding and citations: the output contract the loop must satisfy.
The short version
Classic RAG runs one retrieval with the user's words and hands whatever comes back to the model. Agentic RAG treats retrieval as a set of tools the model chooses to call: it decides whether retrieval is needed, plans what to look for, picks a source, grades what came back, and retries with a better query or a different source when the evidence is weak. It stops when the evidence is sufficient, when a budget runs out, or when it stops making progress, and then answers with citations or abstains with the gap stated. The engineering work is not the loop itself. It is the grader, the sufficiency definition, the stopping policy and the budget, because those decide whether the system is accurate, affordable and predictable.
Key takeaways:
- Agentic RAG pays for itself on multi-hop, ambiguous and "the first query used the wrong words" questions. On simple lookups it only adds latency. Route simple questions to a fast path.
- Relevance is not sufficiency. A passage can be on-topic and still not answer the question. Define sufficiency as named information slots, each backed by evidence.
- Every loop needs hard limits: max steps, max tokens, wall-clock timeout and a no-progress detector. "The model will know when to stop" is not a stopping criterion.
- Carry provenance (document, chunk, version, source system) through every step in an evidence ledger. The final answer may only cite what is in the ledger.
- Evaluate the trajectory, not just the answer: steps per question, grader accuracy, abstention correctness, cost per answered question.
Pro lesson
The rest of this lesson is in Pro.
The mental model, worked example, field note, failure table, exercise and self-check, with the voice tutor.
- Every stage and specialisation, in full
- Every lab and every role project
- Halden weeks 2–10, on your record
- Every drill, live in the playground
- All solutions, plus the server judge
- Lab Assistant and every Teach with AI