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

# Dataset

<a id="literalai.evaluation.dataset" />

<a id="literalai.evaluation.dataset.Dataset" />

## Dataset

```python theme={null}
@dataclass(repr=False)
class Dataset(Utils)
```

<a id="literalai.evaluation.dataset.Dataset.create_item" />

#### create\_item

```python theme={null}
def create_item(input: Dict,
                expected_output: Optional[Dict] = None,
                metadata: Optional[Dict] = None) -> DatasetItem
```

Create a new dataset item and add it to this dataset.

**Arguments**:

* `input`: The input data for the dataset item.
* `expected_output`: The output data for the dataset item (optional).
* `metadata`: Metadata for the dataset item (optional).

**Returns**:

The created DatasetItem instance.

<a id="literalai.evaluation.dataset.Dataset.create_experiment" />

#### create\_experiment

```python theme={null}
def create_experiment(name: str,
                      prompt_id: Optional[str] = None,
                      params: Optional[Dict] = None) -> DatasetExperiment
```

Creates a new dataset experiment based on this dataset.

**Arguments**:

* `name`: The name of the experiment .
* `prompt_id`: The Prompt ID used on LLM calls (optional).
* `params`: The params used on the experiment.

**Returns**:

The created DatasetExperiment instance.

<a id="literalai.evaluation.dataset.Dataset.delete_item" />

#### delete\_item

```python theme={null}
def delete_item(item_id: str)
```

Delete a dataset item from this dataset.

**Arguments**:

* `api`: An instance of the DatasetAPI to make the call.
* `item_id`: The ID of the dataset item to delete.

<a id="literalai.evaluation.dataset.Dataset.add_step" />

#### add\_step

```python theme={null}
def add_step(step_id: str, metadata: Optional[Dict] = None) -> DatasetItem
```

Create a new dataset item based on a step and add it to this dataset.

**Arguments**:

* `step_id`: The id of the step to add to the dataset.
* `metadata`: Metadata for the dataset item (optional).

**Returns**:

The created DatasetItem instance.

<a id="literalai.evaluation.dataset.Dataset.add_generation" />

#### add\_generation

```python theme={null}
def add_generation(generation_id: str,
                   metadata: Optional[Dict] = None) -> DatasetItem
```

Create a new dataset item based on a generation and add it to this dataset.

**Arguments**:

* `generation_id`: The id of the generation to add to the dataset.
* `metadata`: Metadata for the dataset item (optional).

**Returns**:

The created DatasetItem instance.
