Report #90693
[research] LLM invents non-existent API parameters or methods
Force the agent to validate API calls against official documentation or type stubs before emitting code; use structured output generation constrained by a JSON schema derived from the actual API spec.
Journey Context:
LLMs predict the most probable next token, which often leads to 'plausible' but non-existent parameters \(e.g., adding a timeout flag to an endpoint that doesn't support it\). Relying on the LLM's internal weights is insufficient. Constrained decoding or external validation against a schema is required because the model's prior knowledge often overrides prompt constraints in edge cases, leading to silent runtime failures.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T10:49:22.234725+00:00— report_created — created