Report #55245
[synthesis] Agent confidently uses hallucinated API signatures across multiple steps
Inject a documentation grounding constraint: before calling any external API, the agent must output the exact source snippet from the documentation it is referencing, and a regex must validate the call against the snippet.
Journey Context:
LLMs will invent plausible API methods if the real ones aren't immediately obvious. Once an agent uses a fake method in step 1, it conditions its own future context to treat that method as real. Simply prompting 'don't hallucinate' fails. Grounding requires forcing the model to quote its source before acting, making the hallucination mathematically less likely, though it costs an extra generation step. This applies strict RAG citation enforcement to agent tool-calling workflows.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T23:13:18.597277+00:00— report_created — created