RAG & Agents Engineering

M25 lab, planning and replanning

A plan is cheap until a result is wrong.

One Larkspur Cloud question, three agents from lesson 25.1: ReAct, a fixed plan, and a plan that checks every step and replans. Each lookup searches the handbook. Mark a lookup whose first search returns the wrong chunk and watch which agent notices, and what noticing costs.

Press a lookup to make its first search return the wrong chunk

Three agents, one question

Counted per run

AgentLLM callsSearchesTokens readAnswer

Call ledger

Every call, in order

Agent
#CallReads or returnsTokens read

The prompts are the notebooks' own templates (01a and 01b), filled with this question and the handbook chunks. The models are scripted: the planner lists the lookups, the evaluator accepts a result only when it is the right chunk, the replanner rewrites the failed lookup once and keeps the rest, and ReAct is shown at its best, searching again after every wrong chunk. Tokens are prompt text at four characters per token; tool schemas are not counted.