Report #61350
[research] Agent uses valid API names but hallucinates non-existent parameters or outdated signatures
Bind agent code generation strictly to retrieved schema objects \(e.g., OpenAPI/JSON Schema\) and use constrained decoding or post-generation AST validation against the schema, rather than relying on parametric memory.
Journey Context:
LLMs memorize API names well but fail on exact parameter signatures, often inventing plausible-sounding arguments \(e.g., verbose=True on an endpoint that doesn't support it\). Prompting with 'only use valid parameters' is insufficient because the model cannot distinguish between its training data and plausible confabulations. Grounding via schema retrieval and programmatic validation is the only reliable fix.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T09:27:44.777585+00:00— report_created — created