Datasets hold prompts and references for models to use within Experiments.

Prompts are the collection of messages that will be sent to models during a generation.

References are optional text against which the model generation will compare its result, it can be used during Experiment to compare a model's output with an expected text, using Evaluators.

For reusability purpose you can create Datasets as Resources and import them next within the Experiment panel.

Create a new Dataset

To create a new Dataset head to Resources > Dataset and select Create Dataset.

Once entering a title and a project, you'll be redirected to a prompt template screen where you can add any number of messages to your template.

You can define different role for each message, to learn more about roles see Role Management.

One Dataset collection can hold any number of prompt/reference combinations.

Dataset Entry panel, select **Add message** to add new messages to the prompt. Finish by pressing **Save**.

Dataset Entry panel, select Add message to add new messages to the prompt. Finish by pressing Save.

Using a CSV to import Datasets

To easily import Datasets you can choose to upload a .csv file containing your messages and reference details.

To do so, choose Import at the top-right of the panel and drag-and-drop your file.

You will then be able to configure the mapping from column in your csv to fields in the Dataset collection. Each row represents a separate dataset.

🚧

Your .csv file must use , as a delimiter.

Using an input as a reference

It is a common use-case to use an input variable as a reference in a dataset.

To do so, enter {{ variable_name }}in the reference field, you should see an input variable declared.

A `reference` input declared.

A reference input declared.

This variable can be replaced by inputs at runtime, this way you can make references modular on inputs by keeping them within your Inputs collection.

Use a Dataset in Experiments

During experiments, you can load a previously created Dataset by going to the Dataset tab and pressing Import > Import from Dataset.


📘

To learn more about Datasets in Experiments, see Datasets.