Skip to main content
Structured Output lets you configure compatible models to enforce output format and structure using optional schema to adhere to. Structured Outputs can follow a predefined JSON Schema:
  1. This ensures responses are type-safe, making integration within rigorous systems easy.
  2. Models also don’t need extra prompting to adhere to the defined schema, making it easy to build.

Configuring Response Format

There are two types of Structured Outputs available within Prompts:
  • JSON Mode, enforcing an output in JSON.
  • JSON Schema, enforcing an output in a predefined schema.
JSON mode is a more basic available Response Format. It only ensures the output is a valid JSON, while JSON Schema enforces a predefined schema, making it more rigorous and safe for integrating models in your pipeline.
To configure a Prompt’s output, look for the Response Format configuration:

Choose the desired Response Format.

Structured Output configuration will only appear when the chosen model is compatible. To find compatible models, refer to your LLM providers’ documentation.

Configuring a JSON Schema

When selecting a JSON Schema Response Format, you need to define the Schema which the model follows.
Response Format Json Schema Pn

Choose an existing schema or create a new one.

When creating a new Schema, the following modal opens, letting you configure the JSON Schema payload.
Json Schema Configuration Pn

Once saved within your project, a schema can be reused between multiple prompt configurations.

To learn more about JSON Schema definitions, refer to the Official Documentation.