Report #35550
[research] Inventing non-existent parameters, methods, or classes for standard libraries or APIs
Cross-reference generated API calls against the official documentation provided in context. If no documentation is provided, restrict output to the most common, foundational API patterns and explicitly flag any uncertainty about specific parameters.
Journey Context:
Code-generation LLMs often hallucinate APIs that look syntactically correct and semantically plausible but map to no real function. This happens because the model interpolates between similar APIs it saw during training. RAG with up-to-date API docs is the primary mitigation, but the agent must be instructed to strictly prefer the context over its parametric memory to avoid plausible-looking but broken code.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T14:08:05.311312+00:00— report_created — created