Skip to main content
A schema tells the AI exactly what fields to produce. Instead of a free-text response, the AI returns structured data with the specific fields you defined.

Why use schemas?

Without a schema, an Ask AI step returns free text. You might ask “list the competitors” and get a paragraph, or bullet points, or a numbered list — the format is unpredictable. With a schema, the AI must return data in the exact structure you specified:
competitors: ["Google", "Microsoft", "Amazon"]
market_cap: 2800000000000
industry: "Technology"
This makes outputs:
  • Consistent — Same fields every time
  • Exportable — Perfect for spreadsheets
  • Chainable — Downstream steps can reference specific fields like analysis.competitors

Creating a schema

In the Schema Editor

  1. Open the AI Chef step’s settings panel
  2. Click the Schema selector
  3. Choose New Schema (or select an existing one)
  4. The Schema Editor opens — a visual builder where you:
    • Add properties by clicking Add property
    • Set each property’s name, type (string, number, boolean, array, object), and description
    • Mark fields as required or optional
    • Nest objects inside objects for complex structures
Schema editor showing fields for company_name (string), industry (string), and competitors (array) with types and descriptions

From the Schemas page

  1. Go to Schemas in the sidebar
  2. Click Create Schema
  3. Build your schema using the same visual editor
  4. Save it — now it’s available in any recipe

AI-assisted schema generation

  1. In the schema editor, describe what you want in plain English
  2. Click Generate Schema
  3. Review the AI-generated schema and adjust as needed

Using a schema in a step

  1. Add an AI Chef step to your recipe
  2. In the settings panel, select your schema from the Schema dropdown
  3. Write a prompt that asks for the data your schema expects
Match your prompt to your schema. If your schema has a competitors field, make sure your prompt mentions competitors. The AI uses both the prompt and the schema to produce the result.

Viewing schema results

When a step with a schema completes, the side panel shows two tabs:
  • Graph — Expandable tree view of the data. Click fields to expand nested objects and arrays.
  • JSON — Raw data view, useful for copying or debugging.
Side panel showing structured output in Graph view with expandable field tree

Using schema fields as tokens

Schema outputs produce green token pills in the tokens panel. You can reference specific fields:
  • The full structured output (green pill labeled with step name)
  • Individual fields (green pills labeled step_name > field_name)
Drag these into downstream steps to use specific fields. For example, drag Analysis > competitors into an Export Table step to export just the competitors list.

Tips and limits

Add descriptions to fields. Click a property in the schema editor and add a description like “Annual revenue in US dollars.” This helps the AI produce better results.
The top-level type must be an object. You can’t create a schema that’s just an array at the root. Wrap it in an object: instead of a bare list, use items: [list of things].
Keep schemas under 10 levels of nesting. Very deeply nested schemas are harder for the AI to fill correctly and take longer to validate.
Simpler schemas work better. Start with a few required fields. You can always add optional fields later. Over-constrained schemas cause the AI to retry more often.

Next steps

  • Outputs — How structured outputs appear in the side panel
  • Step Types — Learn about AI Chef and other steps that use schemas
  • Exporting Results — Export structured data as spreadsheets