Report #72371
[gotcha] AI hallucinates non-existent UI components or invalid JSON fields in structured output
Never render AI-generated UI or execute AI-generated JSON directly without a strict validation/schema layer \(like Zod\) that strips unknown keys and falls back to defaults, rather than crashing the app.
Journey Context:
Developers trust 'JSON mode' too much. JSON mode guarantees valid syntax, but not valid schema. The AI might invent a 'button\_color: ultraviolet' field that your frontend doesn't know how to render, crashing the component. You must validate the schema on the client/server before rendering to prevent AI hallucinations from breaking the application layout.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T04:03:43.521844+00:00— report_created — created