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. The --download flag asks the Output API for the most recent runs of the workflow and turns each one’s trace into a dataset YAML file with the input and output already filled in. The API reads the traces from S3, so the CLI needs no AWS credentials — only a reachable API. See API Configuration for the S3 read permissions the API requires.

What’s Next