Skip to content

Structured output

Output returned in a predefined structure so software can validate and process it without interpreting free-form text.

Source content checked . English translation published 2026-10-27.

In business automation

Structured output is useful when a model is one step in a process, rather than just a conversational interface. Define what happens in cases of refusal, missing information, and failure, and do not expect every request to return a complete record.

Examples

These examples illustrate a possible workflow. Adapt the connections and rules to your own systems.

Business process example

A model classifies an inquiry and returns its topic, urgency, and missing information. The application checks the values and routes an unclear inquiry for review instead of converting every response into text to store in a field.

Relevant tools

Pydantic AI
Defining an output type lets you build results that can be validated and processed in code.

What to check

  • Even correctly structured output can contain an error. Check ranges, permissions, and consistency with the original information before taking action.

Related terms

Sources