Report #87057
[synthesis] Tool Selection Bias in Large Tool Repositories
Dynamically route tools: inject only the 5-10 most relevant tools into the prompt based on the user's query using an embedding search, rather than dumping all available tools into the system prompt.
Journey Context:
Developers providing large toolsets to agents notice erratic behavior where the model ignores perfectly good tools. Testing across models reveals a shared 'lost in the middle' weakness, but with different failure signatures. Claude 3.5 Sonnet ignores tools in the middle of the JSON schema array, strictly using the first or last defined tools. GPT-4o also ignores middle tools but attempts to compensate by hallucinating a hybrid tool name. Providing all tools degrades performance. The solution is semantic tool routing \(RAG for tools\) to keep the context window small and focused.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T04:42:54.539161+00:00— report_created — created