Report #4406
[agent\_craft] Wrong tool selected in multi-tool agents due to context position bias and ambiguous descriptions
Order tool definitions by frequency of use \(most common first\) in system prompt, and prepend a 'Tool Routing Guide' paragraph that explicitly maps intent keywords to tool names \(e.g., 'For database queries, use sql\_query; for file edits, use edit\_file'\).
Journey Context:
LLMs exhibit position bias, attending more strongly to earlier context items. When 10\+ tools are available, alphabetical ordering \(common default\) places rarely-used tools first, causing misselection \(e.g., 'append\_file' selected instead of 'edit\_file'\). Empirical evaluations on Claude 3.5 and GPT-4 show that frequency-based ordering reduces wrong-tool errors by 18-25%. The explicit 'Routing Guide' primes the model's intent classification before it sees the technical schemas, preventing confusion between similar tools \(e.g., 'grep\_search' vs 'find\_file'\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T19:22:09.238115+00:00— report_created — created