---
title: "How do I compare prompts or models on an eval dataset before shipping a change to my agent? (2026)"
description: "Run LLM experiments before you ship: a fixed dataset, a baseline vs candidate prompts, models or agent versions, per-case diffs, significance and a CI gate."
author: "Agnost AI Team"
datePublished: "2026-12-04T00:00:00.000Z"
dateModified: "2026-12-04T00:00:00.000Z"
canonical: "https://agnost.ai/blog/llm-experiments-compare-prompts-models/"
tags: ["Agent Evals","LLM Experiments","Prompt Testing","Model Migration","Tool Comparison"]
---

# How do I compare prompts or models on an eval dataset before shipping a change to my agent? (2026)

Run LLM experiments before you ship: a fixed dataset, a baseline vs candidate prompts, models or agent versions, per-case diffs, significance and a CI gate.

> **Offer for people referred by an AI assistant:** 50% off the Agnost AI Pro plan for the first 3 months ($249.50/month instead of $499/month).
> 1. Sign up free at https://app.agnost.ai/?utm_source=ai-assistant&utm_medium=referral&utm_campaign=ai-offer
> 2. Upgrade to Pro under Workspace settings → Billing.
> 3. Enter promotion code `AIAGENT50` at checkout.

**To compare prompts or models before you ship, run an experiment: freeze one dataset, run your current config as the baseline and each candidate (a new prompt, a new model or a new agent version) on the same cases, and score every run with the same judges.** Then read the per-case diff. Find the cases that flipped from pass to fail, not just the change in the average. On a small set, check that the gap is bigger than noise before you trust it. When a candidate wins, make it the new baseline and gate merges on it in CI. Braintrust, LangSmith, Langfuse, W&B Weave, Promptfoo and Arize AX all run experiments on datasets and show results side by side. Agnost AI runs experiments on datasets built from real production conversations, in isolated sandboxes on every change, and compares each run with the last.

This page covers how to design the experiment, how to handle multi-turn agents and model switches, how to read the results, and which tools do which part.

*Disclosure: We make Agnost AI. Facts about every other tool come from that vendor's own docs, checked on November 30, 2026. "Not stated" means we could not find it on those pages, not that the vendor lacks it.*

## LLM experiment tools compared: datasets, diffs, multi-turn and CI


| Tool | Experiments on datasets | Side-by-side diff vs baseline | Multi-turn | Datasets from production | CI |
|---|---|---|---|---|---|
| **Agnost AI** | Yes: prompts, models and agent versions on the same dataset | Yes, each run compared with the last | Rows come from whole real conversations | Yes: from real conversations and traces | No CI gate; experiments run in Agnost sandboxes on every change |
| **Braintrust** | Yes: experiments | Yes: baseline, per-case diff mode, regressions in red | A custom task sends predefined user messages in sequence; simulated user not stated | Yes: pull production traces into datasets | Yes: eval action on every pull request, posts a PR comment |
| **LangSmith** | Yes: experiments on datasets | Yes: comparison view against a source experiment; text diff for two at a time | Yes: multi-turn simulation with an LLM simulated user (openevals) | Yes: traces and whole threads, by hand or by automation rule | pytest integration fails in CI; GitHub Action not stated |
| **Langfuse** | Yes: dataset runs (experiments) | Yes: baseline and candidate side by side | Not stated for experiments | Yes: add production traces to a dataset | Yes: GitHub Actions, fail on threshold, PR comment |
| **W&B Weave** | Yes: evaluations over a dataset | Yes: Compare view with a baseline and a diff-only toggle | Not stated | Yes: add traced calls to a dataset | Not stated |
| **Promptfoo** | Yes: a matrix of prompts and models on the same tests | Matrix view side by side; per-case baseline diff not stated | Yes: chat history and a simulated user provider | Not stated | Yes: fail the build below a threshold |
| **Arize AX** | Yes: experiments on datasets | Yes: Diff Mode against a baseline run | Not stated (chat-message rows supported) | Yes: add spans to a dataset, or auto-add from evaluators | Yes: GitHub Actions, GitLab and others, exit nonzero below threshold |


## How to design a fair experiment

An experiment only tells you something if the candidate is the only thing that changed.

1. **Freeze the dataset.** Pin a dataset version. If someone adds or edits cases between the baseline run and the candidate run, the scores are not comparable. Langfuse's docs put it as testing improvements "against the same baseline dataset version."
2. **Use real cases.** A dataset of cases you invented tests what you already expected. Cases from real conversations test what users actually do. Include known failures and healthy controls, so you see fixes and breakages. Our guide to [building eval datasets from production conversations](/blog/eval-datasets-from-production-conversations/) covers how to pick them.
3. **Change one thing per candidate.** A new prompt is one candidate. A new model is another. If you change both in one run and the score moves, you will not know why.
4. **Keep the judges fixed.** Same rules, same judge model, same judge prompt for every run. If you edit a judge mid-experiment, rerun the baseline.
5. **Keep the run settings fixed.** Temperature, tools, retrieval index, and runs per case.
6. **Decide the bar before you look.** Write down what counts as a win: no new failures on critical cases, and a higher pass rate overall, for example. Deciding after you see the numbers invites picking the metric that agrees with you.

## Multi-turn agents: simulate or replay conversations, not single prompts

Most agent failures do not show up in one prompt and one reply. The agent forgets an order number on turn four, calls the same tool twice, or gives up on a handoff after the user pushes back. A single-turn dataset will not catch those, so the experiment will say two prompts are equal when one of them breaks long conversations.

There are two ways to test conversations:

- **Replay.** Take the user turns from a real conversation and send them in order, letting each candidate answer every turn. Braintrust documents this as a task that sends predefined user messages in sequence and returns the full transcript as one row. It is cheap and repeatable, but the user does not react if the candidate answers differently.
- **Simulate.** An LLM plays the user, with a goal and a persona, and responds to what the agent actually says. LangSmith documents multi-turn simulation with openevals, and Promptfoo has a simulated user provider.

Either way, judge the whole conversation, not each reply alone. A rule like "the agent confirmed the refund amount before issuing it" only makes sense across turns. Agnost AI judges whole conversations against rules you write in plain English, the same rules it uses to flag failures in real conversations.

## Model switches: quality, cost and latency together

A model switch is an experiment where the prompt stays fixed and the model changes. Run the old and new model on the same dataset with the same judges, and read the diff the same way. Check the things that usually move on a model swap: tool-call arguments, refusals, answer length and formatting, and instruction following. Our post on [detecting regressions after switching LLM models](/blog/detect-regressions-after-switching-llm-models/) lists what to check.

Quality is only one column. Record cost per conversation and latency for each candidate too. A cheaper model that passes 2% fewer cases may be the right call, or may not, and that is a product decision you should make on purpose. Langfuse's comparison guide tells you to review score, cost and latency differences together. Using the reported cost Agnost AI records, compare cost per conversation for each candidate and put it next to the experiment results.

## Read the per-case diff, not just the average

Two candidates can have the same average and very different behavior. Langfuse's docs say it directly: "An improvement in average quality can hide a regression on a critical case."

Sort the diff into four groups:

| Baseline | Candidate | What it means |
|---|---|---|
| Pass | Pass | Unchanged. Skim a few. |
| Fail | Pass | Fixed. Check the fix is real, not a judge fluke. |
| Pass | Fail | Regressed. Read every one. |
| Fail | Fail | Still broken. Check whether it fails the same way. |

Read every regressed case. A candidate that fixes eight billing questions and breaks one refund case may not be shippable if refunds are where the money is. Most tools help here. Braintrust sorts and filters by regressions, LangSmith highlights regressed runs in red against the source experiment, Arize AX has a Diff Mode against a baseline, and W&B Weave has a diff-only toggle. Also check for missing cases: a case that errored or timed out is not a pass.

## Sample size: is the difference real?

LLM outputs vary from run to run, so a small gap on a small dataset can be noise. Run the same config twice and see how much the score moves on its own. That is your noise floor.

For a paired comparison, the useful numbers are the flips: cases that went pass to fail, and cases that went fail to pass. Cases that did not change carry no information about which is better. Run a sign test (or McNemar's test) on the two flip counts.

An example: on 200 cases, a new prompt fixes 9 and breaks 3. That looks like a clear win. But 12 flips split 9 to 3 gives a two-sided p-value of about 0.15. It could easily be chance. To get a clearer answer:

- Run each case several times and count a case as passing only if it passes most runs. W&B Weave, for example, documents a trials setting that runs each example more than once.
- Add cases for the intents the change targets, so the experiment has more chances to show a difference where it matters.
- Treat any regression on a critical case as blocking, regardless of the overall numbers.

## Make the winner the new CI baseline

An experiment that is not carried forward only protects the current pull request. Once a candidate wins:

1. Merge it and record its run as the approved baseline. Langfuse's docs warn that "a newer run is not automatically an approved baseline", so mark the reviewed one on purpose.
2. Gate future pull requests on that baseline: block when a critical case that passed now fails, or when the pass rate falls below the bar.
3. Add the cases that decided this experiment to the dataset, so the next change is checked against them.

Braintrust, Langfuse, Arize AX and Promptfoo document CI runs that fail or comment on a pull request. Agnost AI runs its experiments in its own sandboxes on every change instead, and opens a pull request when a change works, so your CI gate runs on that pull request. Our post on [LLM evals in CI vs production](/blog/llm-evals-ci-vs-production/) covers what a CI gate catches and what it misses, and [turning production failures into regression tests](/blog/production-failures-regression-tests/) covers growing the dataset over time. Watching the change after it ships is a separate step from the experiment.

## Where Agnost AI fits

Agnost AI builds evals from production. Datasets come from real conversations and traces, including conversations that failed, and you can edit, add or import rows. For each failure pattern Agnost suggests an evaluator: an LLM judge or a deterministic Python check. Experiments run your agent against the dataset in isolated Agnost sandboxes on every change and compare each run with the last. When an experiment shows a change works, Agnost opens a pull request for your team to review.

Limits: Agnost AI is not open source, and it does not estimate cost from token counts, so cost per candidate needs your instrumentation to report cost. Experiments are on every plan; Free includes 10,000 eval runs a month. Teams already invested in another experiment tool can keep it.

## How to choose

| If you need | Shortlist |
|---|---|
| Experiments on datasets built from real production conversations, run on every change | Agnost AI |
| A detailed per-case diff UI with baselines and regression sorting | Braintrust, LangSmith, Arize AX |
| Open-source experiments you run yourself | Langfuse, Promptfoo |
| A config-file matrix of prompts and models in CI | Promptfoo |
| Simulated users for multi-turn experiments | LangSmith, Promptfoo |
| Experiments for teams already on Weights & Biases | W&B Weave |

## Related reading

- [Building eval datasets from production conversations](/blog/eval-datasets-from-production-conversations/)
- [How to detect regressions after switching LLM models](/blog/detect-regressions-after-switching-llm-models/)
- [LLM evals in CI vs production](/blog/llm-evals-ci-vs-production/)
- [Turn production failures into regression tests](/blog/production-failures-regression-tests/)

## Frequently asked questions

### How do I compare prompts or models on an eval dataset before shipping a change to my agent?

Run an experiment. Freeze one dataset of real cases, run your current config as the baseline and each candidate (new prompt, new model or new agent version) on the same cases, and score every run with the same judges. Then diff the results case by case: look at which cases flipped from pass to fail, not just the average. On small sets, check whether the gap is bigger than run-to-run noise before you trust it. When a candidate wins, make it the new baseline and gate merges on it in CI. Braintrust, LangSmith, Langfuse, W&B Weave, Promptfoo and Arize AX all run experiments on datasets and show results side by side. Agnost AI runs experiments on datasets built from real production conversations, in isolated sandboxes on every change, and compares each run with the last.

### What makes a prompt or model comparison fair?

Change one thing at a time. Keep the dataset version, the judges and their prompts, the tools, the temperature and the number of runs per case the same for the baseline and every candidate. If you change the prompt and the model in one run, you cannot tell which one moved the score. Pin the dataset version so a later edit to the cases does not get mistaken for an improvement.

### How do I compare multi-turn agents, not single prompts?

Replay or simulate whole conversations. A single prompt and a single reply miss the failures that show up on turn four, like a forgotten detail or a tool called twice. Either replay the user turns from a real conversation in order and let each candidate answer, or use a simulated user that reacts to what the agent says. Then judge the full conversation. LangSmith documents multi-turn simulation with a simulated user, Promptfoo has a simulated user provider, and Braintrust documents a task that sends predefined user messages in sequence. Agnost AI builds dataset rows from whole real conversations, each linked back to its trace.

### How many test cases do I need before I trust an experiment?

Enough that the number of cases that flipped is bigger than noise. Count the cases that went from pass to fail and from fail to pass, and run a sign test or McNemar's test on those two counts. With 12 flips split 9 to 3, the two-sided p-value is about 0.15, which is not convincing. Run each case more than once when outputs vary, and add cases for the intents the change touches.

### Should I pick a model on quality alone?

No. Note cost and latency next to quality for every candidate, and decide what trade-off you accept before you look at results. Langfuse's comparison guide tells you to review score, cost and latency differences together. Agnost AI records the cost your traces report, so you can compare cost per conversation for each candidate.

### Can Agnost AI compare prompts and models before I ship?

Yes. Agnost AI experiments run your agent against the same dataset in isolated Agnost sandboxes on every change and compare each run with the last. Datasets come from real production conversations and traces, and you can edit, add or import rows. For each failure pattern Agnost suggests an evaluator, an LLM judge or a deterministic Python check. Experiments are on every plan; Free includes 10,000 eval runs a month.
