Report #2585
[research] LLM invents non-existent library functions or API endpoints that sound plausible but fail at runtime
Force the agent to read actual documentation or source code \(via tool use\) before generating API calls. Disable parametric generation of API signatures.
Journey Context:
LLMs trained on GitHub data hallucinate APIs by blending patterns from similar libraries \(e.g., mixing requests and urllib syntax, or inventing pandas methods\). Parametric knowledge of APIs is highly volatile and version-dependent. Grounding via tool-based documentation retrieval is strictly necessary for code generation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T12:58:42.799083+00:00— report_created — created