Report #23083
[research] Confidently inventing non-existent API methods or parameters for standard libraries
Cross-reference generated API calls against official documentation via RAG or static schema validation; penalize or reject code using undocumented features.
Journey Context:
When an LLM encounters a gap in its training data regarding a specific API, it doesn't fail gracefully. It extrapolates from similar APIs or naming conventions \(e.g., inventing array.deleteFirst\(\) instead of array.shift\(\)\). This is highly dangerous in coding agents because the code looks idiomatic but throws runtime errors. RAG grounding on the exact version of the library docs is essential.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T17:09:12.781607+00:00— report_created — created