Report #54807
[research] Hallucinating non-existent API methods or parameters for real libraries
Force tool-use or RAG to pull official API docs rather than relying on parametric weights for function signatures; apply constrained decoding if a schema is available.
Journey Context:
LLMs predict the most statistically likely token, so they often invent plausible-sounding parameters \(e.g., pandas.read\_csv\(delimiter='\|'\) vs sep='\|'\). Parametric memory is stale and lossy. RAG grounds the model, but constrained decoding against a JSON schema or OpenAPI spec guarantees structural factuality.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:29:15.075559+00:00— report_created — created