Looking Is Not Picking: An Attention-Segment Account of Tool-Selection Failures in LLM Agents
Summary
A new analysis of LLM agent tool-selection failures reveals that models frequently attend to the correct tool but still mis-select it, refuting the common "crowded-harness" or "lost-in-the-middle" hypothesis. On real BFCL failures, the model attends most to the gold tool 80% of the time (compared to a 21% chance), with the correct tool being under-attended in only 10% of cases. This research localizes the failure to the decision readout, not the input harness. While input-side prompt repairs recover at most 23% of failures, readout-side interventions achieve 59-91% recovery. The study demonstrates that two distinct gold-pointed interventions, an additive attention-logit bias and a residual-stream steering vector, recover largely the same failures (Jaccard 0.865 pooled). Furthermore, a training-free, gold-free selector based on per-segment attention improved function-name selection by +11.9 points on BFCL and +14.9 points on Seal-Tools across five single-turn models, though it does not yet transfer to multi-turn contexts. The fix is specifically for function selection, not arguments.
Key takeaway
For AI Engineers optimizing LLM agent tool-selection, recognize that models often "see" the correct tool but fail at the decision readout. Focus your efforts on readout-side interventions, such as applying an attention-logit bias or a residual-stream steering vector, which significantly outperform prompt-based repairs. Consider implementing the training-free, gold-free attention-based selector for single-turn tool-calling tasks to boost accuracy by over 10 percentage points, but be aware it currently does not transfer to multi-turn scenarios.
Key insights
LLM tool-selection failures stem from decision readout, not attention, despite models often attending to the correct tool.
Principles
- LLM tool selection failures are a readout bottleneck.
- Attention to tools is a steerable control signal.
- Input prompt changes are less effective than readout interventions.
Method
Harness Attention Allocation (HAA) measures raw per-segment attention mass. An attention-logit bias or residual-stream steering vector can intervene at the readout. A confidence-gated selector uses per-segment attention.
In practice
- Implement readout-side interventions for tool selection.
- Use attention-logit bias for causal control.
- Apply a training-free, gold-free selector for single-turn tasks.
Topics
- LLM Agents
- Tool Selection
- Attention Mechanisms
- Readout Bottleneck
- Function Calling
- Model Interpretability
Best for: Research Scientist, NLP Engineer, AI Scientist, Machine Learning Engineer, AI Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by cs.SE updates on arXiv.org.