An agent’s final answer is wrong.
Reading the tool-call transcript, you see it called search with the query field left empty.
- AFix the root cause: why the query argument was built empty
- BAdd a line to the prompt telling the model to “try harder”
- CSwap in a larger model and re-run
- 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 Way of the Agent
- Course programThe first three modules are free: start in the browser or the app, no card needed.
- Library: guides, skills and promptsReady prompt templates, grouped into collections.
- AI ChroniclesSourced stories from the history of AI.
- ConceptsPlain-language explainers of agent engineering.
- Learn AI agentsApps and courses for learning AI agents, compared honestly.
Real situations from building agents - with the answer and why.
Solve a new one every day on the Path