The LLM judge is given an evaluation prompt made of: (1) a role instruction and evaluation criteria (a rubric), (2) context — the question or task, (3) the response to be judged (or two responses in pairwise mode), and optionally (4) a reference answer. The model first produces a rationale (step-by-step, chain-of-thought reasoning) and only then emits a verdict — a number on a small integer scale (e.g. 1–5), a winner label (A/B/tie), or a score following an additive rubric. The output is usually forced into a structure (e.g. JSON) to be parseable. To reduce biases, practitioners swap the response positions and average (position bias), normalize for length (verbosity bias), use a judge different from the evaluated model (self-enhancement bias), and grade against a reference answer for precision-demanding tasks. Multiple judges or multiple runs can be aggregated (a jury/panel of judges, voting).
Assessing the quality of open-ended generative outputs is hard: lexical metrics (BLEU, ROUGE) correlate poorly with human preferences, while reliable human rating is slow, costly, and hard to scale. LLM-as-a-Judge provides automated, fast, and cheap evaluation that, with a strong judge model, achieves high agreement with human ratings and scales to thousands of comparisons.
A strong language model (e.g. GPT-4, Claude, Prometheus) that produces the judgment. Its reasoning ability determines the reliability of the evaluation.
Official
The instruction defining evaluation criteria, scale, and output format. May include an additive rubric and few-shot examples.
The choice of mode: pointwise, pairwise comparison, or reference-guided grading.
Official
Reasoning steps generated before the verdict. They improve the quality and transparency of the judgment (the G-Eval paradigm: CoT + form-filling).
Official
Techniques that increase reliability: position swapping and averaging, a panel of judges, voting, length normalization.
Official
In pairwise mode the judge often favors the response in the first (or second) position regardless of quality.
The judge tends to favor longer, more elaborate responses even when they are not better.
The judge model may favor responses generated by itself or by models from the same family.
The judge may misgrade tasks requiring precise reasoning (math, logic), rewarding incorrect answers.
Absolute ratings on a wide scale (0–10) are less stable and correlate more weakly with humans.
Small prompt changes or temperature > 0 change verdicts and hurt reproducibility.
Anthropic shows an AI model can generate preference labels and feedback for alignment (RLAIF), a direct precursor to using an LLM as an evaluator.
"G-Eval" uses GPT-4 with a reasoning chain and a scoring form, achieving better human correlation than lexical metrics on NLG tasks.
Zheng et al. introduce MT-Bench and Chatbot Arena, showing over 80% GPT-4–human agreement and systematizing position, verbosity, and self-enhancement biases.
Prometheus (ICLR 2024) is an open 13B model trained on the Feedback Collection that grades with custom rubrics and matches GPT-4 correlation, decoupling evaluation from proprietary models.
LLM-as-a-Judge becomes standard in AlpacaEval, Arena-Hard, RAG evaluation (RAGAS), and as a source of preference data in RLAIF and DPO.
Time complexity: O(N · L² · d). Space complexity: O(L · d).
Each judgment requires a large-model call; with strong judges (GPT-4) the cost and latency per comparison are high, and in pairwise mode they scale quadratically.
Which LLM acts as the judge. A stronger model means higher human agreement but higher cost; it is important that it not be the evaluated model (self-enhancement bias).
Pointwise (numeric scale), pairwise (comparing two responses), or reference-guided. Affects stability and susceptibility to position bias.
The range of the pointwise scale. Small integer scales (1–4 or 1–5) yield higher human correlation than a continuous 0–10.
Whether the model generates a rationale before the verdict. Clearly improves correlation (the G-Eval paradigm).
Including a reference answer. Improves grading of precision-demanding tasks (math, facts).
In pairwise mode: judging both orders (A,B) and (B,A) and averaging to neutralize position bias.
Usually set to 0 for reproducibility and deterministic judgments.
An inference/evaluation-level pattern using the full dense forward pass of the judge model; it introduces no routing of its own (though a “panel of judges” variant may route cases to different models).
Individual judgments are independent (embarrassingly parallel) and can be batched across many devices; only generation within a single judgment stays sequential.
It is an inference-level evaluation pattern — it runs on any hardware (or via API) capable of serving the judge model.
Running large judges locally (e.g. Prometheus) and mass batched evaluation benefit from high-throughput, high-memory GPUs.