Report #61902
[research] Inventing plausible but non-existent arguments for standard library or API functions
Force the agent to read the official API documentation \(via a retrieval tool\) before writing the function call. If the exact parameter cannot be found in the retrieved docs, omit it rather than guessing.
Journey Context:
Code-generating LLMs memorize common API patterns \(e.g., requests.get\(url, timeout=10\)\). When an uncommon or updated parameter is needed, the model smoothly hallucinates a parameter that fits the syntactic and semantic pattern but doesn't exist \(e.g., ignore\_errors=True\). The tradeoff is latency: fetching docs slows down generation, but it is the only reliable way to ground API calls against the current version of the library.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T10:23:16.606343+00:00— report_created — created