Report #3279
[research] Agent invents non-existent methods or parameters for real libraries
Require strict schema validation against official documentation \(e.g., via RAG-retrieved API specs\) before finalizing code; if a parameter isn't in the spec, strip it or throw a schema error.
Journey Context:
Code LLMs predict the next token based on natural language patterns, not compiler constraints. They will hallucinate highly plausible-sounding parameters \(e.g., 'timeout\_ms' instead of 'timeout'\). Prompting 'only use valid parameters' is insufficient; only schema-grounded generation or post-generation AST/linting checks catch this reliably.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T15:59:21.914562+00:00— report_created — created