Skip to content

Structured Output

Make the model emit JSON or a table that fits a schema

inTextTable

What this capability means

Takes natural language plus a target structure — field names, types, required flags — and outputs text that strictly conforms, such as JSON, XML or a table. Unlike information extraction the structure is supplied by the caller rather than inferred from the text; unlike tool use it produces the data itself, not a request to invoke some interface.

How it is done

The basic approach puts the schema and examples in the prompt and asks the model to fill them; more reliable is constrained decoding, which at each step allows only tokens that keep the structure valid, ruling out syntax errors during generation. Fine-tuning on many text-to-structure pairs familiarises the model with common field naming and type conventions. Large schemas can be split across several calls or filled in layers.

Representative products

5

OpenAI

GPT-4o

A natively multimodal general model, with text, image and audio through one door

4Caps
Model Closed
TextImageAudioTextAudio
2024

Anthropic

Claude

A general chat model known for long context and safety alignment

4Caps
Model Closed
TextImageText
2023

Google DeepMind

Gemini

A natively multimodal general model built for very long context

4Caps
Model Closed
TextImageAudioVideoText
2023

Alibaba (Qwen)

Qwen

An open-weight family spanning many sizes, with multimodal versions

4Caps
Model Open weights
TextImageText
2023

Tencent (Hunyuan)

Hunyuan

Tencent’s general model family, with open-weight versions

4Caps
Model Open weights
TextImageText
2023

Organizations involved

Typical uses

  • Converting natural language into API payloads
  • Auto-filling forms and order fields
  • Data cleaning and normalisation pipelines
  • Passing structured messages between agents

How it is evaluated

Schema validity rate
Share of outputs that parse and satisfy the schema
Field exact match
Share of field values matching the reference
Value-level F1
Scores elements in lists and nested structures

Limits and hard parts

  • With many fields or long enums it drops fields, picks the wrong value or invents new ones
  • Deep nesting and complex types such as unions or nullable arrays produce type errors
  • Tight format constraints squeeze reasoning, and the same model reasons less well under them

Concepts behind it

NLP & Large Language Models

Prompting & AlignmentExpert

Making a model helpful, honest and harmless is harder than simply making it bigger

4Linked
Figures 1 · Data 1

NLP & Large Language Models

Transformer ArchitectureIntermediate

Replacing word-by-word relay with a room where everyone speaks at once, so long-range dependencies are one hop away

4Linked
Figures 2 · Data 2

AI Engineering, Safety & Ethics

Agents & Tool UseIntermediate

Let a model do more than answer: search, call APIs, run code — and decide the next step from what came back

4Linked
Figures 1 · Data 1