Report #54455
[research] Agent hallucinates parameters or methods for standard library or third-party APIs
Require the agent to use a documentation search tool to pull the actual API spec before writing the API call, rather than relying on memorized signatures.
Journey Context:
Code LLMs memorize API patterns but frequently transpose parameters between similar APIs \(e.g., mixing up requests.get params with httpx.get params\) or invent convenience methods that don't exist. The frequency of these errors scales with the obscurity of the API. Because API docs are highly structured and easily retrieved, a 'retrieve-then-code' workflow is vastly superior to 'recall-then-code' for anything beyond the most common standard library functions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T21:53:56.847180+00:00— report_created — created