> For the complete documentation index, see [llms.txt](https://docs.datasaur.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datasaur.ai/llm-projects/dataset.md).

# Dataset

### Overview

The Dataset page in LLM Labs collects all datasets available for [automated evaluation](https://docs.datasaur.ai/llm-projects/evaluation/automated-evaluation) or [fine-tuning](https://docs.datasaur.ai/llm-projects/models/fine-tuning), providing a centralized location for managing your data.

### Prerequisites

Dataset must be formatted as a CSV (Comma Separated Value) file with the following columns:

1. `prompt`: This column contains the input prompt that you will feed to your LLM.
2. `expected completion`: This column holds the desired or ideal output that your LLM should generate in response to the given prompt.
3. `system_instruction` (Optional): This column contains global or contextual instructions that control how the LLM should interpret and respond to the prompt.

{% file src="/files/xM4DiBmBYdfzxLKH3YqG" %}

{% file src="/files/U9JQq45ugPPy8wNneCoW" %}

### Create dataset

1. Navigate to the **Dataset** menu on the left sidebar.
2. Click the **Create dataset** button.

   <figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-8f878876c1683f7677000951ea7bc536a2050157%2FDataset%20-%20Create%20Dataset.png?alt=media" alt=""><figcaption><p>Create dataset</p></figcaption></figure>
3. Type the dataset name then click **Create**, and you will be redirected to the dataset table.

   <figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-9edb0dae06e2a3749687cf2f5ff9ba16c2bc397a%2FDataset%20-%20Input%20Name%20%26%20Create%20Dataset.png?alt=media" alt=""><figcaption><p>Dataset name</p></figcaption></figure>
4. Click the **Upload** **dataset** button and select a .csv file containing the following columns: prompt, expected\_completion, and system\_instruction (optional).

   <figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-2438ffb373b5226e9816dcfafeb5e86c1a18addb%2FDataset%20-%20Upload%20Dataset.png?alt=media" alt=""><figcaption></figcaption></figure>
5. Once the file is uploaded, the dataset will be automatically added to the table.

   <figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-d44a0a5181edbf3251feb2b3f35860c2edeb5f37%2FDataset%20-%20Dataset%20Added.png?alt=media" alt=""><figcaption><p>Dataset created</p></figcaption></figure>

### Modify dataset item

Once a dataset is uploaded, you can **add more**, **edit**, or **delete** dataset items.

#### Add more dataset items

1. Click **Add dataset** button next to the Search field.
2. Upload the .csv file.
3. The additional datasets will be added to the table, and the existing ones remain.

   <figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-31b9f3033c268c79ed5377ce12c60933654347ce%2FDataset%20-%20Modify%20Dataset.png?alt=media" alt=""><figcaption><p>Adding more dataset</p></figcaption></figure>

#### Edit dataset item

1. Find the dataset item you want to edit using the **Search** field and right-click the dataset item to open a popover menu.

   <figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-3f8c9cf18ce17c551cfc6ee19162234f3eef1f14%2FDataset%20-%20Edit%201.png?alt=media" alt=""><figcaption></figcaption></figure>
2. Then click the **Edit** option.

   <figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-eb11879f43b0c841ff12010989d66270227a2153%2FDataset%20-%20Edit%202.png?alt=media" alt=""><figcaption></figcaption></figure>
3. Modify the necessary details, then click **Enter** to apply the updates.

Notes: For shortcut, you can simply double click the dataset item to edit the item

#### Delete dataset item

1. Find the dataset item you want to edit using the **Search** field and right-click the dataset item to open a popover menu.

   <figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-2e8e4547e38d387c17f8784bb34072ddc2f5e53a%2FDataset%20-%20Delete%201.png?alt=media" alt=""><figcaption></figcaption></figure>
2. Then click the **Delete** option.

   <figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-2ec3222fef7b7ed87519b6a20a78f2c3e562be03%2FDataset%20-%20Delete%202.png?alt=media" alt=""><figcaption></figcaption></figure>
3. The dataset item will be deleted immediately.

{% hint style="info" %}
Please note that this action cannot be undone.
{% endhint %}

### Delete entire dataset

1. In the main Dataset page, find the dataset you want to delete using the search field or filter options. Click the **More** menu (three-dots icon), then select **Delete** option.

   <figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-d1992d33a1f216f1988d87d2b001bcc5d8c1f554%2FDataset%20-%20Main%20page%20-%20More%20menu%20expanded.png?alt=media" alt=""><figcaption><p>Delete dataset option</p></figcaption></figure>
2. Confirm the deletion by clicking the **Delete** button.

   <figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-642a05d594e20a09c61f8d46e5a14a8432dfd820%2FDataset%20-%20Main%20page%20-%20Delete%20confirmation%20-%20single.png?alt=media" alt=""><figcaption></figcaption></figure>

To delete multiple datasets:

1. Select the datasets and click the **Delete** button above the table.

   <figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-487d1a940837a402dae4ae9d19960ffb2e0295da%2FDataset%20-%20Main%20page%20-%20Multiple%20datasets%20selected.png?alt=media" alt=""><figcaption></figcaption></figure>
2. Confirm the deletion by clicking the **Delete** button.

   <figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-5536886e722795cf8d308fab9f87480c76a9a21f%2FDataset%20-%20Main%20page%20-%20Delete%20confirmation%20-%20multiple.png?alt=media" alt=""><figcaption></figcaption></figure>

### Access via Automated evaluation

Once you've created the dataset, it will be available for use in the Automated evaluation projects. [Learn more about Automated evaluation](https://docs.datasaur.ai/llm-projects/evaluation/automated-evaluation).

Click **Use existing dataset** in Step 1 when creating an automated evaluation project.

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-5fc837828e34e57a6b8efba4ea44e608bf403b57%2FDataset%20-%20Automated%20Evaluation%201.png?alt=media" alt=""><figcaption></figcaption></figure>

A dialog will appear where you can choose the dataset to use for the project.

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-409a9ae5295c99d2e4d7871694ef0cfd35d285b2%2FDataset%20-%20Automated%20Evaluation%202.png?alt=media" alt=""><figcaption></figcaption></figure>

### Access via Fine-tuning

Once you've created the dataset, it will be available for use for fine-tuning base models. [Learn more about Fine-tuning](https://docs.datasaur.ai/llm-projects/models/fine-tuning) models.

Click **Use existing dataset** in Step 1 when configuring fine-tuning.

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-675a39dc0425dff2f674e13f7ace2865657820c0%2FDataset%20-%20Fine-tuning%201.png?alt=media" alt=""><figcaption></figcaption></figure>

A dialog will appear where you can choose a dataset for fine-tuning.

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-0e39a9861cc2e585426433eb8a01ecdd1edfa2e4%2FDataset%20-%20Fine-tuning%202.png?alt=media" alt=""><figcaption></figcaption></figure>
