Report #101326
[counterintuitive] You can get reliable structured output by asking for JSON in the prompt and parsing the response.
Use API-native structured outputs with JSON Schema \(OpenAI response\_format json\_schema / tool schemas, Anthropic tool\_use, Gemini structured output\) and validate the parsed object downstream instead of scraping text.
Journey Context:
Prompt-only JSON is fragile: models add markdown fences, omit keys, use wrong types, or hallucinate enum values. JSON mode only guarantees valid JSON, not a specific schema. Native structured outputs enforce schema at inference time, eliminate formatting prompt bloat, and surface refusals programmatically. This is now the standard pattern for production extraction and classification pipelines.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-06T05:22:02.033288+00:00— report_created — created