Codifying the Judge: Scalable Evaluation via Program Distillation

Tzu-Heng Huang, Shengqi Qiu, Frederic Sala

arXiv:2607.22561 · 2026-07-28 공개 · arXiv · PDF

model-evaluation llm-as-a-judge reward-modeling automated-evaluation llm-routing rewardbench program-distillation pajama

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.

한국어 요약

한 줄 요약

PAJAMA는 LLM 평가를 프로그램으로 변환하여 비용, 속도, 투명성을 동시에 개선하는 새로운 평가 프레임워크이다.

핵심 기여도

핵심 아이디어

기존 LLM-as-a-judge 방식은 비용, 투명성, 확장성 문제를 안고 있다. 이에 PAJAMA는 LLM의 평가 로직을 프로그램으로 변환하는 **program distillation**을 제안한다. LLM은 평가 시점이 아닌 **합성 시점**에 단 한 번만 사용되며, 생성된 프로그램은 로컬에서 실행되어 후속 평가를 수행한다. 이는 API 비용을 줄이고, 실행 속도를 높이며, 평가 로직의 투명성을 확보한다.

PAJAMA는 세 가지 주요 구성요소로 이루어진다:
1. 다양한 평가 기준을 코드로 표현한 **rubrics**를 사용한 프로그램 합성
2. 프로그램 출력을 **calibration**하고, **weak supervision**을 통해 최종 결정을 집계
3. 불확실한 샘플을 LLM으로 전달하는 **fallback mechanism**

이러한 접근은 기존 LLM 평가의 단점을 극복하면서도, 프로그램의 해석 가능성과 LLM의 효과성을 결합한 **hybrid 평가 시스템**을 구축한다.

기술적 접근법

주요 결과

의의 및 한계

PAJAMA는 LLM 평가의 비용, 속도, 투명성 문제를 해결하며, **13B LLM과 유사한 성능**을 제공한다. 특히, **RewardBench에서 50배 저비용**으로 뛰어난 보상 모델을 학습할 수 있어, 대규모 평가 및 보상 신호 생성에 유용하다. 또한, 프로그램 평가가 **시스템적 편향에 강하고**, 코드 에이전트를 활용한 보정으로 Robustness를 높일 수 있다는 점에서 실용적 가치가 크다.

하지만, 단일 프로그램의 일반화 능력이 제한적이며, **복잡한 평가 기준**은 프로그램으로 표현하기 어려울 수 있다. 또한, **루트 메커니즘**이 불확실한 샘플을 LLM으로 전달해야 하므로, 완전히 LLM을 대체하기는 어렵다.

실용적 활용

PAJAMA는 대규모 모델 평가, 보상 신호 생성, 투명한 평가 시스템 구축 등에서 활용 가능하다. 특히, **API 비용이 높은 산업**이나 **실시간 평가가 필요한 시스템**에서 유용하며, **보상 기반 학습**이나 **강화 학습 피드백**에도 적용 가능하다.