ExecJudges: Executable Program Judges for Relevance Labeling
Three short programs per topic buy readability and reproducibility, and save money only deep in the pool; but on seven TREC collections they match a per-document judge only on four deep-learning sets, and trail on long documents and top-system ranking.
On this page
Suppose you have one topic and a few thousand pages, and you must decide which ones actually answer the question; calling a model per page is too expensive, but a 70-line program can grade the whole pool after one writing pass. Most teams pick one of two roads: a frontier call per document, with a bill that grows with pool depth, or a small classifier trained on whatever labels exist, which over-predicts relevance when labels are few. The paper, posted on 18 November 2026, takes a third road. A model writes three programs per topic, using only lexical matching, parsing, and pool statistics, and people can read, edit, and rerun them [1]. On seven TREC collections it matches the per-document Claude Sonnet 5.5 judge on the four deep-learning sets, and falls behind on the long-document sets.
Thousands of Documents per Topic, One Call Each, and the Bill
In retrieval evaluation, a topic usually means a pool: dozens of systems each submit their top thousand results, and after deduplication you have a few thousand documents. Each needs a grade, on a 0 to 3 scale for TREC Deep Learning and 0 to 2 for TREC-COVID and the 2004 news collection. NIST assessors used to do this. Now many teams hand it to a model.
A model judge fails in three ways that are hard to argue with. It is expensive: one call per document, deeper pools cost more, and every new system forces a regrade. It is opaque: the model gives a rationale, and you still cannot check which criterion decided the grade. It is hard to reproduce: same prompt, same documents, different version or temperature, different labels.
There is a duller problem underneath. The criteria repeat. Within one topic, thousands of documents face the same test: is it on the subject, does it contain an answer, is the answer exact, is the page mainly about this. That test should not be rederived for every document. The paper's premise is exactly that: fix the criteria once, in code, and let the code run over the pool.
Three Programs per Topic, and the Criteria Become Four Yes-or-No Questions
The writer is Claude Opus 5.5, called once per topic to write three programs independently from the same prompt. Each program answers four questions: on subject, some answer, exact answer, dedicated to the query. A fixed formula turns the answers into a grade: 0 if not on subject, 1 if on subject without an answer, 3 if exact and dedicated, 2 otherwise.
The formula is written by hand, not generated. That is the load-bearing choice: the model decides what counts as evidence, never how much evidence makes a grade. The scale lives outside the code, so outputs stay comparable. Each of the three programs returns a grade, and the label is the mean rounded down. Grades of 3, 2, and 3 average 2.67 and become 2.
The programs may use very little, and all of it deterministic: regular expressions, Snowball stemming, BM25 and percentiles within the pool, phrase matching inside a window, sentence splitting, number and date parsing, plus two helpers that measure how much of a passage supports given terms and how much is unrelated text. They run in a sandbox with time and memory limits, no network, and no model calls. A program that crashes or breaks the tool policy gets one repair attempt.
- Input 1: the topic as assessors see it. A query for DL, plus title, description, and narrative for TREC-COVID and the 2004 news collection.
- Input 2: the official grade definitions, reproduced verbatim rather than paraphrased.
- Input 3: a calibration statement giving the share of each grade in the collection.
- Input 4: three example topics, with one labeled passage per grade, plus five unlabeled passages to show the input format.
- Optional input: 16 stratified human labels per topic, one to four per grade, which makes the variant ExecJudges-L.
What does a program look like? A median of about 70 lines, two functions, six or seven regex calls, two or three toolkit calls, and a dozen terms hard-coded in lists. They are crude. For when was the salvation army founded, the program literally holds the years 1865 and 1878. For a California whale-watching topic, it requires Californian places to appear at least half as often as other places. Crude, and readable: you can see what it looks at.
Why three programs rather than one? The ablation says going from one to three raises agreement by 0.016 to 0.031, with most of the gain from the second program; beyond three, the gain is smaller than the difference between two rewrites of the same program. Three is a price-performance point, not a law.
Agreement on Seven Collections: Four Match, Two Trail by 0.05
The measure is ordinal Krippendorff's alpha against NIST labels. DL 2019 and 2020 serve for development, DL 2021 as the pilot, and DL 2022, DL 2023, the 2004 news collection, and TREC-COVID as test collections, with prompts frozen before testing. Without any human labels, ExecJudges sits within 0.054 of the per-document Sonnet judge on DL 2019 to 2022, and below it on DL 2023, the 2004 news collection, and TREC-COVID. With 16 stratified labels, the picture changes.
| Collection (16 labels per topic) | ExecJudges-L | Sonnet, per document | Per-topic classifier |
|---|---|---|---|
| DL 2019 | 0.756 | 0.626 | 0.706 |
| DL 2020 | 0.649 | 0.531 | 0.543 |
| DL 2021 | 0.750 | 0.713 | 0.665 |
| DL 2022 | 0.702 | 0.591 | 0.573 |
| DL 2023 | 0.607 | 0.604 | 0.493 |
| TREC 2004 news | 0.424 | 0.473 | 0.131 |
| TREC-COVID | 0.626 | 0.678 | 0.506 |
The three DL 2023 numbers come from separate single runs, which the paper flags, and differences under 0.04 count as ties there. Read the shape: on the four DL collections the program beats a Sonnet judge given the same labels, by 0.037 to 0.130; the classifier loses on all seven, significantly on five. On the 2004 news collection and TREC-COVID the program trails Sonnet by about 0.05. Both have long documents and narrative topics, and relevant documents are rare: only 3.5% of that collection's evaluation documents are relevant, while more than half of the stratified labels are, so a method that fits those labels grades a large share of the pool as relevant.
The errors point in opposite directions. Without labels, the program's largest fault is a missed top grade: on DL 2019 and 2020 it assigns grade 0 to more than a quarter of the passages NIST graded 3. Labels cut that below 9%. The classifier errs the other way, missing by two or more grades on 17.0% of DL 2022 passages, mostly grading 0s as 2s or 3s; the program, its labeled variant, and Sonnet all stay within 7.7%. One is stingy, one is generous, and an evaluator should know which one is in hand.
Ranking is the practical layer. Scoring the official runs by nDCG@10 under these labels gives Kendall's tau of 0.87 to 0.91 without labels and 0.93 to 0.94 with 16, against the NIST ranking. The classifier trails by 0.059 to 0.085 and inflates every system's score. The paper also tests pool reuse: filling unjudged documents with program labels changes the left-out run group's nDCG by less than 0.005 on average, steadier than any other label source tested.
| Collection (16 labels, USD per topic) | Write and grade | Sonnet, per document |
|---|---|---|
| DL 2019 | 0.210 | 0.071 |
| DL 2020 | 0.204 | 0.083 |
| DL 2021 | 0.217 | 0.059 |
| TREC 2004 news | 0.306 | 0.460 |
| TREC-COVID | 0.489 | 0.344 |
This table is the most counterintuitive page in the paper, and the one a buyer should read first. DL pools are shallow, tens to a couple hundred documents per topic, so the one-time writing cost of $0.17 to $0.49 does not amortize and ends up above the per-document judge. Break-even arrives at roughly 200 to 350 documents per topic. Below that depth you are buying readability and reproducibility, not savings. Above it, marginal cost is close to zero: 0.002 to 0.004 seconds per passage, under a second for the whole pool.
Seven Checks Before You Ship, and Do Not Start With the Unit Price
The method has a clear fit. Check these before committing.
- 1. Compute pool depth. Under 200 documents per topic, programs save no money, so justify the project on readability, reproducibility, and version control instead.
- 2. Look at topic type. Entity topics suit it best: who sang this song, who is this person. The relevant passage has to name the entity, and a regex catches that. Topics whose answer is a number or a comparison are where the programs slip and the classifier wins.
- 3. Confirm the writer is strong. Swap Claude Opus 5.5 for the open-weight GPT-OSS-120B with the same prompts and repair step, and agreement tops out at 0.486 across the board, with programs grading too low. There is no substitute for a capable writer today.
- 4. Decide on the 16 labels, and if you use them, stratify by grade rather than taking the BM25 top. Stratified labels raise agreement by 0.096 to 0.166, with more than half the gain from the first four; the BM25 top three move alpha by at most 0.031, with intervals covering zero, because they miss whole grades.
- 5. Accept that stratification needs the grades first. An assessor does not know a document's grade before labeling it, which is circular, and the paper lists this as a limitation. A workable compromise is to label a small batch, estimate grades, then stratify.
- 6. Decide who can read the code. Programs are inspectable by system builders too, and a builder who reads one can tune a ranker to its rules. The paper says this risk was not tested. Either control distribution or hold back a private topic set.
- 7. Keep a human check for the top systems. Program labels order the full run set well, but tau drops and varies by year on the ten best runs. For fine differences among strong systems, use assessors or a per-document judge.
Point 4 generalizes beyond this paper: how you spend labels matters more than how many you have. The same 16 labels, stratified or drawn from a lexical ranking, differ by a full tier of agreement.
Where the Programs Break, and What I Read as Inference
Four failures, and outside them the method does not apply. One, long documents with narrative topics: programs cannot follow the conditions in a narrative, and both the 2004 news collection and TREC-COVID fall below Sonnet. Two, missed top grades: without labels, more than a quarter of NIST grade-3 passages get 0, which systematically depresses strong systems. Three, unreliable ordering at the head: full-run ranking works, the top ten do not. Four, lexical matching is easy to game: keyword stuffing or query terms pasted into a document defeat a program with no semantic judgment. The paper lists resistance to adversarial content as future work, which is an admission that it is untested.
The one-line version: it swaps a call per document for a rule per topic. What it saves is repetition, not judgment. The judgment is still written by a model, only now it sits somewhere you can read.
