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

# Step 3 — Training set

> Generate a training set from your test set or add your own training logs.

The training set is the dataset that fine-tunes your base model. Full generation targets 2,000 synthetic labelled examples, and enhancement examples can be appended to the final training split. You can also add or reuse your own training data.

## The three training dataset sources

The step opens with a section heading **Training data source** and three selectable cards:

<CardGroup cols={3}>
  <Card title="Generate from test set" icon="wand-magic-sparkles">
    Uses 20% of your test set as seed examples and targets 2,000 synthetic labelled examples. **Recommended for first runs.**
  </Card>

  <Card title="Add training logs" icon="upload">
    Upload or import production logs. If labels are missing, you can explicitly start a metric-prompt labelling pass.
  </Card>

  <Card title="Use existing training set" icon="database">
    Reuse a previously generated, labelled, or uploaded training dataset from your workspace.
  </Card>
</CardGroup>

Pick one — clicking a card opens the next step for that source.

## Generate from test set

This option creates a training set from your test set in three steps:

1. Configure generation and generate a sample dataset
2. Review 50 sample rows and provide feedback to the generator
3. Request the full generation, targeting 2,000 synthetic examples, once you are happy with the samples

### Configure the generator

Configure generation with the following settings:

<Frame caption="Generate from test set drawer, configure phase — pick a model and dataset name before generating samples">
  <img src="https://mintcdn.com/v2galileo/-aQkdd7oOglUYIo1/images/luna-studio/runs/new-run-generate-config.png?fit=max&auto=format&n=-aQkdd7oOglUYIo1&q=85&s=30c3465ab6084b68e6d2f201373f03ca" alt="Generate drawer, config phase" width="1024" height="659" data-path="images/luna-studio/runs/new-run-generate-config.png" />
</Frame>

| Field                | Notes                                                                                                                                                 |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| Test set (read-only) | Shows your selected test set with the caption "Uses 20% of test set as seed examples".                                                                |
| Model                | The LLM that generates the training samples. Options depend on the providers you have configured. Larger models usually produce better training data. |
| Output dataset name  | Provide a name for the output dataset like `project-ABC-metric-PQR-training-set-v1`. Defaults to `generated-training-set`.                            |
| Metric (read-only)   | Includes a **View prompt** popover so you can re-check the metric prompt.                                                                             |
| Advanced settings    | Optional generation settings. Keep the defaults for first runs.                                                                                       |

Click **Generate sample dataset** at the bottom of the drawer, once you are happy with the settings.

### Review the sample data

<Frame caption="Generate from test set drawer, review phase — approve sample rows or regenerate before kicking off the full run">
  <img src="https://mintcdn.com/v2galileo/-aQkdd7oOglUYIo1/images/luna-studio/runs/new-run-generate-review.png?fit=max&auto=format&n=-aQkdd7oOglUYIo1&q=85&s=9cc494557abd06e4c58a4260880c85b5" alt="Generate drawer, review phase" width="1024" height="659" data-path="images/luna-studio/runs/new-run-generate-review.png" />
</Frame>

You're reviewing 50 sample rows before kicking off the full generation.

#### Provide feedback and Regenerate samples

You can provide feedback by selecting the rows that look wrong and clicking the **Regenerate** button. Once you click the button, the **Regenerate dataset** modal opens with a radio group of reasons:

| Reason                     | When to pick it                                                        |
| -------------------------- | ---------------------------------------------------------------------- |
| Samples are too repetitive | The generated rows look almost identical to each other.                |
| Labels look incorrect      | The labels don't match what the inputs deserve.                        |
| Inputs are off-topic       | The inputs don't reflect the kind of data your application sees.       |
| Provide own feedback       | Free-form text area reveals — describe what's wrong in your own words. |

Click **Regenerate** to kick off another sample generation.

The **Regenerate** button in the modal stays disabled until either a reason is picked or, for "Provide own feedback", the text is non-empty.

You can repeat the feedback and regeneration cycle as needed. Luna Studio tracks the cycles in the UI.

#### Generate the final dataset

Once you're happy with the samples, the footer button changes to **Generate final dataset**. Clicking it requests 2,000 synthetic examples. Enhancement examples derived from the seed data can then be appended, so the final training split can contain more than 2,000 rows. When generation completes, the drawer closes and Step 3 shows the **Training set completed** view (see below).

## Add training logs

The **Add training logs** path uploads or imports your own production logs.

Clicking the card opens the **Add training set** modal — the same generic dataset source modal used elsewhere in the app, with three sources:

<CardGroup cols={3}>
  <Card title="Upload from local" icon="upload">
    Drag-and-drop a `.csv` or `.jsonl` file. Use CSV for end-to-end run processing.
  </Card>

  <Card title="Fetch from URL" icon="link">
    Paste a publicly reachable or pre-signed `http://` or `https://` URL.
  </Card>

  <Card title="Import from Galileo" icon="cloud-arrow-down">
    Browse datasets in your connected Galileo workspace.
  </Card>
</CardGroup>

The upload is initially treated as pre-labelled. If validation finds that `label` is the only missing required column, choose **Label with metric prompt instead**. Luna Studio then opens the label-only generation drawer, where you configure a provider and model and explicitly start labelling. The resulting labelled dataset—not the raw upload—is used for training.

<Warning>The source picker accepts JSONL during ingestion, but current validation and data-generation paths read CSV. Convert JSONL to CSV before using it as training data.</Warning>

The labelled training set must contain at least 2,000 rows total and at least 100 examples per class. If you fetch from private object storage, use a pre-signed HTTPS URL; raw `s3://` and `gs://` URIs are not supported.

## Use existing training set

The **Use existing training set** path lets you pick a previously generated, labelled, or uploaded training dataset from this workspace without regenerating data or importing a new file.

### Validation

Luna Studio validates a selected training set against the metric-specific schema, label type, and row thresholds before attaching it to the run. If there are validation errors, they are highlighted. A dataset can remain available on the global Datasets page even when it is rejected for this run.

For more details, see [Validation](/luna-studio/ui/datasets/validation).

## Training set completed

After either flow finishes, the step replaces the picker with a **Selected dataset card** and (if available) a preview table.

<Frame caption="Step 3 once a training set is selected — the picker collapses into a card with a row preview">
  <img src="https://mintcdn.com/v2galileo/-aQkdd7oOglUYIo1/images/luna-studio/runs/new-run-training-set-completed.png?fit=max&auto=format&n=-aQkdd7oOglUYIo1&q=85&s=a5fdad6bc66a0d78214a365f940008ec" alt="Training set completed" width="1024" height="659" data-path="images/luna-studio/runs/new-run-training-set-completed.png" />
</Frame>

## Where to go next

<CardGroup cols={2}>
  <Card title="Step 4 — Config and launch" icon="play" href="/luna-studio/ui/runs/new-run/step-4-config-and-launch">
    Pick a base model and launch.
  </Card>

  <Card title="Training sets reference" icon="dumbbell" href="/luna-studio/ui/datasets/training-sets">
    Schema, validation rules, and sources.
  </Card>
</CardGroup>
