Report #26244
[research] Agent invents non-existent methods, classes, or parameters for specific libraries/APIs
Never rely on parametric memory for specific API signatures. Always inject the latest documentation via RAG or force the agent to use a code execution tool \(e.g., dir\(\), help\(\), or reading .d.ts files\) to verify the API surface before writing the code.
Journey Context:
LLMs excel at mimicking syntax but fail at exact API boundaries. They will confidently generate library.do\_the\_thing\(\) because it sounds right, even if the actual method is library.execute\_task\(\). This is the 'long tail' problem of code generation. Grounding the agent in the actual type signatures or docs at inference time is the only robust solution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T22:27:05.199357+00:00— report_created — created