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

# Datasets

> Build reproducible train and test data from project traces or an existing W&B project.

A dataset is a durable snapshot of usable model interactions. Model Distillation stores entries in Postgres for inspection and evaluation, then exports immutable artifacts when training starts.

<Card title="Create your first dataset" href="/model-distillation/studio/datasets-quickstart" arrow="true">
  Follow the step-by-step guide from source selection through row inspection.
</Card>

## Choose a source

Studio builds datasets from the project's own traffic. The API also accepts an existing W\&B project as a source. The following sections describe both.

### Project traffic

When the proxy recorded the traffic, use the current project's traces. In Studio, the **Source data** section of the **Create Dataset** dialog lets you choose the following settings:

* **Project version:** Pins the prompt and routing regime used to select traces.
* **Served by:** Keeps only traces that one model served. To keep training data teacher-only, select the teacher. **All models** mixes the outputs of every model that served the version.
* **After (UTC)** and **Before (UTC):** A fixed time window. Studio prefills the last 14 days as fixed timestamps.
* **Maximum traces:** The random sample size after filtering. The default is 20,000 and the maximum is 100,000.

Through the API, `filters` also accepts scalar trace metadata. Project-source reads use project-attributed Agent Spans and reconstruct the exact provider-shaped Chat Completions request and response.

### Existing W\&B project

To import compatible self-logged Weave calls that don't have Model Distillation project identity, set `source` to an object with `entity` and `project` in the API request instead of the string `"task"`. This source isn't available in the Studio dialog.

## Sampling and split

Whichever source you choose, the following settings control how many rows the dataset contains and how those rows are divided between training and test.

* **Maximum traces** caps the random sample after filtering.
* **Train / test split** reserves test rows for evaluations and model comparisons. The remaining rows are training data. The default is 90% training and 10% test.

Split assignment is deterministic and grouped by scenario, agent run, conversation, or trace. Related examples don't leak across train and test, and Model Distillation deduplicates inputs automatically.

<Note>
  Use a fixed date range. A moving window would make the same dataset configuration produce different training data later.
</Note>

## Inspect and filter rows

The dataset workbench shows messages, original output, relabeled output, comparison-model output, token estimates, split, and per-row evaluation results. Filters support the following criteria:

* Text in input or original output
* Train or test split
* Relabel status
* Whether an evaluation was applied

Delete invalid entries before training. Deleting a row doesn't alter the source trace.

## Append new traffic

To grow a dataset incrementally, use **Append** with a later fixed range. Model Distillation deduplicates entries by trace and turn. Appending increments the dataset revision and makes older relabel or evaluation results stale when their coverage no longer matches.

## What is excluded

Errored traces, incomplete streams, invalid Chat Completions shapes, and traces whose fidelity mapping is incomplete aren't eligible for training.

<Accordion title="API: List datasets for a project (GET /tasks/{alias}/datasets)">
  Agents can discover ready dataset IDs before starting relabeling, training, or evaluation:

  ```bash theme={"system"}
  curl --url "https://distillation.training.wandb.ai/v1/tasks/ticket-classifier/datasets" \
    --header "Authorization: Bearer $WANDB_API_KEY" \
    --header "Wandb-Entity: your-team"
  ```

  To create or append data, follow the copyable request in [Datasets Quick Start](/model-distillation/studio/datasets-quickstart). For reference details about this operation, see [List datasets](/model-distillation/reference/management/datasets/list-datasets).
</Accordion>
