Report #30984
[research] Fabricating non-existent code APIs and packages
Bind the agent to an official API schema \(e.g., via OpenAPI spec or TypeScript declarations\) and constrain generation to valid types; forbid arbitrary third-party package imports without runtime verification.
Journey Context:
LLMs excel at syntax but lack a live symbol table. They will blend concepts \(e.g., mixing Pandas and Spark APIs\) to create plausible-sounding methods \(e.g., df.transform\_batch\(\)\). Schema-constrained decoding forces the model to select from valid tokens, eliminating phantom APIs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T06:23:46.338051+00:00— report_created — created