VFlash: Fast, Accurate Visual Planning via Flash Primitive Decoding
u_Unrolled
D9: AI Agents & Tool Use · Capstone: A Research Agent with Tools and Memory — and Agentic RAG That Decides When to Search
Phase 5/Domain 9/Lesson 10

Capstone: A Research Agent with Tools and Memory — and Agentic RAG That Decides When to Search

10 min read·Advanced· Unrolled Pro
the research agent loop: question → plan → (answer from memory if confident | search → read → extract notes with citations → follow-up queries for missing hops) → stop when the plan's sub-questions are covered or the budget is spent → cited synthesis. Side panel: accuracy and cost per question for never-search, always-search and adaptive search.
Diagram— the research agent loop: question → plan → (answer from memory if confident | search → read → extract notes with citations → follow-up queries for missing hops) → stop when the plan's sub-questions are covered or the budget is spent → cited synthesis. Side panel: accuracy and cost per question for never-search, always-search and adaptive search.

You already know: agent loops, tools and memory (D9), advanced RAG and multi-hop retrieval (D8), agent security and budgets (D19, D9), evaluation of agents (D10 is next).

Why this matters for Atlas. Agentic RAG replaces a fixed pipeline with decisions: whether to search (some questions the model already knows, some it doesn't), what to search for (decomposing a multi-hop question), when to stop, and what to remember. Done well, it's more accurate and cheaper than searching for everything; done badly, it loops, burns budget, or answers from stale memory with confidence. This capstone builds the decision logic in a simulated environment where accuracy and cost can be measured, then shows the production loop with real tools.


1. When to search: the core decision

The question. Should the agent search for every question?

Start from nothing. Searching costs latency, tokens and money, and can even hurt (irrelevant passages distract). Not searching risks answering from outdated or missing knowledge. An adaptive policy searches when the model's confidence in its own answer is low, when the question concerns recent or private information, or when the answer must be cited. Confidence can come from the model's self-assessment, agreement between sampled answers (self-consistency), or a trained classifier; whichever you use, calibrate the threshold on an eval set by measuring accuracy and cost together.

That's the preview. The full lesson, with its code and exercises, is part of Unrolled Pro.
Staff AI & Pro Tier Lesson

Unlock "Capstone: A Research Agent with Tools and Memory — and Agentic RAG That Decides When to Search"

The foundations are free forever. Unrolled Pro unlocks the complete lesson, production architectures, and 55 battle-tested ML system design case studies.

Everything included with Pro:
All 234+ Deep-Dive Lessons across transformer internals, inference, RAG & agents
55 Staff-Level ML & System Design Case Studies with mathematical capacity estimates
AI Engineer Sheet & Exercises with worked solutions, self-checks, and code
100 Landmark Research Papers guided walkthroughs & progress tracking
14-Day Money-Back Guarantee — 100% full refund if you aren't satisfied
View Plans & Unlock All Lessons

From ₹167/mo (~$2/mo) · Cancel anytime · Instant activation

100% Risk-Free: 14-day no-questions-asked money-back guarantee
Build Atlas · Part 8 of 9: Let it actUse this lesson in the project: Give Atlas tools, memory and a loop, then put a gateway between the model and the tools so that a fooled model still can't do damage.