A pass rate on 400 questions, and how sure it is
Until the shop runs its eval for real, a simulation stands in. Each question gets one hardness that both models face, with order questions easiest and fit questions hardest, plus a little luck for each model. Sonnet is set to be slightly stronger. The code then grades both models on all 400 questions.
A pass rate on 400 questions is an estimate of the rate on all the questions customers will ever ask. The standard error says how far that estimate tends to land from the truth: the square root of p × (1 − p) / n for a rate p on n questions. Anthropic's statistics guide for evals asks for it next to every eval score, and builds the 95% interval by adding and subtracting 1.96 times it. pass_rate_ci returns the rate and that interval. Gaps between rates are in percentage points, or points for short: 93% against 90% is 3 points.
import math
import random
rng = random.Random(28)
# what each question asks about
kinds = ["order"] * 160 + ["returns"] * 120 + ["fit"] * 120
# how hard each kind can get
reach = {"order": 0.8, "returns": 1.0, "fit": 1.3}
# True: the answer passed
sonnet, haiku = [], []
for kind in kinds:
# one hardness that both models face
hard = rng.random() * reach[kind]
sonnet.append(hard + 0.1 * rng.gauss(0, 1) < 1.0)
haiku.append(hard + 0.1 * rng.gauss(0, 1) < 0.93)
for name, passed in (("Sonnet", sonnet), ("Haiku", haiku)):
p, low, high = pass_rate_ci(passed)
print(f"{name}: {p:.1%}, 95% interval {low:.1%} to {high:.1%}")
Sonnet passes about 93% and Haiku about 90%. Do their 95% intervals overlap?