[KongchangAI]
· 2 min read· 1,092 words

Can Programs Replace LLM Judges? ExecJudges Delivers an Executable Answer

Can Programs Replace LLM Judges? ExecJudges Delivers an Executable Answer

ExecJudges has LLMs generate executable programs per query to replace per-document judgments, matching LLM judges on TREC at lower cost.

The article introduces ExecJudges, a new method for retrieval relevance annotation: instead of having an LLM judge each document individually, it has the LLM rewrite evaluation guidelines into readable, executable programs for each topic, relying only on lexical matching, standard NLP tools, and pool statistics without external model inference. This makes annotation logic manually inspectable, results deterministic and reproducible, and scoring free after the program is written once. Experiments on seven TREC collections show ExecJudges achieves agreement with NIST assessors at the level of frontier LLM judges, ExecJudges-L with human-labeled examples outperforms per-topic classifiers under equal conditions, labels used to rank official runs achieve Kendall's tau of 0.87 to 0.94, and the one-time cost is only $0.17 to $0.49 per topic.

In retrieval evaluation, using large language models (LLMs) to label documents for relevance has become common practice, but each judgment requires calling a frontier model—costly, hard to interpret, and difficult to reproduce. A new paper proposes ExecJudges: having an LLM generate a readable program for each topic to replace per-document judgments, enabling fast, inspectable, and scalable automatic annotation.

rss source: Can Programs Replace LLM Judges? Executable Program Judges for Scalable and Efficient Relevance Labe

The Scaling Dilemma of LLM Judges

The appeal of LLM judges lies in their ability to generate large-scale relevance judgments at low cost, but each judgment is a potentially expensive model call. More troublesome is that judgments are hard to explain—switching to a different model or prompt can yield different labels, raising reproducibility concerns. When annotating deep result pools, these costs grow linearly with the number of documents.

The core question the paper poses is: can an LLM write a readable program for each topic that directly replaces its judgment of every document? If so, the program only needs to be generated once and can thereafter be executed at zero cost and deterministically.

Deep result pools are a core concept in retrieval evaluation, referring to the large set of top-ranked candidate documents (typically hundreds to thousands) retained for a query, rather than just the top 10 or top 100. In the TREC deep evaluation tradition, assessors judge the relevance of every document in the pool to support high-confidence computation of metrics like recall and NDCG. The deeper the pool, the more reliable the evaluation, but the higher the manual annotation cost. This is precisely the context in which LLM judges were introduced—they can scale annotation at low cost; and ExecJudges targets this very scenario: large document counts, high per-document model call costs, but annotation logic that is highly repetitive across the same topic, making it suitable for one-time固化 (fixing) via programs.

How ExecJudges Works

ExecJudges' approach is to translate evaluation guidelines into executable programs. Specifically, it uses a frontier LLM to convert annotation guidelines into code, where the program relies only on lexical matching, standard NLP libraries (such as parsers), and pool statistics, without external model inference.

This design has two direct benefits: the program can be manually inspected, making annotation logic transparent; and execution is deterministic, so the same program always yields the same result for the same document. Additionally, the paper proposes an ExecJudges-L variant that incorporates human-labeled examples into program generation when available, to improve judgment quality.

Empirical Results on Seven TREC Collections

The paper evaluates ExecJudges on seven TREC collections, comparing generated labels against trained NIST assessors, frontier LLM judges, and recently proposed per-topic classifiers.

Key findings are as follows:

  • On TREC DL 2019-2021, ExecJudges achieves agreement with NIST assessors at the level of Claude Sonnet 5.5 LLM judges.
  • With only a small number of human labels per topic, ExecJudges-L exceeds per-topic classifiers using the same labels in agreement with NIST across all seven collections, and either surpasses LLM judges also given these labels or comes within about 0.05 on Krippendorff's alpha.
  • When generated labels are used to rank official TREC DL runs, Kendall's tau reaches 0.87 to 0.94, indicating reliable ranking quality.
  • The one-time cost of writing programs is $0.17 to $0.49 per topic, with no additional cost for subsequent scoring.

These results cross-validate the same conclusion from multiple dimensions: executable programs are competitive with LLM judges in agreement, ranking quality, and cost-effectiveness.

Kendall's tau is a rank correlation coefficient measuring agreement between two rankings, ranging from -1 to 1, where 1 means the two rankings are perfectly consistent and 0 means unrelated. In retrieval evaluation, it is commonly used to compare whether "system rankings based on one set of relevance labels" agree with "system rankings based on official/human labels." A tau of 0.87 to 0.94 means: using ExecJudges-generated labels to rank retrieval system runs yields a system ordering that closely matches official TREC DL judgments. This is closer to the actual purpose of evaluation than per-document relevance agreement rates—the ultimate use of evaluation is often to compare systems, not to label individual documents.

Krippendorff's alpha is another annotation agreement metric, suitable for multi-annotator, multi-category, and even missing-data scenarios, typically also ranging from -1 to 1, with higher values indicating stronger agreement. The paper uses it to measure the degree of agreement between generated labels and NIST assessor judgments, and to compare horizontally with LLM judges and per-topic classifiers.

Why Executable Programs Are the Better Solution

LLM judge labels are essentially black-box outputs, whereas programs can be read, audited, and version-controlled. For evaluation pipelines that require long-term maintenance, this means annotation logic can be iterated as guidelines are updated, rather than relying on the implicit behavior of some model.

The cost structure also changes fundamentally. LLM judge costs grow linearly with the number of documents, whereas ExecJudges has a fixed one-time program-writing cost, after which scoring is free. For scenarios with large document volumes like deep result pools, this difference becomes increasingly significant as scale grows.

Of course, programmatic judgment has boundaries: it relies on evaluation guidelines being clearly expressible as rules, and on lexical matching and pool statistics covering the main dimensions of relevance. The paper's results show that in standardized evaluation scenarios like TREC, this premise basically holds.

Per-topic classifiers are another low-cost annotation approach that has emerged in recent years: train a lightweight classifier separately for each query, using a small number of human labels as training data, then batch-predict the remaining documents in the pool. Its goal is similar to ExecJudges—"invest once, reuse in batch"—with the difference being that ExecJudges produces readable programs rather than model weights, so the logic can be manually reviewed and modified. The paper compares ExecJudges-L against per-topic classifiers using the same human labels across all seven collections, showing that the former achieves higher agreement with NIST, indicating that when labels are scarce, explicitly encoding guidelines as rules is more effective than fitting a statistical classifier.

Implications for Retrieval Evaluation Practice

ExecJudges provides a reproducible, inspectable, efficient, and economical alternative to LLM judges, suitable for annotating deep result pools for system evaluation or ranking improvements. For teams building retrieval evaluation pipelines, this means annotation logic can be distilled into reusable programs, reducing ongoing dependence on frontier model APIs.

From a broader perspective, this research suggests a pattern: have LLMs generate programs rather than direct judgments, transforming one-time model intelligence into a repeatable, deterministic asset. This idea may extend to other evaluation tasks that require scalable annotation.

#ExecJudges#LLM judges#retrieval evaluation#TREC#relevance labeling#executable programs#annotation cost
Share:

Related articles