Papers
arxiv:2607.22561

Codifying the Judge: Scalable Evaluation via Program Distillation

Published on May 29
· Submitted by
Tzu-Heng Huang
on Jul 28
Authors:
,
,

Abstract

LLM-as-a-judge has become the standard for automated evaluation, but it suffers from high cost, significant latency, and opaque decisions -- limitations that undermine its scalability and reliability. We address these with a simple, efficient alternative: program distillation. Instead of prompting an LLM at the evaluation time, we distill its decision logic into a committee of programs that score candidates directly. These programmatic judges offer transparency, are easily inspected or edited, and eliminate per-sample API costs. Building on this notion, we introduce PAJAMA, a system that synthesizes programs as judges, aggregates their decisions into a joint verdict, and incorporates a fallback mechanism to selectively escalate low-confidence cases to an LLM. Across five datasets and four model families, we show that programmatic judges can match the performance of a 13B-size LLM judge. When using program outputs as routing signals, PAJAMA improves both accuracy and throughput and advances the Pareto frontier. Beyond evaluation, programmatic judges produce cheap and effective reward signals: on RewardBench, a reward model distilled from programs' verdicts outperforms one trained on a proprietary LLM's labels at two orders of magnitude lower API cost.

Community

Paper submitter

LLM-as-a-judge is now everywhere for automated evaluation. But it can be slow, expensive, and opaque. What if we ask the judge for its rubric once, and execute that logic as a program? Introducing PAJAMA—a new hybrid evaluation system that pushes the LLM-judge Pareto frontier!

I've been running LLM-as-a-judge in production for a while now, and the cost-latency-transparency triple pain point is real. This paper's idea — distill the judge's decision logic into actual programs instead of prompting an LLM at eval time — is the kind of thing that makes you wonder why more people aren't doing it. The committee-of-programs approach means you can inspect, edit, and version-control your eval criteria like any other code. I'd want to see how brittle the distilled programs are when the distribution shifts, but for stable eval tasks this could cut the API bill to near zero. Going to try the PAJAMA system on my own agent eval suite this week.

Sign up or log in to comment

Get this paper in your agent:

hf papers read 2607.22561
Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash

Models citing this paper 0

No model linking this paper

Cite arxiv.org/abs/2607.22561 in a model README.md to link it from this page.

Datasets citing this paper 0

No dataset linking this paper

Cite arxiv.org/abs/2607.22561 in a dataset README.md to link it from this page.

Spaces citing this paper 0

No Space linking this paper

Cite arxiv.org/abs/2607.22561 in a Space README.md to link it from this page.

Collections including this paper 1