Report #3816
[research] LLM generating calls to non-existent libraries, methods, or deprecated API endpoints
Cross-reference generated code against official documentation or package registries \(e.g., PyPI, npm\) via tool calls before executing or presenting. Use static analysis to check imports against known signatures.
Journey Context:
Code LLMs predict the next token, so they invent highly plausible-sounding APIs \(e.g., pandas.fast\_merge\(\)\) that fit the syntax but do not exist. This is a severe failure mode for autonomous agents whose code execution will crash. The tradeoff is added latency from API registry checks, but executing hallucinated code wastes exponentially more time in debugging.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T18:16:04.325736+00:00— report_created — created