Skip to main content
Datasets are YAML files that define test cases for your workflow evaluators. Each file contains a workflow input, optionally a cached output, and ground truth values that evaluators can check against. Datasets live in tests/datasets/ within your workflow directory:

Basic Dataset

The simplest dataset has a name, input, and cached output:
tests/datasets/basic_input.yml
The last_output contains the workflow’s cached result. When you run evals with --cached, the framework uses this output instead of re-executing the workflow.

Dataset with Ground Truth

For evaluators that need expected values, add a ground_truth section:
tests/datasets/stripe_blog.yml

Dataset Fields

Ground Truth Structure

Ground truth supports global values and per-evaluator overrides:
When an evaluator runs, the framework merges global ground truth with evaluator-specific values. Per-evaluator values override globals with the same key. In your evaluator, access them through context.ground_truth:

Managing Datasets with the CLI

Listing Datasets

Generating Datasets

You can generate datasets from scenario files, trace files, or production traces:
Generating datasets from traces is useful when you want to test against real production inputs. Download traces from S3, pick interesting ones, and the CLI creates dataset YAML files with the input and output already filled in.

What’s Next