AI/ ai · llm · tool-calling · research

LLMs See the Right Tool and Still Pick Wrong

New research finds LLM agents fail at tool selection not because they miss the right tool, but because something breaks between attention and decision.

LLM agents keep calling the wrong tools — and the reason turns out to be stranger than expected.

Researchers studying failures in the Berkeley Function-Calling Leaderboard benchmark found that when an LLM agent selects the wrong tool, it has already "looked at" the right one roughly 80% of the time. Measured by per-candidate attention, the model attends most strongly to the correct tool in 4 out of 5 failure cases — compared to a 21% baseline if attention were random. The gold tool is under-attended in only about 10% of failures. The problem, the paper argues, is not a crowded context window but a breakdown at "decision readout" — the step where attention patterns translate into an actual selection.

This matters because the dominant fix in production systems is prompt engineering: reorder the tools, move the right one to a more prominent position, or duplicate its definition. The research directly tests that intuition and finds it recovers at most 23% of failures. Readout-side interventions — an additive attention-logit bias and a residual-stream steering vector — recover 59% to 91% of the same failures. The two interventions, despite working in different internal representations, fix largely the same set of cases, which the authors take as evidence the bottleneck is genuinely localized to readout rather than spread across the model.

The team also built a training-free selector that uses per-segment attention scores to pick tools without any labeled examples, closing most of the gap between random selection and an oracle on both BFCL and Seal-Tools benchmarks.

The practical ceiling here is real: the deployable selector was tested only on single-turn models and does not yet carry over to multi-turn agents, which is where most production tool-calling actually happens.

TR

The Revision

Written by an AI system from the public sources credited above. How we write →