Skip to main content

Using Structured Output Fields

Configure specific data formats and structures for Workflow outputs

Jake Rosenthal avatar
Written by Jake Rosenthal
Updated over a week ago

How to set up and use Structured Output Fields

Structured outputs in AI are a powerful way to ensure that generated content follows a specific format and contains the exact data fields you need. Instead of receiving unstructured text that you then need to parse, structured outputs allow you to define specific fields, data types, and formats that the AI will populate consistently. This is particularly useful for data extraction, form filling, and creating standardized reports.

This feature is available for certain blocks:

  • Generate Text

  • Generate Text with Cassidy Assistant.

For the purpose of this guide, we'll walk through an example of parsing LinkedIn profiles. We'll pass in a scraped LinkedIn profile and extract their name (text), location (dropdown of state codes), and a list of objects containing role name, company name, and length of time for each position.

Follow these steps:

  1. Edit the action: In this example, we'll configure a Generate Text action that's already been added to your Workflow. Click on the action to open its settings.

  2. Configure Structured Output Fields: Under the "Structured Output Fields" section, you have two options:

    • Click "Add Fields Automatically" to generate the list of fields based on the prompt itself

    • Click "+ Add Field" to manually create each field

  3. Add individual fields: After clicking "+ Add Field", specify the following for each field:

    • Field Name: Enter a descriptive name (e.g., "Full Name", "Location", "Past Experiences")

    • Type: Choose from Text, Dropdown, or Object

    • Description of the Field: Help the AI understand what it should fill that field in with (e.g., "The person's complete full name as listed on LinkedIn")

  4. Configure field types: Depending on the type you selected, you'll need to configure additional settings:

    • Text: A single text value (no additional configuration needed)

    • Dropdown: A single value from a list of options. Add the specific options the AI can choose from (e.g., for location: "CA", "NY", "TX", "FL", etc.)

    • Object: A collection of values of different types.

      You'll need to add fields under that object by repeating the above steps. For our work experience example, you might add:

      • Company Name (Text)

      • Job Title (Text)

      • Duration in Years (Text)

  5. Set field requirements: Customize your fields further with these additional options:

    • Required: Toggle on/off whether this field must be filled. Enable this if the field is required for proper output.

    • Allow Multiple Values (List): Allow the AI to provide more than one value for the same field. This is useful when you need to process multiple items, such as a list of work experiences or a series of skills.

  6. Reference the structured output: In subsequent Workflow steps, you can reference the specific variables from the output of this action using the field names you defined.

Here's a sample of the type of output you can expect:

Did this answer your question?