# Structured output

**Source:** https://promtable.com/glossary/structured-output

> Structured output is any production prompt pattern that forces a language model to return data in a deterministic, machine-parseable form (JSON, XML, custom).

---
Structured output is any production prompt pattern that forces a language model to return data in a deterministic, machine-parseable form (JSON, XML, custom).

Structured output is the umbrella term for JSON mode, json_schema, XML tagging (Claude), tool-call arguments, and any other constraint that makes the model's output parseable by downstream code without retries. In 2026 the most reliable form is JSON Schema-constrained decoding (OpenAI's strict mode, Anthropic via tool use, Gemini's response_schema) — the model literally cannot emit invalid output. This is the production-grade replacement for 'return JSON' prompting plus regex fallbacks.

## When to use

- Any output that downstream code parses.
- Extraction, classification, form-filling, tool arguments.

## Common mistakes

- Asking for JSON in the system prompt without a schema.
- Schemas with deeply nested unions — smaller models get confused.

## Related terms

- [json-mode](https://promtable.com/glossary/json-mode)
- [function-calling](https://promtable.com/glossary/function-calling)
- [system-prompt](https://promtable.com/glossary/system-prompt)

*Last updated: 2026-06-01*
---

Original page: https://promtable.com/glossary/structured-output
Maintained by Promtable (https://promtable.com). Content: CC BY 4.0. Cite as "Promtable — https://promtable.com/glossary/structured-output".
Contact: info@vibecodingturkey.com.