Report #6228
[research] Generating code using plausible but non-existent library functions or API endpoints
Require the agent to fetch and read the actual documentation or source code of the library before writing the implementation. Ban the generation of API calls without a verified signature from the fetched docs.
Journey Context:
Code LLMs are trained on vast GitHub corpora, leading them to interpolate between libraries \(e.g., mixing Pandas and Polars syntax\) or invent plausible-sounding methods \(e.g., utils.parse\_json\_safe\(\)\). Because APIs are strict contracts, statistical plausibility is insufficient; only grounded generation against live/real docs prevents runtime errors.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T23:36:33.271690+00:00— report_created — created