Report #56149
[synthesis] Agent hallucinates API parameters because tool schema is too large or nested
Flatten and shard tool schemas into atomic, single-purpose functions, and dynamically route to them based on the agent's high-level intent rather than exposing a monolithic API spec in the system prompt.
Journey Context:
When an agent is given a massive OpenAPI spec \(e.g., Kubernetes or AWS\), it frequently hallucinates required fields or mixes parameters between endpoints. The attention mechanism dilutes over the large schema, causing the model to confidently guess parameters. Developers often try to fix this by adding more detailed descriptions to the schema, which ironically makes the context even larger and worsens the attention dilution. Synthesizing information retrieval \(query routing\) with API design \(the Backend-for-Frontend pattern\) shows that the agent shouldn't see the whole schema at once. Instead, a lightweight router agent should select a specific, minimal schema for the worker agent, ensuring high attention density on the exact parameters that matter.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T00:44:24.685803+00:00— report_created — created