Compare Two Pipeline VersionsBeta
Find out whether a change to your pipeline, such as a new prompt or model, made it better or worse.
About This Task
Start an Experiment that compares a Candidate against a Baseline on one Dataset, judged by the pipeline's Evaluation goals. Unlike an experiment that only measures existing sessions, it can replay conversations: it reuses the conversations a version already has for the Dataset's test cases and replays only the shortfall. For the concepts behind it, see Candidate and Baseline Experiments.
To measure existing sessions instead, see Run an Experiment.
Prerequisites
- A Dataset with test cases.
- At least one Evaluation goal on the pipeline. See Define Evaluation Goals.
- At least one pipeline version to use as the Candidate.
Start a New Experiment
- In the Evaluation section, click Experiments, and then click New Experiment.
- In Name, type a name that says what you compare, for example new prompt against production.
- In Dataset, choose the Dataset whose test cases both sides answer.
- Under Candidate, choose the pipeline and the version you want to evaluate. The pipeline's Evaluation goals judge both sides, so the form has no scoring field.
- Under Baseline, choose what to compare against:
- Pipeline version: Choose a pipeline and a version, which can be another version of the Candidate's pipeline. The two versions must differ.
- Recorded conversations: Use each test case's own conversation, as the Dataset recorded it. Nothing is replayed for the Baseline.If every test case in the Dataset is table-based, nothing was recorded, so only the Candidate is scored. To get a comparison, choose Pipeline version.
- In Repetitions per test case, enter how many conversations each side scores for every test case. Existing conversations on that version are reused, and only the shortfall is replayed.
- In Replay, choose which requests of each conversation to send: First message only (the default) when a single question tests your change, or Whole conversation when the answer depends on follow-up messages.
- Check the preview below the form. For each side, it shows how many conversations are reused and how many are replayed. If nothing needs replaying, the preview says so.
- Click Start Experiment.
The Experiment appears in the Experiments list with the status Replaying, then Scoring, and finally Finished. Open it when it's Finished to read the results. If a replay fails, open the side's scoring grid to read its logs.
The dialog blocks Start Experiment and explains why in these cases:
- The Candidate and the Baseline are the same version. Pick a different version for one of them.
- The Experiment would score more results than the limit allows. Lower the repetitions per test case, or pick a smaller Dataset.
- A side would replay more conversations than the limit allows. Lower the repetitions per test case, or pick a smaller Dataset.
If the Experiment can't start, the dialog gives the reason. Fix it and start again.
Read the Results Table
When a side is scored, the Results section shows one row for each Metric. Each row shows:
- The score as
baseline → candidate. - A percentage badge for how much the score changed. No badge appears when the change is zero.
- Badges at the end of the row when the two sides don't match: for example
3 n/a results,2 errored, or4 unpaired. Unpaired means the test case has a value on one side only. The change is based on the test cases that have a value on both sides.
If every test case is table-based and you chose Recorded conversations, the page shows No baseline and scores only the Candidate. The Baseline value, the change, and the paired test case count are hidden.
The verdict follows the direction each Metric declares as better: lower for the built-in measurements, and the direction you set for a custom Score. A Score with no declared direction, and a Label Metric, reads neutral, so you decide whether the change is an improvement. To set a direction, see Metric Direction.
Cost, duration, and tokens per run appear as cards at the top of the results. Each card reads like a Metric row. The Tokens card shows input (in, sent to the LLMs) and output (out, generated by them) tokens on separate lines, for example 800 in → 1K in, so you can tell whether a cost change comes from a longer prompt or a longer answer. For what each built-in metric measures, see Built-In Pipeline Metrics.
A label Metric has no average. Each side shows how many test cases got each label and their share. See Read How Label Metrics Changed Against the Baseline.
If some evaluations of a Metric failed, the row shows an errored badge with their number. An n/a results badge means the Metric didn't apply to those test cases. It isn't a failure.
See How Test Cases Spread
A single mean can't tell you whether a change comes from a few outliers or from every test case. To find out, open the spread of a score. On a cost, duration, or tokens card, hover over the spread hint or focus it with the keyboard. In an expanded score row, the spread shows directly.
The spread lists the minimum, first quartile (Q1), median, third quartile (Q3), maximum, and mean of the per-test-case values, for the Baseline and for the Candidate.
Check the Values for Each Test Case
To find out why a value moved, click the Test cases heading to expand the list. It shows the values of each Metric for the Candidate and the Baseline. Expand a test case to see its details and open the conversations that produced the values.
Use the per-test-case verdict to find where the Candidate improved or regressed.
For a test case from an imported Dataset, viewing the Baseline's recorded conversation opens the imported conversation drawer, where you can read each turn and click Go to trace. For details, see View an Imported Conversation and Its Traces.
If a Metric has no value for a test case, it shows —: its evaluation errored, it did not apply, or it's still being scored. When the Candidate has no value, the change arrow is hidden. A test case with no values at all reads Not scored yet.
Manage the Experiment
If some evaluations failed, the side's card shows a warning. See Fix Failed Evaluations.
Use these actions:
- Rerun failed evaluations: Scores only the failed evaluations again.
- Rescore: Scores both sides again with the Metrics as they are now. Every evaluation runs and is billed again, but conversations aren't replayed. Use it after you change a Metric.
- Rename: Click the pencil icon next to the name to rename the Experiment.
- Change on a side's card: Pick a different pipeline version for the Candidate or the Baseline. The new version is scored on the same test cases, reusing the conversations it already has and replaying the rest. If a replay is needed, you confirm with Replay and change, and the side's current results are replaced.
- Delete: Deletes the Experiment and its results. Its conversations and replays are kept.
Open a Side's Scoring Grid
To see exactly what was scored, click Open scoring grid on a side's card. If the Baseline uses recorded conversations from several pipelines, the card has one link for each pipeline.
The scoring run page has one row for each Metric and lists the replays that produced the side's conversations. For each replay, you can open its setup and cleanup logs to find out why it failed.
Related Information
Was this page helpful?