Run Your First Experiment
This workflow starts from an existing eval and runs it under two controlled configurations. The experiment file defines what may differ; Vally rejects undeclared drift before execution.
Prerequisites: complete Runtime Setup and have a working
evals/hello/eval.yaml from Run Your First Eval.
-
Create two named variants
Create
experiments/model-comparison.experiment.yaml:name: starter-model-comparisonevals:- ../evals/hello/eval.yamloverrides:runs: 5vary:- /defaults/modelbaseline: currentvariants:current:overrides:model: gpt-5.5candidate:overrides:model: gpt-5.6-terraPaths in
evalsresolve from the experiment file. The sharedruns: 5override keeps this first experiment manageable while providing a useful comparison. Increase it when you need greater statistical confidence.baselinemust name a variant, andvaryauthorizes only the listed differences. See the normative Experiment File Schema. -
Preview the resolved plan
Terminal window vally experiment run experiments/model-comparison.experiment.yaml --dry-runThe preview executes no trials. It should identify
currentas the baseline and print two plans:currentwithgpt-5.5, andcandidatewithgpt-5.6-terra. Fix a validation or drift error before continuing. -
Run and compare the variants
Terminal window vally experiment run experiments/model-comparison.experiment.yaml \--output-dir ./experiment-results \--require-pass \--compare--require-passgates each variant’s normal grader verdict.--comparethen uses an LLM judge to compare every treatment with the declared baseline. It spends model tokens and uses the default judge model. -
Inspect the output
The command prints the exact timestamped run directory. For example:
experiment-results/└── 2026-09-08T20-41-10-885Z/├── report.md├── current/│ ├── results.jsonl│ └── run-summary.jsonl└── candidate/├── results.jsonl└── run-summary.jsonlEach
results.jsonlcontains trial records with experiment provenance. The comparison appears in command output; use the run directory for repeatable standalone comparison. -
Gate a regression
Terminal window vally compare ./experiment-results/<timestamp> --fail-on-regressionThis exits
1when a valid treatment verdict is a significant regression: its mean signed score is negative and its 95% confidence interval is entirely below zero. It also exits1when judging is partial or produces no signal. A complete comparison without a significant regression exits0.
The experiment run itself exits 1 for planning, execution, grading, configuration, or required
artifact-write errors. A valid failing grader verdict exits 1 only when --require-pass is set.
See the experiment exit-code reference for the
normative contract.
Expand a matrix
Section titled “Expand a matrix”Use matrix instead of hand-writing every combination. This example expands model x timeout into
four variants:
name: model-and-timeout-comparisonevals: - ../evals/hello/eval.yaml
matrix: model: path: /defaults/model values: [gpt-5.5, gpt-5.6-terra] timeout: path: /defaults/timeout values: [2m, 3m]
baseline: model: gpt-5.5 timeout: 2mThe stable generated names are:
model=gpt-5.5,timeout=2mmodel=gpt-5.5,timeout=3mmodel=gpt-5.6-terra,timeout=2mmodel=gpt-5.6-terra,timeout=3mThe baseline resolves to model=gpt-5.5,timeout=2m, and vary is derived from the two axis paths.
Preview the expansion with --dry-run; pass a generated name to --variant to run one cell.
Related reference
Section titled “Related reference”- Experiment file schema — fields, overrides, merge rules, and matrix constraints
vally experiment— options, output records, sharding, and merge behaviorvally compare— comparison statistics and regression semantics