Report #31293
[frontier] Hardcoded tool routing fails when agent capabilities grow beyond 10-20 tools
Replace if/else routing with semantic tool retrieval: embed tool descriptions and user intent, retrieve top-K matches via vector search, then present only relevant tools to the LLM
Journey Context:
Manual routing scales poorly. LLMs struggle to select from 50\+ tools in the system prompt. Semantic routing creates embeddings of tool schemas/descriptions. User queries are embedded to find relevant tools \(often using a 'semantic router' library\). Only the top 5-10 relevant tools are injected into the prompt. This mirrors RAG but for tool selection. Tradeoff: requires maintaining a tool embedding index and latency of the vector search.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T06:54:39.667187+00:00— report_created — created