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

# SYNTHESIZE DATA

> Run each type of synthesis job in the Builder

Each type of synthesis has its own Builder form. To open one, go to the **Datasets** page, click `Create Dataset`, and choose the type. For help choosing, see [Types of synthesis](https://docs.oumi.ai/guides/synthesis.md#types-of-synthesis).

![Create Dataset menu with the three synthesis types below Upload a Dataset and Import Observability Logs](https://mintcdn.com/oumi/LXYdbfPPBaMyLoza/images/synthesis-menu.jpg?fit=max\&auto=format\&n=LXYdbfPPBaMyLoza\&q=85\&s=046d0804306b0b897cc8b6b563c4f9c5)

Every form ends the same way. Click `Execute`, enter a name in **Name your new dataset**, and confirm. You can follow the job on the [Jobs](https://docs.oumi.ai/guides/jobs.md) page, and the new dataset appears on the **Datasets** page when it finishes.

***

## GENERATE SYNTHETIC DATA FROM SCRATCH

Use this type when you have little or no data. You describe each row with [attributes](https://docs.oumi.ai/guides/synthesis.md#attributes), and the model writes the content. The form opens with a worked example that builds a sentiment classification dataset. Edit the example, or replace it with your own attributes. You can also [use your own agent harness](https://docs.oumi.ai/guides/harnesses/synthesis.md) to generate the assistant responses in each conversation.

1. On the **Datasets** page, click `Create Dataset`, then `Generate Synthetic Data from Scratch`.

2. In **Model & Inference**, select the `Model` and enter the `Number of Samples`. Start with a small number to check the output before you pay for a larger run.

   ![Model & Inference section with the Model, Number of Samples, Temperature, Max Output Length, Seed, and Requests per minute fields](https://mintcdn.com/oumi/LXYdbfPPBaMyLoza/images/synthesis-model-inference.jpg?fit=max\&auto=format\&n=LXYdbfPPBaMyLoza\&q=85\&s=1996476e660be18ac0078b241ef36298)

3. Optionally, in **Input Sources**, add the material the job should draw on: `Add Dataset`, `Add Document`, or `Add Example`. A dataset's metadata fields become attributes you can reference.

   ![Input Sources section with the Add Dataset, Add Document, and Add Example buttons](https://mintcdn.com/oumi/LXYdbfPPBaMyLoza/images/synthesis-input-sources.jpg?fit=max\&auto=format\&n=LXYdbfPPBaMyLoza\&q=85\&s=4236a5b9045a4dab968d3ece54b5e6c4)

4. In **Sampled Attributes**, define the properties that vary across rows. Give each attribute an `ID` and a list of `Possible Values`. Leave `Sample Rate` empty to give every value the same chance, or set rates to make some values more common, for example to match the mix you expect in production.

   ![Sampled Attributes section with a sentiment attribute and the values positive, neutral, and negative](https://mintcdn.com/oumi/LXYdbfPPBaMyLoza/images/synthesis-sampled.jpg?fit=max\&auto=format\&n=LXYdbfPPBaMyLoza\&q=85\&s=2a4084dcad4ee0181fd2b807151c2204)

5. In **Generated Attributes**, write the prompt for each piece of text the model writes. Reference other attributes with `{attribute_id}`, such as `{sentiment}`. To trim the model's output, open **Output Cleanup**, and reference the cleaned text by its `Cleanup Rule ID` in later steps.

   ![Generated Attributes section with a feedback\_text attribute whose user message references sentiment](https://mintcdn.com/oumi/LXYdbfPPBaMyLoza/images/synthesis-generated.jpg?fit=max\&auto=format\&n=LXYdbfPPBaMyLoza\&q=85\&s=dd586787674e47cfd4ff270a3fd478cf)

6. In **Transformed Attributes**, keep the `Chat` attribute and edit its messages. It assembles the conversation that becomes each row. In the example, the user message is the generated feedback and the assistant message is its sentiment.

   ![Transformed Attributes section with a conversation attribute of type Chat](https://mintcdn.com/oumi/LXYdbfPPBaMyLoza/images/synthesis-transformed.jpg?fit=max\&auto=format\&n=LXYdbfPPBaMyLoza\&q=85\&s=68a854a9d5c145a155a23a570102d93b)

7. Optionally, in **Output Configuration**, select a `Target Dataset` to add the rows to, or set a train, validation, and test split for the new dataset.

   ![Output Configuration section with Target Dataset, Dataset Distribution, and Passthrough Attributes](https://mintcdn.com/oumi/LXYdbfPPBaMyLoza/images/synthesis-output-config.jpg?fit=max\&auto=format\&n=LXYdbfPPBaMyLoza\&q=85\&s=8b9f36341b846bfcfd87e80d3998493d)

8. Click `Execute`, enter a name in **Name your new dataset**, and click `Generate Dataset`.

To have the model call tools or continue the conversation with a simulated user, see [Synthesize agent data](https://docs.oumi.ai/guides/synthesis/agent-data.md).

> [!NOTE]
>
> The job needs at least one generated attribute and one transformed attribute of type `Chat`, even though the form marks both sections optional.

### REFERENCING ATTRIBUTES

Use single braces to reference an attribute in a prompt or template, such as `{sentiment}`. For a sampled attribute, `{sentiment.description}` inserts the description of the value the row received. Curly braces are reserved for references, so don't use them for other text, such as JSON in a prompt.

***

## GENERATE COMPLETIONS

Use this type when you have prompts and need responses. For each row of the source dataset, the model you select writes the assistant response. A common use is to generate training data from a strong teacher model, then fine-tune a smaller model on it.

1. On the **Datasets** page, click `Create Dataset`, then `Generate Completions`.
2. Select the `Model` that writes the responses and the `Source Dataset` that holds the prompts.
3. Optionally, set `Temperature`, `Requests Per Minute`, and a `System Instruction`. The system instruction is added to each conversation, or replaces the one it has.
4. Click `Execute`, enter a name in **Name your new dataset**, and click `Generate Completions`.

![Generate Completions form with claude-sonnet-5.5 as the model and banking77\_test\_basic.jsonl as the source dataset](https://mintcdn.com/oumi/LXYdbfPPBaMyLoza/images/synthesis-completions.jpg?fit=max\&auto=format\&n=LXYdbfPPBaMyLoza\&q=85\&s=ff4589c9bedb739874bede67f0b11772)

To have the model call tools or continue the conversation with a simulated user, see [Synthesize agent data](https://docs.oumi.ai/guides/synthesis/agent-data.md).

***

## GENERATE FROM FAILURE MODES

Use this type after an evaluation that ran with [failure-mode analysis](https://docs.oumi.ai/guides/evaluations/failure-modes.md). For each failing row you select, the model writes new conversations that avoid the same failure, so you can train the model on the errors it actually makes.

1. Select an evaluation on the **Evaluations** page, and click `Review Failure Modes`.

2. On the **Failure Modes** page, select the failure modes and failing rows to generate from, or click `Select All`.

   ![Failure Modes page with two failure modes of the banking77-accuracy evaluator selected, 220 failures in total](https://mintcdn.com/oumi/LXYdbfPPBaMyLoza/images/synthesis-failure-modes-page.jpg?fit=max\&auto=format\&n=LXYdbfPPBaMyLoza\&q=85\&s=05012063a06031966fa5ba89b5951987)

3. Click `Generate Dataset...` to open the Builder form.

4. Set `Samples per Item`, the number of new conversations for each failing row.

   ![Select Failure Modes section with the evaluation, the selected failure modes, and Samples per Item](https://mintcdn.com/oumi/LXYdbfPPBaMyLoza/images/synthesis-failure-modes-form.jpg?fit=max\&auto=format\&n=LXYdbfPPBaMyLoza\&q=85\&s=8d3f9ff6259ba80de9f195d61374d5bd)

5. In **Inference Configuration**, select the `Model` that writes the new conversations.

6. Optionally, in **Dataset Configuration**, select a `Target Dataset`, or set a train, validation, and test split.

7. Click `Execute`, enter a name in **Name your new dataset**, and click `Run Synthesis`.

You can also start this job from the **Builder**: choose `Generate from Failure Modes`, then pick the evaluation and failure modes in **Select Failure Modes**.

On a deployment's **Failure Modes** tab, `Generate Dataset` opens a quick **Generate Dataset** dialog instead. Choose a **Model**, optionally enter a **Dataset name**, set **Samples per item**, and click `Generate Dataset`. To change other settings, click `Advanced…` to open the Builder form.

### WHAT EACH FAILING ROW PRODUCES

For each failing row, Oumi generates **Samples per item** new conversations. Each one keeps the row's subject but makes a different request, in a situation where the same failure could happen again. The synthesis model writes the assistant's replies and is guided to avoid that failure.

Because the new conversations don't repeat the original requests, you can still use the original evaluation to test a model trained on them.

To correct the original conversations instead, set `generateNewConversations` to `false` in the [API](https://docs.oumi.ai/reference/schema/datasets.md#improved-samples). Each failing row then produces one corrected version of itself. These rows contain the original requests, so don't test on the original evaluation after training on them.

### CONVERSATIONS THAT CALL TOOLS

* **The job needs [tool implementations](https://docs.oumi.ai/guides/agents/tool-implementations.md).** `Generate Dataset` reuses the ones from the evaluation. Under `Advanced…`, set them in the **Tools** section. Without them, rows that called tools are skipped.
* **With lookup or endpoint tools, new conversations reuse the original's IDs.** These tools answer only for records that exist, so new conversations keep the names, numbers, and IDs from the original. With simulated tools, new conversations can use new ones.
* **The synthesis model plays the user** unless you choose a model in the **User Model** section.

### RUBRIC JUDGE FAILURE MODES

For a [rubric evaluator](https://docs.oumi.ai/guides/evaluators/judge.md#create-a-rubric-evaluator), generation targets only the failed criteria behind the failure modes you selected. To fix one behavior, select only its failure mode.

### FEWER ROWS THAN EXPECTED

The dataset can be smaller than the number of failing rows × **Samples per item**. Oumi drops new conversations that nearly duplicate each other. A failing row can also produce nothing, for example when it called tools and the job has none. The job lists the rows that produced nothing.

### TRACE A ROW TO ITS FAILURE

Each generated row stores the ID of the evaluation row it came from in its metadata, under `source_data_item_id`. Use it to compare a generated conversation with the failure it targets.

## TROUBLESHOOTING

| Problem | What to do |
| - | - |
| Generation is slow | Raise **Requests per minute** in the **Model & Inference** section, within your model provider's rate limit. |
| Output is cut off | Raise **Max Output Length** in the **Model & Inference** section. |
| The recipe fails validation | Give every attribute a unique ID, and fill in every required field. |

Start with a small **Number of Samples** to test a new recipe, and review the results before you generate a full dataset.


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