Review & debugging

An agent’s final answer is wrong.

Reading the tool-call transcript, you see it called search with the query field left empty.

  1. AFix the root cause: why the query argument was built empty
  2. BAdd a line to the prompt telling the model to “try harder”
  3. CSwap in a larger model and re-run
  4. DRetry the same run and hope the query fills in

Answer: A

Fix the root cause: why the query argument was built empty

Why

The transcript already located the bug: a malformed tool call with an empty query. Fix why the argument is empty - a poor tool schema, a bad template, or missing state. Vague prompt nudges, a bigger model, or a blind retry ignore the concrete evidence in front of you.

More on this topic

More on Way of the Agent

Real situations from building agents - with the answer and why.

Solve a new one every day on the Path