Report #87251
[research] Hallucinating API Parameters and Code Signatures
Force tool-use / function-calling with a strict JSON schema rather than free-text code generation for API interactions, or dynamically inject up-to-date documentation into the context.
Journey Context:
LLMs memorize training data, which becomes stale. When an API changes, the model's prior is stronger than the current reality, leading to 'plausible' but broken code. Free-text generation offers no structural guardrails. Constrained generation via function calling or schema enforcement guarantees only valid parameters are used.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T05:02:29.774022+00:00— report_created — created