RAG & Agents Engineering

M23 lab, ReAct agents

Each observation picks the next search.

A support agent with one tool, search_handbook, over the twelve Larkspur Cloud chunks from the M10 lab. Retrieval is real TF-IDF, top 2 per search. The model is scripted: it writes the queries a model might write, reads each result, and stops when it has the evidence. Switch the wiring and move the call cap to see what the user receives.

Golden question
After the tools run
Model calls
Searches
Evidence retrieved
Context read, about this many tokens

The message list

State after the run

#MessageContent

Evidence chunks are in magenta. The queries come from the script; the chunks each search returns, the stop at the cap and the limit message are computed. The limit message is the text LangChain’s ModelCallLimitMiddleware writes. Tokens use the four-characters-per-token rule of thumb and add up what every model call reads.

The golden set at this setting

Golden questionEvidenceCallsUser gets
Mean, total

The M10 baseline row for the same questions, one top-2 retrieval each, has a mean recall@2 of 0.50.