Skip to content

Commit d710eeb

Browse files
Findings: the smallest edits over three trials, through Claude Code
The split on missing content holds in every trial: four judges pass a third or more of incomplete answers, Inspect's two stay at 7% or under. Rates in the middle move by up to 18 points between trials, and strict is 5-16% here, not 0%. The counts are kept in tallies-repeat.json.
1 parent 1915da8 commit d710eeb

6 files changed

Lines changed: 111 additions & 8 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
`items`.
1414
- `knownbad diff` tests items, not single flips, for the same reason. The
1515
result has an `items` count of better, worse and mixed.
16-
16+
- Judge study: the smallest edits graded three times on all seven Haiku
17+
judges, through Claude Code. The split on missing content holds in every
18+
trial; rates in the middle move by up to 18 points between trials.
1719
- With `--cache`, the same answer reached by two workers at once is asked
1820
once. Before, both could miss the cache and both called the judge.
1921

‎docs/findings.md‎

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ say. The prompts do not say what most people assume they say.
6161

6262
**Wording decides it.** `naive` and `strict` are the same five lines on the
6363
same model. Adding "leaves out nothing the reference states" takes the pass
64-
rate for an incomplete answer from 40% to 0%.
64+
rate for an incomplete answer from 40% to 0%. Over three trials it was 33%
65+
to 9% ([section 4](#4-over-three-trials)).
6566

6667
### What that does to a score
6768

@@ -119,6 +120,57 @@ and the score does not say so.
119120
of cases, `promptfoo-rubric` in 8%. Some of those passes are defensible:
120121
"HTTP 200 means success. HTTP 203 means success." is true twice.
121122

123+
## 4. Over three trials
124+
125+
Sections 1 to 3 graded each control once. This run, on 2026-11-22, graded the
126+
smallest edits three times each on all seven Haiku 5.5 judges.
127+
128+
It is not the same setup, so compare the pattern, not single numbers:
129+
130+
- The calls went through the Claude Code CLI on a Claude subscription. It
131+
adds about 1,000 tokens of its own context to every call.
132+
- The controls were rebuilt with the current knownbad, so a few counts
133+
differ (48 reversed words, not 45).
134+
135+
It used 11.8 million tokens, and every call got a verdict.
136+
137+
| Judge | Sentence removed, by majority | Each trial | Same verdict all three times |
138+
|---|---|---|---|
139+
| `langchain-cot-qa` | 58% (42%–73%) | 58%, 53%, 56% | 93% (40 of 43) |
140+
| `langchain-qa` | 37% (23%–53%) | 44%, 26%, 40% | 74% (32 of 43) |
141+
| `promptfoo-rubric` | 37% (23%–53%) | 35%, 30%, 40% | 79% (34 of 43) |
142+
| `naive` | 33% (19%–49%) | 33%, 30%, 33% | 84% (36 of 43) |
143+
| `strict` | 9% (3%–22%) | 5%, 16%, 9% | 84% (36 of 43) |
144+
| `inspect-fact` | 7% (1%–19%) | 7%, 5%, 5% | 95% (41 of 43) |
145+
| `inspect-qa` | 7% (1%–19%) | 5%, 7%, 5% | 95% (41 of 43) |
146+
147+
"By majority" counts an answer as passed when two of its three verdicts
148+
passed it.
149+
150+
- **The split holds.** The same four judges passed a third or more of the
151+
incomplete answers in every trial. Inspect's two stayed at 7% or under in
152+
every trial. No judge changed sides.
153+
- **Mid-range rates move.** `langchain-qa` went from 44% to 26% to 40% on
154+
the same 43 answers, and a quarter of its verdicts on them changed between
155+
trials. Quote a rate like that from repeats, or with its interval.
156+
- **`strict` is not zero here.** It passed 5% to 16% per trial. Wording still
157+
decides most of it: `naive` passed 33%.
158+
- **The score example holds in shape.** System B from
159+
section 2 would score 37% under `langchain-qa` here, not 53%. A prompt
160+
still sets a partial answer's score to a third or more under four judges
161+
and near zero under three; the exact tie with A was one trial.
162+
- **Wrong content is caught steadily.** For a changed number, a reversed
163+
word and an added contradiction, no judge passed more than 7% by majority,
164+
and at least 92% of those answers got the same verdict all three times.
165+
`inspect-qa` passed 7% of contradictions (5 of 73), against 14% in one
166+
trial.
167+
- **References.** Every judge passed all 74 by majority. Of the 1,554
168+
single verdicts on them, three failed: two from `inspect-qa`, one from
169+
`naive`.
170+
171+
The counts are in
172+
[tallies-repeat.json](../study/judges/tallies-repeat.json).
173+
122174
## What we got wrong on the way
123175

124176
The study found two faults in our own instrument before it found anything
@@ -173,8 +225,11 @@ numbers above:
173225
- "0 of 6,283" is many controls from few items. Counted by item, as the
174226
report now does, zero leaks puts one judge's rate under 5% on its 74 items
175227
and under 14% for the three judges that ran on 25.
176-
- One trial per control. Rates near zero are firm; the 40–53% rates would
177-
move a few points on a rerun.
228+
- One trial per control in sections 1 to 3. Section 4 repeats the smallest
229+
edits three times: rates near zero stayed near zero, and rates in the
230+
middle moved by up to 18 points between trials.
231+
- Section 4 ran through Claude Code, which adds its own context to each
232+
call, so its rates are not a straight rerun of the API run.
178233
- Three of the ten judges ran on a third of the items, so their intervals
179234
are wide.
180235
- The promptfoo rubric wording and both `naive` and `strict` prompts are ours.

‎study/judges/README.md‎

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,31 @@ resumes where it left off, and any cell opens as a report:
6060
knownbad report study/judges/results/facts__naive__claude-haiku-5-5.json --html cell.html
6161
```
6262

63+
### Three trials through a Claude subscription
64+
65+
`repeat.py` grades the references and the smallest edits three times on
66+
every judge. It runs on Claude Haiku 5.5 through the Claude Code CLI, so it
67+
needs a logged-in Claude Code and no API key:
68+
69+
```bash
70+
export KNOWNBAD_CLAUDE_BIN=/path/to/claude # if claude is not on PATH
71+
python study/judges/repeat.py --trials 3 --workers 6
72+
python study/judges/summarise_repeat.py --save
73+
```
74+
75+
A stopped run resumes and skips finished cells. The counts are kept in
76+
[tallies-repeat.json](tallies-repeat.json), and
77+
`python study/judges/summarise_repeat.py tallies-repeat.json` prints the
78+
tables from them. The results are section 4 of
79+
[docs/findings.md](../../docs/findings.md#4-over-three-trials).
80+
6381
## Limits
6482

6583
- Synthetic items, written for this study. Real eval sets are messier.
66-
- One trial per control. Judges vary between calls; rates near a bar need
67-
repeats before they are quoted.
84+
- One trial per control in the main run. The repeat run shows rates in the
85+
middle move by up to 18 points between trials; rates near zero do not.
86+
- Claude Code adds about 1,000 tokens of its own context to every call, so
87+
the repeat run is not a straight rerun of the API run.
6888
- Inspect scores a reply it cannot parse as incorrect. That counts here as a
6989
caught control, because it is what an Inspect user would get.
7090
- The promptfoo rubric wording is ours. promptfoo leaves the rubric to the user.

‎study/judges/summarise_repeat.py‎

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
"""Tables for the repeat run: how steady each judge's pass rate is over three trials.
22
3-
python study/judges/summarise_repeat.py # reads results-repeat/
3+
python study/judges/summarise_repeat.py # reads results-repeat/
4+
python study/judges/summarise_repeat.py --save # also writes tallies-repeat.json
5+
python study/judges/summarise_repeat.py tallies-repeat.json # the kept counts, no raw files
46
"""
57

68
from __future__ import annotations
@@ -24,6 +26,12 @@
2426

2527
def load(folder: Path) -> dict[str, dict[str, list[list[bool]]]]:
2628
"""Per judge and family: the verdicts each answer got, one list per answer."""
29+
if folder.suffix == ".json":
30+
kept = json.loads(folder.read_text(encoding="utf-8"))["verdicts"]
31+
return defaultdict(
32+
lambda: defaultdict(list),
33+
{judge: defaultdict(list, families) for judge, families in kept.items()},
34+
)
2735
cells: dict[str, dict[str, list[list[bool]]]] = defaultdict(lambda: defaultdict(list))
2836
for path in sorted(folder.glob("*.json")):
2937
_, judge, _ = path.stem.split("__")
@@ -47,11 +55,17 @@ def cell(answers: list[list[bool]]) -> str:
4755

4856

4957
def main() -> int:
50-
folder = HERE / (sys.argv[1] if len(sys.argv) > 1 else "results-repeat")
58+
args = [a for a in sys.argv[1:] if a != "--save"]
59+
folder = HERE / (args[0] if args else "results-repeat")
5160
cells = load(folder)
5261
if not cells:
5362
print(f"No result files in {folder}.")
5463
return 1
64+
if "--save" in sys.argv:
65+
kept = {"judge_model": "Claude Haiku 5.5 via Claude Code", "verdicts": cells}
66+
(HERE / "tallies-repeat.json").write_text(
67+
json.dumps(kept, separators=(",", ":")) + "\n", encoding="utf-8"
68+
)
5569
order = sorted(cells, key=lambda j: -majority(cells[j]["drop"])[0])
5670

5771
print("Pass rate by majority of the trials, with the exact 95% interval\n")

‎study/judges/tallies-repeat.json‎

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

‎tests/test_study_judges.py‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,14 @@ def test_the_repeat_run_grades_references_and_smallest_edits_only():
116116
# Every edit is still held against a control that is in the run.
117117
ids = {c.id for c in kept}
118118
assert all(c.base in ids for c in kept if c.base)
119+
120+
121+
def test_the_kept_repeat_counts_give_the_published_tables(capsys, monkeypatch):
122+
import summarise_repeat
123+
124+
monkeypatch.setattr(sys, "argv", ["summarise_repeat.py", "tallies-repeat.json"])
125+
assert summarise_repeat.main() == 0
126+
out = capsys.readouterr().out
127+
# The rows docs/findings.md quotes from the repeat run.
128+
assert "| `langchain-qa` | 100% (74 of 74, 95%–100%) | 37% (16 of 43, 23%–53%)" in out
129+
assert "| `strict` | 5% | 16% | 9% |" in out

0 commit comments

Comments
 (0)