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

# Dataset from Trace

> Use details from a trace log to build datasets.

## Create a dataset from a trace

When viewing a trace, you can create a test case from any span that has inputs by clicking the `Add to dataset` button.

<img src="https://mintcdn.com/pareaai/3kurg3MZRrsWWk8t/observability/add_to_dataset.png?fit=max&auto=format&n=3kurg3MZRrsWWk8t&q=85&s=a5366871d488105ac03baf72dafb5db4" alt="add_to_dataset" width="1404" height="254" data-path="observability/add_to_dataset.png" />

Test cases are pre-defined datasets of inputs for prompt templates with the option to add a target (ground truth) and
tags for each case. You can use these test cases in the playground to test your prompts. [Learn more about test cases](/platform/test_hub/overview).

<img src="https://mintcdn.com/pareaai/3kurg3MZRrsWWk8t/observability/create_dataset_modal.png?fit=max&auto=format&n=3kurg3MZRrsWWk8t&q=85&s=1153611c096850d4e380a4d41f6c1f39" alt="create_dataset_modal" width="1894" height="733" data-path="observability/create_dataset_modal.png" />

The modal will pre-populate with the data from the span.

* The trace inputs will be mapped to key-value pairs. You can edit, delete, or add your own inputs as needed.
* The output field will be pre-populated as an optional `target`. You can edit or delete this as needed.
* Any tags will also be populated. You can edit or delete these as needed.

If there are any existing datasets with the same input keys, you can add the new case to that dataset.
Otherwise, you can click the `+` button to create a new dataset.

Datasets can be viewed/edited from the [Datasets](https://app.parea.ai/datasets) page.
And, in the [Playground](https://app.parea.ai/playground), you can load test cases for prompt testing.
