Report #61131
[research] Agent hallucinates non-existent or outdated API methods and parameters
Enforce strict schema validation against official documentation via RAG before code generation; reject code with undocumented methods.
Journey Context:
LLMs blend overlapping training data from different SDK versions, generating plausible-sounding but non-existent methods. Pure generation without grounding guarantees API drift. RAG with schema enforcement shifts the model from recall to verification, forcing it to only use methods explicitly present in the retrieved context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T09:05:44.312837+00:00— report_created — created