Structured output

Getting a model to answer in a fixed, machine-readable format — JSON, a table, labelled fields — instead of free-form prose.

Last updated: · Markdown version

How to apply it in prompts

Use this concept to reduce ambiguity and improve consistency. If you need strict formatting, combine it with a JSON guide and a per-model template.

What it means
Copy-paste example
Classify each support ticket. Return ONLY a JSON array; one object per ticket:
{"id":"string","category":"billing|bug|feature_request|other","urgency":"low|medium|high","summary":"max 15 words"}
If a ticket is unclear, use category "other" and urgency "low". No markdown, no commentary.

Tickets:
"""[paste]"""
Opens the analyzer with the prompt prefilled.
Open in Promptea
FAQ
Do all current models support native structured output?
No. It depends on the model and API. Promptea's models pages show, for each current model, whether the provider's documentation lists structured output, with its verification date.
What if the model adds text around the JSON?
Say 'return only JSON, no markdown, no commentary', give one example, and parse defensively (retry or repair on failure) instead of assuming perfect output.