Report #102632
[research] Model hallucinates API names, parameters, or version-specific behavior when writing code
Always look up the current library/framework documentation or source before emitting unfamiliar API calls; add comments citing the doc URL and version; then run or type-check the code to catch invented identifiers.
Journey Context:
HaluEval \(Li et al., EMNLP 2023\) found ~19.5% of ChatGPT responses contained hallucinated content, with higher rates for specific technical topics. Code is especially vulnerable because APIs change and training data lags. Verification via docs and execution is the only reliable filter.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-09T05:12:14.621733+00:00— report_created — created