Part 4 · Judging RAG · Chapter 22
Experiments you can trust
In one sentence: a result can be trusted when one thing changed, the comparison was made topic by topic, the plan was written before the scores, and the test data was never used to make a choice.
Why you should care
You now have measures and judges. The last step is to use them without fooling yourself. Most wrong conclusions in RAG work do not come from bad measures. They come from two changes made at once, from a difference that was only luck, or from trying many things and reporting the one that worked. This chapter collects the rules, and it uses our own mistakes as the examples.
Words you need
- Confound
- A second difference between two runs that you did not intend, so you cannot say which difference caused the result.
- Ablation
- An experiment that changes one part and keeps the rest fixed.
- Paired comparison
- Comparing two systems topic by topic, on the same topics.
- p-value
- How often a difference this large would appear by luck alone if the two systems were really equal.
- Multiple testing
- Running many tests, which makes it likely that one of them looks good by luck.
- Holm correction
- A standard way to adjust p-values when several tests were run.
- Pre-registration
- Writing down the plan, the measure and the rule for deciding before seeing the results.
- Test data
- The data a result is reported on. It must not be used to make any choice.
Core The idea
Rule 1: change one thing
If run B differs from run A in one way, a gap in score has one possible cause. If it differs in two ways, the gap tells you nothing about either. It sounds obvious, and it is the rule broken most often, because modern pipelines have dozens of settings and many of them have defaults nobody looked at. To know what really differed, compare the files the runs actually used, not the plan you wrote.
Rule 2: compare topic by topic
Topics differ far more than systems do. Some are easy for everyone and some are hard for everyone. Two averages hide that. Put the two systems side by side on each topic and count: on how many topics is B higher, on how many lower? Chapter 4 introduced the sign test for this count. It asks how likely such a split of wins and losses would be if the two systems were equal.
Rule 3: count your tests
With a threshold of 0.05, one test in twenty comes out “significant” by luck. Run thirty tests and you should expect one or two false alarms. So say how many tests you ran, and adjust. The Holm correction is simple: sort the p-values from smallest to largest, multiply the smallest by the number of tests, the next by one less, and so on.
Rule 4: write the plan first
Before the scores arrive, write down what you will compare, with which measure, and what result would count as a win. Give the note a date. This is pre-registration. It does not stop you from exploring afterwards. It lets you, and your readers, tell the planned findings from the ones you went looking for.
Rule 5: keep the test data blind
Every time you look at a test score and then change the system, a little of the test leaks into the system. After enough rounds, the test score describes your tuning and not your method. Use development data for every choice, and touch the test data once. A TREC track enforces this for you, because the answers do not exist when you submit (Chapter 23).
Rule 6: keep everything
Save the inputs, the prompts, the model names and versions, and every single verdict. A number you cannot rebuild from saved files is a number you cannot defend.
Watch and read
- PaperA Comparison of Statistical Significance Tests for Information Retrieval Evaluation Smucker, Allan and Carterette, 2007. Compares the common tests on real runs. It prefers the randomization test and the t test for comparing means, and argues against relying on the sign test for that purpose. Checked 16 Nov 2026
- SitePreregistration Center for Open Science. What a pre-registration is and how to write one. Read 16 Nov 2026
We have not found a short video on experiment design for search and RAG that we would recommend. One will be added when we do.
How we did it at TREC 2026
Rule 1, broken: the document order
Our two main RAG runs were built as a clean pair. Both used gpt-5-mini and the same 100 documents. One saw 500-character snippets, the other up to 1,000 words of each document. The question was the title of our talk: does more evidence help?
After the scores came, we rebuilt the facts from the evidence files and found a second difference. The snippet run saw its documents in the order of one reranker. The full-text run saw the same documents in the order of another reranker, on all 119 narratives. Our own run description said the two runs shared one evidence pool, which was true of the documents and not of their order. Models use the start and end of a long input best (Chapter 13), so order may matter.
| Reranker A order | Reranker B order | |
|---|---|---|
| Snippets | the snippet run | not run |
| Full text | not run | the full-text run |
We have two corners of a square. To read off the effect of longer evidence we need two cells in the same column. To read off the effect of order we need two in the same row. The honest statement of our result is: longer evidence together with a different order scored a little higher.
Rules 2 and 3: is the gap real?
We compared the two runs narrative by narrative with a sign test, and corrected for all the tests we ran.
| Measure | Full text higher | p | p after Holm |
|---|---|---|---|
| Automatic nuggets, vital strict (25 narratives) | 21 of 25 | 0.00028 | 0.0017 |
| Assessor nuggets, all strict (25 narratives) | 14 higher, 4 lower | 0.031 | 0.12 |
| Assessor rubrics (17 narratives) | the two runs tie on 14 of 17 | ||
Exact two-sided sign test with ties dropped. Source: our analysis of the scores e-mailed by the TREC RAG track organizers on 3 November 2026.
Only the automatic nuggets separate the two runs after correction. Under the assessors' nuggets the raw p-value of 0.031 would have passed the usual threshold, and the correction removes it. One narrative also carried much of that difference: without it, the mean gap on the vital measure falls from 0.026 to 0.014. So our answer to “does more evidence help?” is “probably a little, on one of three views, and we cannot separate it from document order”.
Rule 4: the plan for the judges
For Auto-Judge we wrote the plan on 25 September 2026, before the first pilot upload (Chapter 21). It fixed the target measures, the rule for choosing the main judge, the role of each run, and conditions under which we would stop. Before each round of uploads, the list of candidates was recorded in a log with a fingerprint of its contents, so it could not be edited afterwards without trace.
Rule 5: the test data
The Auto-Judge rules allowed a look at the first ten test topics, for engineering checks only, such as whether the code runs. We made no choice of judge or measure from them.
What surprised us
The second surprise is how we found the order confound: by not trusting our own notes. The run description was written in good faith and was wrong. The files were right.
Try it
- Take two versions of a RAG system that you believe differ in one setting. Dump the full prompt of each for one question and compare them line by line. Is it really one difference?
- Score both on 20 questions. Count wins, losses and ties. Run a sign test.
- Now compare on three measures. Apply the Holm correction to the three p-values.
- Before your next experiment, write five lines: what changes, what stays fixed, the measure, the test, and what result would change your mind. Date it.
Check yourself
- What is a confound? Give the example from our RAG runs.
- How many runs would separate the effect of evidence length from the effect of document order?
- Why compare systems topic by topic and not only by their averages?
- You run 30 tests at a threshold of 0.05. About how many false alarms should you expect if nothing is real?
- What does pre-registration protect against?
- Why did we report the two departures from our plan?
Answers
- An unplanned second difference between two runs. Ours: the two runs differed in evidence length and also in document order.
- Four: snippets and full text, each in both orders.
- Topics differ more than systems. A paired count shows whether one system wins consistently or on a few topics only.
- About one or two (30 × 0.05 = 1.5).
- Choosing the measure, the comparison or the story after seeing which one looks best.
- So readers can judge the result knowing where we left the plan. Hidden departures would make the plan worthless.
Go deeper
- Which test? The sign test uses only the direction of each difference, so it is easy to explain and weak. The paper above recommends the randomization test or the paired t test when you compare means. We also ran a Wilcoxon test on the assessor nuggets, which gave p = 0.044 before correction.
- Effect size. A tiny difference can be “significant” with enough topics, and a large one can fail with few. Always report the size of the gap next to the p-value.
- Mixed changes across model families. Our four other writers differed from the main runs in the model and also in how the answer was shortened. Comparisons across them mix the two.
- Random seeds. A language model may give a different answer each time. Run each setting several times, or set the temperature to zero and say so.
- Leakage through people. Reading the test topics to “understand the task” already shapes your choices. A strict team keeps one member away from test data until submission.
- Project idea. Reproduce our missing square on a public collection: snippets and full text, each in two document orders, 50 questions. Report both effects with paired tests.