Report #46878
[frontier] Tool schemas exhaust context window when agents have access to 100\+ tools
Embed tool descriptions into a vector index and retrieve relevant tool schemas via semantic similarity before the LLM selection phase, treating tool choice as RAG
Journey Context:
Sending 100 OpenAI function definitions to the prompt consumes thousands of tokens and confuses the model. The frontier pattern indexes tool schemas \(name, description, parameter types\) into the same vector DB as documents. When the user query arrives, the system retrieves the top-K most relevant tool schemas \(e.g., 'calculate\_tax' for a finance query\) and only injects those into the prompt. This reduces noise and token count. Alternatives like manual tool categorization don't scale; sending all tools fails at scale.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T09:09:24.070209+00:00— report_created — created