Skip to main content

Dataset

create_item

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.

create_experiment

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.

delete_item

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.

add_step

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.

add_generation

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.