BM
Bashar ModallalSOFTWARE · AI · SYSTEMS
← All field notes

AI

LLM-as-a-Judge: Evaluating AI Without Blindly Trusting Another Model

Use explicit rubrics, order-swap tests, length controls, and agreement with human reviewers to make model judging useful for release decisions.

Two stacks of response cards sit on a balance below a scoring rubric.

Estimated reading time: 9 minutes

اقرأ النسخة العربية

Two versions of a support assistant answer the same question about refunds. The first names the right deadline in one sentence. The second offers a polished explanation, adds a helpful-looking checklist, and gives the wrong deadline. A language-model judge that sees only the question and the two answers may reward the second. If it sees the policy and must identify the exact line that supports the deadline, it has a narrower, more useful job. A sound evaluation makes that distinction explicit before anyone sees the scores.

An LLM judge takes an input, one or more candidate outputs, and a set of criteria. It returns labels or preferences that a team can apply at scale. The important choice is what those labels are allowed to mean. A preference for one answer is weaker than evidence that it is correct. A good result on a particular benchmark tells you how a judge performed in that setting; it does not certify the judge for your policies, Arabic copy, or high-consequence decisions. The MT-Bench and Chatbot Arena research measured agreement with people in specific settings and documented position, verbosity, and self-enhancement biases. Use that result as a reason to run your own checks, not as a substitute for them.

Choose a judgment format and write its rubric

Start with the decision. For a regression test, you may need to know whether an answer passes an absolute standard. For comparing two versions on an open-ended task, a pairwise preference can be easier to review. A pairwise win alone cannot tell you whether either answer was good enough to ship. If both answers invent the refund deadline, one can still be preferable on tone. Put the absolute gate first when the error has a consequence.

Give each criterion an observable rule. “Correct and helpful” bundles several judgments together. Instead, ask whether the answer names the right deadline and its start date, whether its claim is supported by approved evidence, and whether it gives the reader a useful next step. Define what counts as a failure, what to do when evidence is missing, and how ties differ from uncertainty. For example, a tie means two sufficiently supported answers are comparable. “Insufficient evidence” means the judge cannot determine whether one or both claims are correct. These labels should lead to different follow-up actions.

Criterion What to check How it affects the outcome
Policy correctness Required facts match the referenced policy version. Wrong deadline or trigger is a hard failure.
Grounding Each material claim has supporting evidence, identified by passage ID. Unsupported claims fail grounding; missing evidence can trigger review.
Completeness The answer includes the required facts and an allowed next step. A missing secondary fact is visible without overriding a hard failure.
Clarity The reader can find the important answer and understand the action. Compare only after the hard requirements.

A machine-readable output helps the team inspect and aggregate results. Keep verdict, reason code, and evidence IDs separate. Parse and validate the shape, then check whether the evidence IDs actually appear in the judge's input. A syntactically valid reference to a nonexistent passage is still wrong. If you ask for a rationale, ask for a short visible explanation tied to the rubric, not a long account of the judge's reasoning. Treat both candidate answers and supplied documents as data. A sentence inside a candidate telling the judge to award it full marks has no role in the rubric. Test that boundary with harmless evaluation fixtures.

Worked example: swap answer positions

Imagine policy P-17 says refund requests must be made within 14 calendar days of delivery. Candidate A answers, “Request a refund within 14 calendar days of delivery.” Candidate B says, “You have 30 days from purchase. Keep the receipt and contact support.” For an absolute factual gate, A passes and B fails, irrespective of how much guidance B includes. For this illustrative pair, run one judge call with A first and B second, then another with B first and A second. Keep the question, evidence, and rubric identical.

Suppose the judge selects whichever answer is displayed first. The first call maps to A, the second to B. The stored result should be an order disagreement, not two votes for A because the raw label is “first” twice. Log candidate identifiers along with presentation position, then compare the mapped winners. Route the pair to a human or score each candidate independently against the policy. If the judge correctly picks A in both orders, count that case as stable, but still measure how often stable choices match human or deterministic labels. A consistently wrong judge is stable in the least useful sense.

Randomize which candidate appears first across the dataset, and deliberately swap a diagnostic subset. Report the swap-disagreement rate on pairs with valid responses in both orders, with the denominator and your handling of ties. Randomization makes the overall comparison more balanced; it does not tell you how to resolve a particular disagreement. A swap test does. Wang and colleagues studied order effects and evaluated calibration strategies that balance positions and send difficult examples to humans. Their work gives a useful experimental pattern without prescribing a universal disagreement threshold.

Worked example: separate useful detail from verbosity

Consider a second policy: a customer can download an invoice from Billing → Invoices. The first candidate answers with that path and stops. A second candidate repeats the same path in a longer paragraph, adds two summaries, and says “you can always access every historical invoice.” The approved passage gives no guarantee about all history. A rubric that rewards breadth may prefer the longer answer. A grounding rule should flag its extra assertion. Now replace the second candidate with a longer answer that adds a verified recovery step for customers with no invoice listed. For a user asking why an invoice is missing, the extra detail may improve completeness. For someone asking where invoices are, the short answer may already be sufficient.

Build controlled pairs that vary length without changing the required facts, then build a separate set where the extra detail is actually useful. Compare how often the judge unnecessarily prefers the padded version and how often it appropriately rewards helpful detail. Avoid a blanket short-answer bonus: it will penalize responses to requests that genuinely call for an explanation. The Length-Controlled AlpacaEval paper uses regression to estimate preference with length differences controlled. For a small product suite, deliberately constructed contrasts are an accessible diagnostic. They answer a narrower question and do not estimate the paper's counterfactual metric.

Calibrate against people who know the task

Build a human-labeled set from the workflows you plan to ship. Include routine cases, deliberately close comparisons, cases with missing or contradictory evidence, and any language where you will report a score. If English and Arabic are both supported, have reviewers read each in its original language and check whether equivalent cases get comparable treatment. Put critical errors in their own slice. An overall agreement rate can stay high while a judge misses rare but costly policy errors.

Have reviewers apply the same written rubric independently on a shared subset, then resolve disagreements to form reference labels. Record where people disagree before adjudication; disagreement can reveal wording that needs fixing or a genuinely contestable answer. Separate examples used to tune the judge's rubric or prompt from a held-out check that you do not tune against. Record the judge model, rubric revision, evidence version, and candidate version for every run. When one changes, evaluate it on a comparable fixture before treating old scores and new scores as interchangeable.

Check What to report
Human agreement How often the judge matches adjudicated labels, by criterion and task slice.
Severe false passes How often the judge passes a case that a human marked as a critical failure, divided by the number of human-marked critical failures.
Order sensitivity How often the preferred candidate changes when the order is swapped, using named tie rules.
Review load How many cases abstain, disagree, or otherwise require a person.

Suppose people identify ten critical errors in a fictional set and the judge passes three of them. The severe false-pass rate is 3/10, even if overall agreement on that set is 90%. If critical claims determine whether you ship, those are the examples to inspect before increasing the judge's authority. With a small sample, report the counts and collect more comparable cases rather than implying precise performance. Do not equate the judge's self-reported confidence number with a probability. If you use confidence to triage, check on held-out labels that each confidence band corresponds to the observed error it is supposed to predict. Otherwise, triage on observable signals such as a missing citation, a rubric violation, or order disagreement.

flowchart LR
  A["Versioned cases and human rubric"] --> B["Deterministic gates"]
  B --> C["Judge with approved evidence"]
  C --> D["Order and length diagnostics"]
  D --> E["Compare with held-out human labels"]
  E --> F["Accept the signal or require review"]

The gates handle checks that code can settle, such as a missing required field. The judge handles the criteria that require interpreting text. Diagnostics expose predictable sources of variation, and the held-out labels determine which results the team can use without another review. Diagnose nonconforming outputs separately from valid negative scores so a broken parser cannot improve your pass rate by quietly discarding hard cases.

Keep retrieval evaluation separate

In a retrieval-augmented generation (RAG) system, an answer judge cannot tell you by itself whether the retriever returned the right passages. Suppose the approved refunds passage is missing from the retrieved context, but the model gives the correct 14-day answer from prior knowledge. An answer-correctness check might pass. A grounding check fails if nothing in the retrieved context supports the deadline, and a retrieval check fails if the labeled relevant passage is missing. In the reverse case, the retriever supplies the right passage, but the answer says 30 days. That is a generation or evidence-use error, not a retrieval miss.

Use the retrieval dataset to represent realistic questions, relevant passages, evidence versions, and cases that should elicit clarification or abstention. Use an answer judge to score defined properties of generated responses, with the right evidence attached for each property. The ARES paper demonstrates separate context relevance, answer faithfulness, and answer relevance measures and uses human annotations in its statistical estimation procedure. That kind of separation keeps improvements attributable: a judge change, a retrieval change, and an answer change affect different parts of the evaluation.

Decide what the judge may approve

Begin by running it in parallel with human review, without giving it the final release decision. Look for failure patterns, fix the rubric, and then rerun the held-out check. Give the judge authority only where you have measured adequate agreement and accept the observed mistakes. A team might let it handle clear style regressions while still requiring hand review for uncertain policy claims, security or privacy decisions, and disagreement across judges or presentations. Define escalation before you run the experiment so an appealing overall score cannot quietly lower the standard later.

A useful judge is a measured component of an evaluation pipeline. Its output earns weight when it can be tied to a specific criterion, corroborated by evidence, checked against people, and revisited when the workload changes. With those controls in place, you can evaluate more cases without confusing cheaper judgments with verified truth.

Primary references

YOUR TAKE

What did you think?

Choose one reaction for this article.

Was this useful?

A cookie helps limit repeat responses. Your feedback is private.

Share this noteLinkedIn ↗X ↗Email ↗

Keep exploring.