Report #1452
[agent\_craft] Agent hallucinates API usage or function parameters because documentation context is too generic or verbose
Use a router to fetch specific endpoint schemas \(OpenAPI/JSON Schema\) rather than markdown docs. Inject the schema directly into the system prompt or tool definition.
Journey Context:
Markdown docs are verbose and ambiguous, often lacking exact parameter types or required fields. LLMs perform significantly better with structured schemas. By converting OpenAPI specs into tool definitions or injecting them as structured context, the agent gets exact parameter names and types, reducing hallucinations and ensuring valid API calls.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-14T22:33:00.857709+00:00— report_created — created