Is the new prompt actually better?

A recipe for judging a prompt change with confidence intervals instead of two bare scores.

Add one sentence to the prompt

Better

  • 100 cases, one run+0.6 to +11.4
  • 600 cases, three runs+5.1 (+3.3 to +6.8)

Rewrite the policy as a checklist

Not measurable

  • 100 cases, one run−2.8 to +2.8
  • 600 cases, three runs+0.4 (−0.6 to +1.4)

Change in score, in percentage points, with 95% confidence intervals.

An interval that crosses zero means the eval cannot tell the change from noise. The small eval settles neither question. The full one settles both.

The question

You rewrite a prompt, rerun your eval, and the score goes up a few points. Is the new prompt better, or was it a lucky run? An eval is a sample of cases, and the model answers differently from run to run, so a single score cannot say.

What I built

A worked example with a made-up refund desk: 600 synthetic requests, each with a correct decision that comes from the policy written as code. The model gets the policy as three different system prompts, three runs each. The full run of 5,400 requests cost $0.57.

The recipe shows how to put a confidence interval on a score and on the difference between two prompts, how to tell run-to-run noise from case-to-case noise, and how to size an eval before paying for it. It ends in a release gate with two modes: the candidate is measurably better, or it is not worse by more than a margin.

What the run showed

Prompt change Difference (95% interval) Verdict
Add one sentence +5.1 points (+3.3 to +6.8) better
Rewrite the policy as a checklist +0.4 points (−0.6 to +1.4) not measurable

How it is tested

The statistics are checked against hand arithmetic and by simulation: a 95% interval has to cover the true value in about 95% of simulated experiments. A test recomputes every figure quoted in the write-up from the recorded run, so the prose cannot drift from the data.

The method follows Evan Miller, Adding Error Bars to Evals (2024).

Source

Built with Python, NumPy, Claude Haiku 5.5, Message Batches API, and pytest.

Open the repository