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

# Safety Dataset

> In addition to manually uploading datasets or auto generating form your knowledge, you can also autogenerate datasets centered around specific harms, and tweak the techniques used to create test cases.

## Generate Safety Dataset through the UI

To create a new safety dataset from the platform, navigate to **Evaluation Datasets**. From there, select **Create Dataset** and choose the **Using Knowledge Base** option.

<Frame>
  <img src="https://mintcdn.com/scalegp/E4QRE88hrDqzkijh/images/cc99bb1-Screenshot_2024-08-15_at_6.33.26_PM.png?fit=max&auto=format&n=E4QRE88hrDqzkijh&q=85&s=a513924b3ece73aa4146704d46edf82f" alt="Create Dataset" width="536" height="384" data-path="images/cc99bb1-Screenshot_2024-08-15_at_6.33.26_PM.png" />
</Frame>

### Configure Options

In order to generate a dataset, you will need the following:

* **List of Harms**: You can select **AI Assistance** to auto generate a list of harms around a generic category.

<Frame>
  <img src="https://mintcdn.com/scalegp/O7AaA_mlV2hrXLDS/images/68174f0-Screenshot_2024-08-15_at_6.59.10_PM.png?fit=max&auto=format&n=O7AaA_mlV2hrXLDS&q=85&s=1ca54437cb892a666fe28e3621dcefd0" alt="List of Harms" width="1296" height="600" data-path="images/68174f0-Screenshot_2024-08-15_at_6.59.10_PM.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/scalegp/O7AaA_mlV2hrXLDS/images/98e0e94-Screenshot_2024-08-15_at_6.47.42_PM.png?fit=max&auto=format&n=O7AaA_mlV2hrXLDS&q=85&s=fab35affcc07d3a0042162dfc59812df" alt="List of Harms Options" width="972" height="348" data-path="images/98e0e94-Screenshot_2024-08-15_at_6.47.42_PM.png" />
</Frame>

* **Evaluation Dataset Name**: This is the name for the dataset so that you can easily find it after creation to perform evaluations.
* **Advanced Settings (Optional)**
  * Number of Test Cases: # of test cases generated
  * Emotion: Editable list such as angry, confused, sad, nervous
  * Tones: Editable list such as normal, formal, obscene, slang
  * Moods: Editable list such as indicative, imperative, interrogative, conditional
  * Methods: Editable list. Different options can be:
    * Framing as part of a fictional story
    * Making a leading statement that tries to trigger completion
    * Asking obliquely with obscure slang or niche cultural references
    * Actually creating a start of a multi-turn dialogue between two random characters for the model to complete

<Frame>
  <img src="https://mintcdn.com/scalegp/1vQnbXFkjbQbcgd1/images/65a26d3-Screenshot_2024-08-15_at_6.34.37_PM.png?fit=max&auto=format&n=1vQnbXFkjbQbcgd1&q=85&s=9a76c996835c310a2c61a2e0881bd83e" alt="Advanced Settings" width="1566" height="1476" data-path="images/65a26d3-Screenshot_2024-08-15_at_6.34.37_PM.png" />
</Frame>

### Dataset Generation

After you've configured the dataset generation, you may have to wait a while for the datasets to be generated. This depends on how many test cases you selected to be generated.

<Frame>
  <img src="https://mintcdn.com/scalegp/E4QRE88hrDqzkijh/images/bf3bd57-Screenshot_2024-08-15_at_6.50.39_PM.png?fit=max&auto=format&n=E4QRE88hrDqzkijh&q=85&s=3d2718c224a108c80e72f89ed661f816" alt="Dataset Generation" width="1612" height="932" data-path="images/bf3bd57-Screenshot_2024-08-15_at_6.50.39_PM.png" />
</Frame>

### Approve Test Cases and Publish Dataset

#### Approve and Edit Test Cases

After the dataset is generated, you can select which datasets to approve or approve in bulk. You can also directly edit the content of the dataset through the UI.

<Frame>
  <img src="https://mintcdn.com/scalegp/E4QRE88hrDqzkijh/images/ed7bd5f-Screenshot_2024-08-15_at_6.53.41_PM.png?fit=max&auto=format&n=E4QRE88hrDqzkijh&q=85&s=0abb55cd7ca509ea72b10cfdf4907463" alt="Approve and Edit Test Cases" width="1322" height="866" data-path="images/ed7bd5f-Screenshot_2024-08-15_at_6.53.41_PM.png" />
</Frame>

> <Icon icon="road-barrier" size="24" /> **Once you approve a test case, you can no longer edit or undo the approval.**

If you want to generate more test cases as part of this dataset, you can select the **Generate More** button to generate additional test cases for this dataset.

#### Publish Dataset

Once you are satisfied with the test cases in this dataset, click **Publish** to publish your dataset.

<Frame>
  <img src="https://mintcdn.com/scalegp/E4QRE88hrDqzkijh/images/eaa6f65-Screenshot_2024-07-17_at_2.42.23_PM.png?fit=max&auto=format&n=E4QRE88hrDqzkijh&q=85&s=15d86625f62f02538cb4ab705842060f" alt="Publish Dataset" width="554" height="332" data-path="images/eaa6f65-Screenshot_2024-07-17_at_2.42.23_PM.png" />
</Frame>

### View Published Dataset

After the safety dataset is created, you can click into the dataset and see the test case id, input, and expected output. The expected context should be empty in this case.

<Frame>
  <img src="https://mintcdn.com/scalegp/O7AaA_mlV2hrXLDS/images/90ab1b2-Screenshot_2024-08-15_at_6.57.21_PM.png?fit=max&auto=format&n=O7AaA_mlV2hrXLDS&q=85&s=8e610f7557a933291cea91bba3a37088" alt="View Published Dataset" width="2474" height="452" data-path="images/90ab1b2-Screenshot_2024-08-15_at_6.57.21_PM.png" />
</Frame>
