> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galtea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Behavior Datasets

> Evaluate multi-turn dialogue interactions using conversation simulation with simulated users

> [!WARNING]
>
> You are reading the docs of Galtea 5.16. [Read this page in the latest version](https://docs.galtea.ai/concepts/product/dataset/behavior-datasets.md).

## What are Behavior Datasets?

Behavior datasets in Galtea are designed to evaluate your [product](https://docs.galtea.ai/v5.16/concepts/product.md) through multi-turn dialogue interactions — whether it's a conversational chatbot, a task-oriented assistant, or an autonomous AI agent. These datasets use the [Conversation Simulator](https://docs.galtea.ai/v5.16/concepts/product/dataset/test-case/conversation-simulator.md) to create realistic conversations with simulated users that have specific goals, personalities, and behaviors.

Unlike [Accuracy Datasets](https://docs.galtea.ai/v5.16/concepts/product/dataset/accuracy-datasets.md) that focus on single-turn question-answer pairs, or [Security & Safety Datasets](https://docs.galtea.ai/v5.16/concepts/product/dataset/security-datasets.md) that test security vulnerabilities, Behavior datasets evaluate how well your AI product can:

* Maintain context across multiple conversation turns
* Guide users toward successful task completion
* Handle unexpected but realistic user inputs
* Stay in character and follow conversation guidelines
* Execute multi-step workflows and manage complex dialogue flows

## Creating Behavior Datasets

You can create behavior datasets in Galtea through the methods below. In the dashboard, you can also select "From an existing Accuracy Dataset" as the dataset origin. Galtea then uses the test cases of that Accuracy Dataset as the basis for new behavior test cases.

> [tab] Behavior Generator
>
> **1. Define Your Product**
>
> Start by defining your product in Galtea. These detailed [product properties](https://docs.galtea.ai/v5.16/concepts/product.md#product-properties) will be used as the foundation for generating realistic behavior scenarios.
>
> **2. Configure the dataset**
>
> Select *Behavior* as the dataset type and *Generated* as the dataset origin
>
> > [!NOTE]
> >
> > The dataset creation process can be done via the [SDK](https://docs.galtea.ai/v5.16/sdk/api/dataset/create.md) or the [Galtea dashboard](https://platform.galtea.ai/)
>
> **3. Generate Behavior Scenarios**
>
> Galtea will automatically analyze your product definition to create tailored conversation scenarios, complete with:
>
> * Realistic user personas based on your target audience
> * Goals aligned with your product's use cases
> * Natural conversation flows that test key features
>
> <video controls muted playsInline src="https://mintcdn.com/galtea/dTqmcvyz2pQyIXAj/videos/generate-scenarios.mp4?fit=max&auto=format&n=dTqmcvyz2pQyIXAj&q=85&s=43133c61250e680260a86b6fb9ce9733" />

> [tab] Upload Your Own Behavior Datasets
>
> **1. Create your behavior dataset file**
>
> Prepare a CSV file following the behavior dataset structure shown [below](#example-behavior-datasets-and-file-format)
>
> **2. Configure the dataset**
>
> Select "Behavior" as the dataset type and "Uploaded" as the dataset origin
>
> > [!NOTE]
> >
> > The dataset creation process can be done via the [SDK](https://docs.galtea.ai/v5.16/sdk/api/dataset/create.md) or the [Galtea dashboard](https://platform.galtea.ai/)
>
> **3. Upload your behavior dataset file**
>
> Select the file you created and upload it to Galtea

> [tab] Add Test Cases Manually
>
> **1. Configure the dataset**
>
> Select "Behavior" as the dataset type and "Add test cases manually" as the dataset origin
>
> > [!NOTE]
> >
> > This origin is available in the [Galtea dashboard](https://platform.galtea.ai/). No file is needed: the dataset starts with no test cases.
>
> **2. Add your test cases**
>
> Open the new dataset on its *Test Cases* tab and select *New Test Case*. Fill in the user persona, scenario and goal, and write the first input. Repeat for each test case.

## Conversation Flow Categories

Behavior datasets can cover various types of conversational interactions:

> [accordion] Task Completion
>
> Scenarios where the simulated user has a specific goal to accomplish, such as booking a service, making a purchase, or getting support for an issue.

> [accordion] Information Seeking
>
> Scenarios focused on retrieving specific information or answers, testing the AI's knowledge and ability to provide helpful responses.

> [accordion] Customer Support
>
> Scenarios that simulate customer service interactions, including complaints, troubleshooting, and problem resolution.

> [accordion] Sales and Consultation
>
> Scenarios where the user is exploring options, comparing products, or seeking advice before making decisions.

> [accordion] Complex Multi-Step Processes
>
> Scenarios that involve multiple stages or require gathering various pieces of information over several turns.

> [accordion] Edge Cases and Challenges
>
> Scenarios that test how the AI handles difficult, unclear, or unexpected user behavior while maintaining conversation quality.

## Example Behavior Datasets and File Format

Here are examples of behavior dataset content and structure:

> [accordion] Travel Booking Scenarios
>
> > [tab] Table View
> >
> > | Goal | User Persona | Input | Stopping Criterias | Max Iterations | Scenario | Conversation History |
> > | - | - | - | - | - | - | - |
> > | Book a one-way flight from SFO to JFK for next Tuesday | A busy professional who is direct and values efficiency | I need to book a flight | The user has confirmed the flight booking\|The chatbot indicates it cannot fulfill the request | 10 | Flight booking scenario | |
> > | Find the cheapest round-trip flight to Europe in summer | A budget-conscious student who asks many questions | Hi, I'm looking for cheap flights to Europe | Flight is booked\|User decides not to book\|Maximum budget is exceeded | 15 | Budget travel scenario | |
> > | Change an existing flight reservation | A frustrated customer whose plans have changed | | Reservation is successfully modified\|Customer is transferred to agent | 8 | Flight modification scenario | `[{"role": "user", "content": "I booked flight GA123 last week"}, {"role": "assistant", "content": "I see it. How can I help?"}]` |
>
> > [tab] Raw CSV
> >
> > ```csv theme={"system"}
> > goal,user_persona,input,stopping_criterias,max_iterations,scenario,conversation_history
> > "Book a one-way flight from SFO to JFK for next Tuesday","A busy professional who is direct and values efficiency","I need to book a flight","The user has confirmed the flight booking|The chatbot indicates it cannot fulfill the request",10,"Flight booking scenario",
> > "Find the cheapest round-trip flight to Europe in summer","A budget-conscious student who asks many questions","Hi, I'm looking for cheap flights to Europe","Flight is booked|User decides not to book|Maximum budget is exceeded",15,"Budget travel scenario",
> > "Change an existing flight reservation","A frustrated customer whose plans have changed",,"Reservation is successfully modified|Customer is transferred to agent",8,"Flight modification scenario","[{""role"": ""user"", ""content"": ""I booked flight GA123 last week""}, {""role"": ""assistant"", ""content"": ""I see it. How can I help?""}]"
> > ```
>
> > [!NOTE]
> >
> > The third row leaves `input` empty because `conversation_history` supplies the opening. A row
> > that sets `conversation_history` must not attach [Galtea files](https://docs.galtea.ai/v5.16/concepts/product/version/session/content-parts.md#galtea-files) to its `input`, because the platform
> > supports them on single-turn runs only and a seeded run is multi-turn. Only a
> > text run reads `conversation_history`. A voice run (a phone or WebRTC connection) ignores the
> > column and still opens the conversation from `input`, so fill `input` for a voice product.

> [accordion] Customer Support Scenarios
>
> > [tab] Table View
> >
> > | Goal | User Persona | Input | Stopping Criterias | Max Iterations | Scenario |
> > | - | - | - | - | - | - |
> > | Get help with a defective product | An upset customer who received a broken item | My product arrived broken and I'm very disappointed | Issue is resolved\|Customer requests supervisor\|Refund is processed | 12 | Product defect resolution |
> > | Understand how to use a new feature | A curious but non-technical user | I heard about a new feature but don't know how to use it | User successfully uses the feature\|User gives up\|Technical support is escalated | 10 | Feature education scenario |
> > | Cancel a subscription | A polite customer who wants to downgrade service | I'd like to cancel my subscription please | Subscription is cancelled\|Alternative plan is accepted\|Retention offer is declined | 8 | Subscription cancellation |
>
> > [tab] Raw CSV
> >
> > ```csv theme={"system"}
> > goal,user_persona,input,stopping_criterias,max_iterations,scenario
> > "Get help with a defective product","An upset customer who received a broken item","My product arrived broken and I'm very disappointed","Issue is resolved|Customer requests supervisor|Refund is processed",12,"Product defect resolution"
> > "Understand how to use a new feature","A curious but non-technical user","I heard about a new feature but don't know how to use it","User successfully uses the feature|User gives up|Technical support is escalated",10,"Feature education scenario"
> > "Cancel a subscription","A polite customer who wants to downgrade service","I'd like to cancel my subscription please","Subscription is cancelled|Alternative plan is accepted|Retention offer is declined",8,"Subscription cancellation"
> > ```

> [accordion] Sales and Consultation Scenarios
>
> > [tab] Table View
> >
> > | Goal | User Persona | Input | Stopping Criterias | Max Iterations | Scenario |
> > | - | - | - | - | - | - |
> > | Find the right product for specific needs | A thorough researcher who compares many options | I'm looking for a solution but need help choosing | Product recommendation is accepted\|User requests human consultation\|User decides to research more | 15 | Product recommendation scenario |
> > | Get pricing information for enterprise solution | A business decision maker focused on ROI | What are your enterprise pricing options? | Quote is requested\|Meeting is scheduled\|User indicates budget constraints | 10 | Enterprise sales scenario |
> > | Compare different service tiers | An analytical customer who wants detailed comparisons | Can you help me understand the differences between your plans? | Plan is selected\|User requests trial\|User needs more time to decide | 12 | Service comparison scenario |
>
> > [tab] Raw CSV
> >
> > ```csv theme={"system"}
> > goal,user_persona,input,stopping_criterias,max_iterations,scenario
> > "Find the right product for specific needs","A thorough researcher who compares many options","I'm looking for a solution but need help choosing","Product recommendation is accepted|User requests human consultation|User decides to research more",15,"Product recommendation scenario"
> > "Get pricing information for enterprise solution","A business decision maker focused on ROI","What are your enterprise pricing options?","Quote is requested|Meeting is scheduled|User indicates budget constraints",10,"Enterprise sales scenario"
> > "Compare different service tiers","An analytical customer who wants detailed comparisons","Can you help me understand the differences between your plans?","Plan is selected|User requests trial|User needs more time to decide",12,"Service comparison scenario"
> > ```

> [!NOTE]
>
> This structure is required by Galtea to automatically generate the [test cases](https://docs.galtea.ai/v5.16/concepts/product/dataset/test-case.md) for your behavior datasets as [datasets](https://docs.galtea.ai/v5.16/concepts/product/dataset.md) within the platform. If this format is not provided, you can still [manually create the test cases](https://docs.galtea.ai/v5.16/sdk/api/test-case/create.md).

> [!NOTE]
>
> For automatic processing, the file format must be `CSV`.

> [!WARNING]
>
> The examples provided above are simplified demonstrations. In actual CSV files, behavior datasets can be much more detailed and the number of test cases (rows) can be significantly higher to provide comprehensive conversation testing coverage.

## Structure of Behavior Datasets

Behavior datasets have a specific structure designed to enable realistic conversation simulation:

**goal** `Text` *required*

The overall objective the simulated user is trying to achieve during the conversation.
**Example**: "Book a one-way flight from San Francisco (SFO) to New York (JFK) for next Tuesday"

**user\_persona** `Text` *required*

The personality and communication style of the simulated user that will be simulated throughout the conversation.
**Example**: "A busy professional who is direct and values efficiency. They prefer to get things done quickly without much small talk."

**input** `Text`

The first message the simulated user sends to start the conversation. If not provided, the system will generate an appropriate opening based on the goal and persona. Accepts a plain string or a JSON object for structured inputs (e.g. `{"user_message": "I need to book a flight", "channel": "web"}`). When using structured JSON, the `user_message` field becomes the message content and additional fields are accessible via `{{ input.field_name }}` in [endpoint templates](https://docs.galtea.ai/v5.16/concepts/product/endpoint-connection-configuration.md) and via `messages[0].metadata` in the [SDK](https://docs.galtea.ai/v5.16/sdk/api/agent/input.md).
**Example**: "Hello, I need to book a flight."

**stopping\_criterias** `Text`

A delimited string of conditions that, if met, will cause the conversation simulation to end. Use `;` or `|` as delimiters to separate multiple criteria.
**Example**: "The user has confirmed the flight booking|The chatbot indicates it cannot fulfill the request;User expresses satisfaction with the service"

**max\_iterations** `Number`

The maximum number of turns the simulator runs before the simulation automatically ends. It counts the live turns only: a test case that [starts from a predefined conversation](https://docs.galtea.ai/v5.16/concepts/product/dataset/test-case.md#starting-a-scenario-from-a-conversation) runs this many turns on top of it. A 4-turn predefined conversation with `max_iterations` 1 runs one new turn and the session ends with 5. This prevents infinite loops and controls test duration.
**Example**: 10

**scenario** `Text` *required*

A brief description of the scenario for documentation and organizational purposes. This helps categorize and manage different types of conversations.
**Example**: "Flight booking scenario for business travelers"

**conversation\_history** `Text`

A conversation that already happened, which the simulation continues from instead of starting empty. The cell holds a JSON array of turns, each one `{"role": "user"|"assistant", "content": "..."}`. A turn carrying `retrieval_context` is refused. Only Behavior datasets accept this column; an Accuracy or Security dataset with a value in this column is refused.

When a row sets this column, its `input` is ignored: the simulation continues from the turns you gave, and the simulator writes the next user message. Such a row must not attach [Galtea files](https://docs.galtea.ai/v5.16/concepts/product/version/session/content-parts.md#galtea-files) to its `input`, because the platform supports them on single-turn runs only and a seeded run is multi-turn.

This applies to a text run. A voice run (a phone or WebRTC connection) ignores this column and still opens the conversation from `input`, so keep `input` filled for a voice product.
**Example**: `[{"role": "user", "content": "I need to book a flight"}, {"role": "assistant", "content": "Sure, where to?"}]`

## Using Behavior Datasets with the Conversation Simulator

Behavior datasets are specifically designed to work with Galtea's [Conversation Simulator](https://docs.galtea.ai/v5.16/concepts/product/dataset/test-case/conversation-simulator.md). When you run evaluations using behavior datasets, the system will:

1. **Initialize the conversation** using the `input` and `user_persona`
2. **Generate realistic user responses** based on the `goal` and conversation history
3. **Continue the dialogue** until one of the `stopping_criterias` is met or the run has added `max_iterations` turns
4. **Evaluate the conversation** using your selected [metrics](https://docs.galtea.ai/v5.16/concepts/metric.md) to assess performance

For detailed implementation examples, see the [Conversation Simulator Tutorial](https://docs.galtea.ai/v5.16/sdk/tutorials/simulating-conversations.md).

## Data Catalog

When generating behavior datasets, you can optionally upload a **Data Catalog** — a file containing
reference data from your product's domain. This helps the generator produce scenarios grounded in
realistic values rather than fully fictional ones.

> [!NOTE]
>
> The data catalog does not need to contain real production data. Synthetic samples, anonymized
> records, or representative mock data all work equally well — what matters is that the values
> reflect the shape and variety of your domain.

### How it works

Values from the data catalog are incorporated into the **scenario** field of each generated test
case. User personas remain fully synthetic and are never populated from the catalog.

For example, if your product is a banking assistant, a data catalog might include sample account
types, transaction descriptions, and card IDs. The generator would then reference those values
in scenarios like *"User asks about a pending charge of €47.80 at REST LA BARRACA on card C-001"*
instead of inventing generic placeholders.

### Supported formats

CSV, JSON, JSONL, XML, YAML, and TXT files up to 50 MB.

### What to include

* Domain entities your users would reference (product names, plan tiers, category labels)
* Sample identifiers (order IDs, ticket numbers, account codes)
* Representative amounts, dates, or statuses
* Any reference data that makes scenarios feel grounded in your specific domain

### What to avoid

* Actual customer PII or production credentials
* Internal system IDs or backend states that end users would never see
* Extremely large datasets — the generator uses up to \~50,000 characters of content

## Best Practices for Manually Creating Behavior Datasets

> [accordion] Goal Definition
>
> <ul>
>   <li>Make goals specific and measurable</li>
>   <li>Include realistic constraints (time, budget, preferences)</li>
>   <li>Vary complexity across different scenarios</li>
>   <li>Consider both successful and unsuccessful outcomes</li>
> </ul>

> [accordion] User Persona Creation
>
> <ul>
>   <li>Include personality traits that affect communication style</li>
>   <li>Specify technical knowledge level and domain expertise</li>
>   <li>Define emotional states and motivations</li>
>   <li>Consider cultural and contextual factors</li>
> </ul>

> [accordion] Stopping Criteria Design
>
> <ul>
>   <li>Include both positive outcomes (goal achieved) and negative outcomes (failure, frustration)</li>
>   <li>Account for edge cases where the conversation might stall</li>
>   <li>Use multiple criteria connected with "|" or ";" to cover various scenarios</li>
>   <li>Make criteria specific enough to be clearly identifiable</li>
> </ul>

> [accordion] Scenario Coverage
>
> <ul>
>   <li>Test common user journeys and edge cases</li>
>   <li>Include scenarios with different complexity levels</li>
>   <li>Cover various user types and use cases</li>
>   <li>Test both cooperative and challenging user behaviors</li>
> </ul>

## Related

> [card] [Input Schema](https://docs.galtea.ai/v5.16/concepts/product/endpoint-connection-input-schema.md)
>
> Define structured, multi-field inputs for generated test cases.

> [card] [Simulating Conversations](https://docs.galtea.ai/v5.16/sdk/tutorials/simulating-conversations.md)
>
> Tutorial on running multi-turn conversation simulations with the SDK.

> [card] [Conversation Simulator](https://docs.galtea.ai/v5.16/concepts/product/dataset/test-case/conversation-simulator.md)
>
> Learn how the Conversation Simulator creates realistic synthetic dialogues.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.