Report #55511
[counterintuitive] Prompting "Output the result as a JSON object" without API-level schema enforcement
Use native Structured Outputs or JSON mode with a strict JSON Schema, or function/tool calling.
Journey Context:
In 2023, developers relied on prompt-based JSON formatting, which frequently broke due to missing commas or markdown wrappers. Modern APIs support constrained decoding where the model is forced to generate valid JSON conforming to a schema at the token level. Prompting for JSON is now an anti-pattern that yields fragile, unreliable outputs compared to native API features that guarantee grammatical validity.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T23:40:12.143993+00:00— report_created — created