DocsEvaluationDataset RunsData Model

Dataset Runs Data Model

This page describes the data model of datasets and dataset runs. For detailed reference please refer to the API Reference.

Datasets

Datasets are a collection of inputs and, optionally, expected outputs that can be during Dataset runs.

Datasets are a collection of DatasetItems.

Dataset object

AttributeTypeRequiredDescription
namestringYesName of the dataset
descriptionstringNoDescription of the dataset
metadataobjectNoAdditional metadata for the dataset

DatasetItem object

AttributeTypeRequiredDescription
datasetNamestringYesName of the dataset to add the item to
inputobjectNoInput data for the dataset item
expectedOutputobjectNoExpected output data for the dataset item
metadataobjectNoAdditional metadata for the dataset item
sourceTraceIdstringNoID of the source trace to link this dataset item to
sourceObservationIdstringNoID of the source observation to link this dataset item to
idstringNoUnique identifier for the dataset item. Dataset items are upserted on their id. Id needs to be unique (project-level) and cannot be reused across datasets.
statusDatasetStatusNoStatus of the dataset item. Defaults to ACTIVE for newly created items. Possible values: ACTIVE, ARCHIVED

DatasetRun

Dataset runs are used to run a dataset through your LLM application and optionally apply evaluation methods to the results.


DatasetRun object

AttributeTypeRequiredDescription
datasetNamestringYesName of the dataset
runNamestringYesName of the dataset run

DatasetRunItem object

AttributeTypeRequiredDescription
runNamestringYesName of the dataset run to add the item to
runDescriptionstringNoDescription of the run. If run exists, description will be updated
metadataobjectNoMetadata of the dataset run, updates run if run already exists
datasetItemIdstringYesID of the dataset item to link to this run
observationIdstringNoID of the observation to link to this run
traceIdstringNoID of the trace to link to this run. traceId should always be provided. For compatibility with older SDK versions it can also be inferred from the provided observationId.

Most of the time, we recommend that DatasetRunItems reference TraceIDs directly. The reference to ObservationID exists for backwards compatibility with older SDK versions.

End to end data relations

DataSetRuns can combine a few Langfuse objects:

  • DatasetRuns are created by looping through all or selected DatasetItems of a Dataset with your LLM application.
  • For each DatasetItem passed into the LLM application as an Input a DatasetRunItem & a Trace are created.
  • Optionally Scores can be added to the Traces to evaluate the output of the LLM application during the DatasetRun.

Was this page helpful?