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

# Data Generate

> Generates synthetic or sample data from scratch based on a provided MCP (schema/config), producing records that conform to the defined structure and constraints.

Data Generate generates synthetic or sample data from scratch based on a provided MCP (schema/config), producing records that conform to the defined structure and constraints. You describe what kind of data you need, and the system generates realistic conversations tailored to your specifications.

## Two-Phase Generation Strategy

Generation uses a two-phase workflow to ensure quality:

1. **Phase 1: Pilot Optimization**: Runs several iterations, generating small batches for validation and refinement. You can provide feedback to improve or customize your personalized generation agentic system.

2. **Phase 2: Large-Scale Generation with Online Monitoring**: Uses the optimized generation agentic system from Phase 1 to generate your complete dataset at scale.

## Parameters

| Parameter        | Required | Description                                                                                   |
| ---------------- | -------- | --------------------------------------------------------------------------------------------- |
| `domain`         | Yes      | The problem space or topic area (see [Domain](/products/eigendata-cli/core-concepts/domain))  |
| `request`        | Yes      | Description of data to generate                                                               |
| `final_samples`  | Yes      | Number of samples to generate                                                                 |
| `schema_file`    | One of   | Path to a local [schema file](/products/eigendata-cli/core-concepts/function-schema)          |
| `mcp_server_url` | One of   | URL of an [MCP server](/products/eigendata-cli/core-concepts/mcp-server) providing the schema |
| `data_language`  | No       | Language mix specification                                                                    |
| `reference_doc`  | No       | Path to reference documentation                                                               |

<Note>You must provide either `schema_file` or `mcp_server_url` as the function schema source.</Note>

This feature uses the standard [chatbot interaction flow](/products/eigendata-cli/core-concepts/chatbot-interaction). Describe what data you want to generate in natural language, and the CLI guides you through parameter collection and confirmation.

## Phase 1: Pilot Optimization

After you confirm the configuration, Phase 1 begins. The system runs several iterations, each producing a small batch of samples for validation.

The CLI displays a live progress tracker showing the current iteration, elapsed time, and workflow pipeline status.

<Frame>
  <img src="https://mintcdn.com/eigenai-cdd6dc07/dqoKrecljL4ru1jj/products/eigendata-cli/images/progress.png?fit=max&auto=format&n=dqoKrecljL4ru1jj&q=85&s=df8a38a24c1e65115177b89579de2025" alt="Live progress tracker showing iteration, elapsed time, and pipeline status" width="2110" height="714" data-path="products/eigendata-cli/images/progress.png" />
</Frame>

### Provide Feedback

During each Phase 1 iteration, the CLI opens a browser-based review interface displaying the generated samples. You can:

* Review each generated conversation
* Add per-sample feedback in the provided text areas
* Submit with no feedback if the samples look good

<Frame>
  <img src="https://mintcdn.com/eigenai-cdd6dc07/dqoKrecljL4ru1jj/products/eigendata-cli/images/generate_humanfeedback.png?fit=max&auto=format&n=dqoKrecljL4ru1jj&q=85&s=bf5c127983f523a77b5afae2090e1cda" alt="Browser-based review interface for providing feedback on generated samples" width="2754" height="1904" data-path="products/eigendata-cli/images/generate_humanfeedback.png" />
</Frame>

Your feedback is summarized and used to refine the generation strategy for subsequent iterations, progressively improving output quality.

## Phase 2: Large-Scale Generation with Online Monitoring

Phase 2 starts automatically once Phase 1 completes. The system uses the optimized generation strategy to produce your full dataset at the target scale, processing in batches.

The CLI continues showing progress until the run finishes.

## Completion

Upon completion:

<Frame>
  <img src="https://mintcdn.com/eigenai-cdd6dc07/dqoKrecljL4ru1jj/products/eigendata-cli/images/generate_finish.png?fit=max&auto=format&n=dqoKrecljL4ru1jj&q=85&s=e9930009945edf9b8f29ef9c1bd6bd4b" alt="Data generation completion summary with output paths" width="3368" height="644" data-path="products/eigendata-cli/images/generate_finish.png" />
</Frame>

<Note>The sampling config file can be reused for future resample operations to skip Phase 1.</Note>

## Resample: Quick Generation with Saved Config

If you are satisfied with a previous generation, use resample to skip Phase 1:

<Frame>
  <img src="https://mintcdn.com/eigenai-cdd6dc07/dqoKrecljL4ru1jj/products/eigendata-cli/images/resample.png?fit=max&auto=format&n=dqoKrecljL4ru1jj&q=85&s=9d6915e134a437bf9ba91d1cac0de37c" alt="Resample mode using saved configuration to skip Phase 1" width="1704" height="898" data-path="products/eigendata-cli/images/resample.png" />
</Frame>

## Output

After a run completes, results are saved under `outputs/` as a new run directory, for example:

* `outputs/generated_data_<run_id>/`

Inside the run directory:

* `generated_data.jsonl` - The generated dataset in JSONL format
* `datapoints/` - One JSON file per sample (expanded view of `generated_data.jsonl`)
* `metadata.json` - Run metadata (task type, parameters, primary files, timestamps)

The [viewer](../utility-commands/view) can browse and render these outputs.

## Example Output: Tau2-Bench Airline Domain

Below is an example of 20 multi-turn function-calling dialogs generated for the [Tau2-Bench](https://github.com/sierra-research/tau2-bench) airline customer service domain. Each sample is a realistic conversation involving booking, modification, cancellation, refunds, and baggage handling — with tool calls to airline backend APIs.

<Accordion title="Sample dialog excerpt">
  **User:**

  > Hi, this is Emma Smith, user id emma\_smith\_9363. I have three things I need handled across my bookings: 1) Please cancel reservation E9TZTU with a full refund. 2) Change the flights for reservation 1YVFB9 to travel on 2024-05-28 instead of 2024-05-27 AND upgrade to business class. 3) Add 2 checked bags to reservation ...

  **Assistant** → `get_user_details({"user_id": "emma_smith_9363"})`

  **Tool response:**

  ```json theme={null}
  {"user_id": "emma_smith_9363", "name": {"first_name": "Emma", "last_name": "Smith"}, "membership": "silver", ...}
  ```

  **Assistant** → `get_reservation_details({"reservation_id": "E9TZTU"})`

  **Tool response:**

  ```json theme={null}
  {"reservation_id": "E9TZTU", "origin": "PHL", "destination": "DTW", "cabin": "basic_economy", ...}
  ```

  **Assistant:**

  > I've pulled up your details. Let me walk through each request. For reservation E9TZTU — this is a basic economy round-trip flight from PHL to DTW. I need to let you know that basic economy reservations can only receive a refund as travel certificates, not a full cash refund ...
</Accordion>

**Dataset statistics:**

* **20 samples**, averaging **37 messages** per dialog
* **4–20 tool calls** per conversation across functions like `get_user_details`, `get_reservation_details`, `cancel_reservation`, `update_reservation_flights`, `book_reservation`, and more
* Covers diverse scenarios: cancellation, flight modification, baggage updates, refunds, payment handling, insurance, and membership-related requests

<CardGroup cols={2}>
  <Card title="Download sample data" icon="download" href="https://gist.github.com/jind11/a4e43e135522991453f7374d7fc54e98">
    20-sample JSONL file (OpenAI format)
  </Card>

  <Card title="Browse dialogs interactively" icon="comments" href="https://gist.github.com/jind11/4df4bfe03db06bf7855383fa2ae20b38">
    Interactive HTML dialog viewer
  </Card>
</CardGroup>

## Using /execute

You can also run data-generate non-interactively via [`/execute`](../utility-commands/execute) with a YAML config.

**Prerequisites**

* You have a YAML configuration file available.
* You provide a schema source (`schema_file` or `mcp_server_url`).

```yaml theme={null}
task: data-generate
domain: airline customer service
request: Generate 10 multi-turn function-calling dialogs with diverse tool usage.
final_samples: 10
mcp_server_url: http://127.0.0.1:8009
```
