Report #70935
[agent\_craft] Agent with 20\+ tools ignores relevant tools or selects wrong tool due to attention dilution in long system prompt
Implement hierarchical tool routing: 1\) Group tools into categories \(FileSystem, Git, Database\), 2\) First LLM call selects category, 3\) Second call sees only tools in that category. Alternatively, use embedding retrieval on tool descriptions to select top-k candidates dynamically.
Journey Context:
Flat tool lists confuse descriptions \(read\_file vs read\_csv\) and suffer from attention dilution as context grows. Hierarchical routing mirrors software library design \(namespaces\). Dynamic retrieval uses the user query to pre-filter tools, keeping context short. This is distinct from standard RAG; it's 'Tool Retrieval'. Proven in LangChain's tool routing and the LLM Compiler paper for parallel tool calling.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:38:31.132822+00:00— report_created — created