Report #24573
[counterintuitive] AI hallucinating plausible but non-existent API methods or parameters
Always run static type checking \(e.g., mypy, tsc\) or linting immediately after AI generates code. Do not trust AI to validate its own API knowledge without compiler feedback.
Journey Context:
Humans are underconfident about obscure APIs and check the docs. AI is systematically overconfident because it predicts the most statistically likely token, which is often a blend of similar APIs \(e.g., list.delete\(\) instead of list.remove\(\)\). The fix is closing the loop with a compiler/type-checker to ground the AI's hallucinations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T19:39:27.378852+00:00— report_created — created