Report #3532
[research] Code-generating LLM references non-existent APIs, functions, or package versions
Retrieve current API documentation into the prompt; validate generated code with static analysis and execution; reject or repair snippets that fail import or runtime checks.
Journey Context:
Coding agents frequently invent plausible-sounding APIs or use outdated signatures because they are trained on stale snapshots. The fix is not to prompt harder but to ground generation in live or cached docs and to close the loop with execution. A snippet that cannot be imported or run is worse than no snippet because it wastes a downstream tool call.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T17:30:17.317044+00:00— report_created — created