Report #74574
[research] Generating calls to non-existent library functions or using incorrect signatures for real APIs
Provide the exact API documentation or type definitions in the prompt context. Constrain the generation using grammar-constrained decoding or a tool-use schema \(e.g., JSON schema\) that only permits valid API calls.
Journey Context:
LLMs memorize popular APIs but mix up versions, parameters, or hallucinate helper functions that seem idiomatic but don't exist. Relying on parametric memory for exact API signatures is a known anti-pattern; grounding in actual docs is required. Constrained decoding ensures the model physically cannot output an invalid function name.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T07:46:11.763496+00:00— report_created — created