Skip to main content
Structured insights extract data in a predefined JSON schema format, providing consistent, machine-readable results perfect for analytics, dashboards, and downstream processing.

When to use structured insights

Choose structured insights when you need:
  • Quantitative Metrics - Scores, ratings, counts, percentages.
  • Categorical Data - Status values, types, priorities, classifications.
  • Boolean Flags - Yes/no decisions, presence checks, compliance indicators.
  • Consistent Format - Data that feeds into databases, dashboards, or analytics systems.
  • Multiple Related Fields - Complex data with multiple attributes.

Creating a structured insight

Step 1: Start creating an insight

  1. Navigate to AI Insights in the Portal.
  2. Click Create Insight.
  3. Enter a name and basic instructions.

Step 2: Enable structured data mode

Click the Collect as structured data button to reveal the schema configuration interface. Structured Data Mode

Step 3: Define parameters

For each piece of data you want to extract, add a parameter with:
  1. Name - The field name in the JSON output (e.g., sentiment_score, issue_type).
  2. Type - The data type (string, number, boolean, etc.).
  3. Required - Whether this field must always be present.
  4. Description - Instructions for extracting this specific field.
Click Add parameter to add additional fields to your schema.

Parameter types

String

Text values - use for categories, descriptions, identifiers. Example:
Output:

Enum

Predefined categories - use when you have a fixed set of possible values. The AI agent will select one value from your provided list. Example:
Output:
Enums provide better accuracy than asking the AI agent to choose from options in a string description. They enforce strict value validation and make the AI agent’s task clearer.

Number

Numeric values - use for scores, ratings, counts, percentages. Example:
Output:

Integer

Whole number values - use when you need integers without decimals (counts, quantities, IDs). Example:
Output:
Use integer instead of number when you specifically need whole numbers. This provides clearer intent and can help the AI agent avoid returning decimal values.

Boolean

True/false values - use for flags, presence checks, yes/no decisions. Example:
Output:

Array

Lists of values - use for multiple items of the same type. Example:
Output:

Array (string)

Lists of text values - use for multiple string items with enforced type safety. Example:
Output:

Array (number)

Lists of numeric values - use for multiple numbers with enforced type safety. Example:
Output:

Array (boolean)

Lists of true/false values - use for multiple boolean flags with enforced type safety. Example:
Output:
Typed arrays (string, number, boolean) provide better type safety than the generic array type. Use them when you know all elements will be of the same specific type.

Object

Nested structures - use for complex related data. Example:
Output:

Complete examples

Example 1: Sentiment analysis

Configuration:
Sample Output:

Example 2: Sales qualification

Configuration:
Sample Output:

Example 3: Support ticket categorization

Configuration:
Sample Output:

Advanced mode

Enable Advanced mode (checkbox at the top of the structured data section) to access additional schema configuration options:
  • Custom validation rules.
  • Enum constraints for string values.
  • Min/max constraints for numbers.
  • Pattern matching for strings.
  • Nested object definitions.

Best practices

1. Keep schemas focused

Don’t try to extract everything in one insight. Create multiple focused insights instead:
  • ✅ Separate insights for “Sentiment” and “Issue Classification”
  • ❌ One massive insight trying to capture sentiment, classification, entities, summary, etc.

2. Make instructions clear

Each parameter’s description should be crystal clear:

3. Use enums for categories

When you have a fixed set of categories, use the enum type instead of listing values in a string description: ❌ Less effective (using string with description):
✅ Better (using enum type):
Using the enum type provides better accuracy and enforces strict value validation. See the Enum parameter type section for more details.

4. Mark optional appropriately

Only mark fields as required if they should always be extractable:
  • Required: overall_sentiment - should always be detectable
  • Optional: competitor_mentioned - may not come up in every conversation

5. Provide value ranges

For numeric fields, specify the range:

6. Test with edge cases

Test your structured insights with:
  • Very short conversations.
  • Conversations where some information is missing.
  • Ambiguous or unclear discussions.
  • Multiple topics in one conversation.

Next steps