> For the complete documentation index, see [llms.txt](https://docs.valohai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.valohai.com/genai/llm-evaluations-local-execution/organizing-your-evaluations-with-datasets.md). Agents can also search and read this documentation through its [MCP server](https://docs.valohai.com/~gitbook/mcp).

# Organizing your evaluations with Datasets

A dataset is your benchmark. It holds the samples your evaluation runs against, in versions you can lock, so a result from three months ago still means something today.

Each sample is a JSON object. Your evaluation function receives one at a time as `item`, and what the keys are called is up to you.

## What belongs in one dataset

Samples in a dataset share a structure, serve one evaluation purpose, and make sense to version together. When you change one sample, the rest are part of the same test set.

A QA benchmark:

```json
{"question": "What is the capital of France?", "expected_answer": "Paris", "category": "geography"}
{"question": "Who wrote Hamlet?", "expected_answer": "Shakespeare", "category": "literature"}
```

A summarization benchmark:

```json
{"input_text": "Long article text here...", "reference_summary": "Short summary.", "domain": "news"}
{"input_text": "Another article...", "reference_summary": "Another summary.", "domain": "science"}
```

Two benchmarks are two datasets. Keeping them apart is what lets you version one without disturbing the other, and what keeps a result's `dataset` label meaningful.

A version can carry an optional JSON Schema that validates every sample against it, shown in the **Schema** panel of the version editor. It is worth adding when more than one person writes samples.

## Create a dataset

Open **Datasets** in your workspace and click **Create new dataset**. Give it a name you will recognize later, such as "Customer Support QA", and a slug, such as `customer-support-qa`. The slug is generated from the name and you can edit it before creating.

![Create new dataset form with name and slug fields](https://4109720758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff3mjTRQNkASbnMbJqzJ2%2Fuploads%2FhgJ4d1xs9lfL0E6SOqR5%2FDatasetGuide1.png?alt=media\&token=39f91db5-962b-42b6-b58f-cff680115892)

The slug cannot be changed afterwards, and it is what your results are labeled with, so choose something stable. Slugs are lowercase alphanumeric with hyphens between words: `mmlu`, `my-eval-data`.

## Versions

A dataset is a stack of versions, and every version is either a draft or locked.

| State  | Editable                           | Can be attached to a task | Badge         |
| ------ | ---------------------------------- | ------------------------- | ------------- |
| Draft  | Yes, add, edit, and remove samples | No                        | Gray "Draft"  |
| Locked | No, fully immutable                | Yes                       | Dark "Locked" |

Create one from the dataset page with **Create new version**. The slug is either automatic, a date-based `2026-03-09-0`, or manual, something like `v1` or `initial`.

![Create new version form with automatic and manual slug options](https://4109720758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff3mjTRQNkASbnMbJqzJ2%2Fuploads%2F5JhYawia0yKOlnVMsjik%2FDatasetGuide2.png?alt=media\&token=2d935193-451a-45e1-9b70-8e517258bf35)

A draft is where you build the benchmark. It cannot be attached to a task, so an evaluation never runs against data that is still moving.

Locking it, with the **Lock** button in the top right, makes the version immutable. No sample can be added, edited, or removed after that, and locking is irreversible. That is the point of it: a result points at a locked version, and the data behind the result cannot change underneath it.

The most recently locked version of a dataset carries a **latest** badge.

## Add samples

Open a draft version to get the sample editor. **Add sample** at the bottom of the list creates an empty sample, and the JSON editor on the right is where you fill it in.

![Sample editor with the sample list and JSON editor](https://4109720758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff3mjTRQNkASbnMbJqzJ2%2Fuploads%2F0PZlHCe6kmrRpQdOSafw%2FDatasetGuide3.png?alt=media\&token=270cf7cf-fe46-4096-bcca-bb11e1e04fd6)

Changes stay local until you click **Save**, which writes them all at once. A green dot marks a newly added sample and a yellow dot an edited one, so you can see what is pending before you commit it.

![Sample list with markers for new and edited samples](https://4109720758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff3mjTRQNkASbnMbJqzJ2%2Fuploads%2Fgit-blob-45121c9596bc7b3169b3b59ca5b42f26fa4f2c85%2FDatasetGuide6.png?alt=media)

Hovering over a sample in the list gives you a copy icon, which duplicates it for editing, and a trash icon, which marks it for removal on the next save.

![Copy and delete icons on a sample in the list](https://4109720758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff3mjTRQNkASbnMbJqzJ2%2Fuploads%2FmZHB0BIU6BJ1yhSKRykb%2FDatasetGuide7.png?alt=media\&token=e7831b20-354f-4486-b630-7067b2ab94a3)

### Importing from JSONL

For anything larger than a handful of samples, use the **Import** tab in the left panel. Drag a `.jsonl` file onto the import area, click **Pick File** to choose one (`.jsonl`, `.json`, or `.txt`), or paste JSONL straight into the text area.

Every line is validated, and invalid ones are flagged in red with their line number. **Import** then adds the valid samples to the version.

One JSON object per line:

```
{"question": "What is 2+2?", "answer": "4"}
{"question": "What is the speed of light?", "answer": "299,792,458 m/s"}
```

## Copy a version

Copying starts a new draft from an existing version's samples. Use it to iterate on a version you already locked, to extend a benchmark while keeping the originals, or to cut a variant such as a harder subset.

Find the version in the table on the dataset page and click the copy-plus icon in the Actions column. The version form opens with that version already selected under "Copy samples from". Choose a slug and create.

![Version form with an existing version selected to copy from](https://4109720758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff3mjTRQNkASbnMbJqzJ2%2Fuploads%2FHAJleus8P0z2o2GvqfRT%2FDatasetGuide5.png?alt=media\&token=bd30f4fe-2407-43d7-b572-712a9e5a770d)

The Parent column records where each copy came from. Samples are shared internally until you edit one, at which point only the changed sample is written, so copying a large version costs you nothing.

## When to create a new version

Create a new version when you add or remove samples, correct an error such as a wrong expected answer, or change the shape of the data by adding a field across every sample.

Each version is an independent snapshot. Earlier locked versions are untouched, so older results keep pointing at the data they were actually measured against.

## Using a dataset in a task

Only locked versions can be attached. In the task form, click **Add Dataset**, pick your dataset, and choose **Latest** or a specific version.

![Task form with a dataset and version attached](https://4109720758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff3mjTRQNkASbnMbJqzJ2%2Fuploads%2FB73aeXYTkAwxN5ARGbIB%2FDatasetGuide4.png?alt=media\&token=ea6b0fc9-a07a-4735-bdca-35d48bd84278)

**Latest** resolves to the newest locked version at the moment the task is created, and the task keeps that version from then on. Locking a newer version later does not move an existing task onto it. [Configuring your evaluations with Tasks](https://docs.valohai.com/genai/llm-evaluations-local-execution/configuring-your-evaluations-with-tasks.md) covers the rest of the task form.

## Datasets in your code

There is nothing to download yourself. `task.run()` fetches the versions attached to the task and hands your function one sample at a time, in whichever format the file is in. See [Running your evaluations with valohai-llm](https://docs.valohai.com/genai/llm-evaluations-local-execution/running-your-evaluations-with-valohai-llm.md).

Datasets and versions are identified by slugs. A dataset slug is unique within a workspace, a version slug within its dataset, and the two together make a full slug, `customer-support-qa/2026-03-09-0`.

Results are labeled with the full slug, which is split on ingestion into a `dataset` label and a `dataset_version` label. That is what lets you group a comparison by dataset and filter it by version, or the other way around. `task.run()` attaches those labels for you. When you post by hand, pass the full slug:

```python
valohai_llm.post_result(
    task="my-evaluation",
    labels={"model": "gpt-4o", "dataset": "customer-support-qa/2026-03-09-0"},
    metrics={"accuracy": 0.85},
)
```

## Next steps

* [Configuring your evaluations with Tasks](https://docs.valohai.com/genai/llm-evaluations-local-execution/configuring-your-evaluations-with-tasks.md) for sweeping parameters over the dataset you just built
* [Running your evaluations with valohai-llm](https://docs.valohai.com/genai/llm-evaluations-local-execution/running-your-evaluations-with-valohai-llm.md) for the evaluation function that reads the samples
* [Analyzing and comparing results](https://docs.valohai.com/genai/llm-evaluations-local-execution/analyzing-and-comparing-results.md) for grouping results by dataset and version


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.valohai.com/genai/llm-evaluations-local-execution/organizing-your-evaluations-with-datasets.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
