The customer support reply that the LLM judge gave full marks to didn't actually issue a refund
Used 100 returns customer support records to calibrate LLM-as-a-judge. First label manually, then look at recall, specificity, and precision, and finally freeze the judge and run a held-out set. Hamza Tahir explicitly says that all numbers in the article are from the development set, not production results.
When using an LLM as a judge to review customer support records, the easiest risk to miss is hidden in the full marks. It will give a wildly wrong reply a high score.
In the second post of the How to write good evals series, Hamza Tahir uses 100 e-commerce returns customer support traces to demonstrate how to calibrate an LLM-as-a-judge. The original is on X, and the code examples are based on Kitaru. The prompt is the easy part; human labels are the judge's test suite.
How most teams currently decide a judge is good enough: write a system prompt, list a rubric, run a few dozen examples, read the results, tweak the prompt, and ship it once it feels right. This process bakes too many vibes into the system, and it may not generalize in production. A judge is a system component, and it must be tested against known answers. This action is called calibrating the judge.
Example: e-commerce customer support handling returns. Refunds for any reason within 30 days, defective items within 90 days, and everything else goes to a human. The author generates 100 synthetic traces. For each customer message, the agent checks the order, checks policy, and replies; sometimes it refunds or sends a return label, and sometimes it escalates to a human.
First, don't use a generic judge to ask whether this agent did a good job. Find a product expert to write short notes on bad traces, and after a few dozen, group them into categories. Among the 100, there are four failure types: incorrect policy statement, 19; only half of a two-part request answered, 19; promises unsupported by tool results, 15; escalated to a human when it could have been resolved, 12. Forty-four have no issue, 56 have at least one, and 9 have multiple failures. Example: On day 45, a defective projector plus a request to cancel a second order; the agent says it can't refund and doesn't mention the cancellation, committing both an incorrect policy statement and a missed answer.
One judge checks one failure and returns pass or fail. No one can clearly explain the difference between 3 and 4 on a 1-to-5 scale. A generic judge averages 3.80 on the 100 examples, with failures scattered across scores; 26 examples score 3 or 4, and 23 of them contain a real failure. There are also traps in full marks: one reply says a prepaid return label has been sent and $65 has been refunded, when in fact no tool was called. Research summary tasks also find skewed score distributions; evaluating multiple attributes together causes them to affect one another. A judge should check only one specific failure, and the rubric must let two strangers label consistently. The policy judge's rubric logic: if the agent states or implies a rule that contradicts policy, or adds a condition not in policy, FLAG; if there is no incorrect policy statement, PASS. Only look at what the agent said to the customer; a customer repeating a wrong rule doesn't count; a silent refund passes this check, and another check catches incorrect refunds.
Human labels come before the judge. Give a customer support reviewer a batch of tickets and the policy at the time, and have them mark FLAG or PASS. A FLAG must point out the agent's exact words and the incorrect rule. Of the 100, 19 are FLAG. Keep a batch of labels untouched before changing the prompt as a held-out set. The author's 100 are all development set; the held-out set uses fresh traces. Split by complete conversation; do not split follow-ups from the same customer.
Run the evaluator. In Kitaru, the evaluator reads the session and writes results back to the session, aligning with human labels by ticket. The example code passes only customer_request, order_facts, and customer_reply to the model; human labels are in metadata, which the judge cannot read. The return structure is verdict, quote, and reason. If a FLAG's quote is not in the reply, throw an error. Version 1 produces a usable verdict for all 100, with 20 flags, and quote validation rejects none. Two error cases are worth examining. A thermostat breaks on day 24; the agent asks for photos and a serial number before replacing it, a condition not in policy; the reviewer FLAGs, and the judge PASSes. A lamp is returned without defect on day 33; the agent says it is past 30 days and transfers to a specialist, which is exactly the policy; the reviewer PASSes, and the judge FLAGs. Read the judge's reasons and then revise the rubric: requiring extra materials counts as adding a condition; the defect window applies only when the customer reports a malfunction; promises, handoffs, and logistics belong to other checks. Version 2 fixes these, and also falsely flags a correct reply that says original packaging is not required, because the new rule makes the judge read any mention of packaging as a condition.
Look at the confusion matrix. v1 catches 17/19, with 3/81 false positives; recall 89.5%, specificity 96.3%, precision 85%. v2 catches 19/19, with 2/81 false positives; recall 100%, specificity 97.5%, precision 90.5%. The version changes 5 examples; 4 are corrected and 1 is made wrong. Don't look only at accuracy. An all-PASS judge has 81% accuracy on this dataset but misses all 19 policy errors. Every time you change the prompt, look at recall and specificity together. Fixing false positives may quietly lose recall.
The four pass/fail judges ultimately run together: 20 false alarms, of which 16 fall on traces that really do have a problem, just a different type. 42/56 failing traces have their failure precisely named. Judges are good at detecting that something is wrong, but not at saying what it is. So flags should include quotes, and reviewers still need to read the reason.
If the judge returns a 1-to-5 score, you need to choose a cutoff. Table: score <=2, flag 25, catches 25/56, clean flags 0; <=3, flag 42, catches 42, clean 0; <=4, flag 51, catches 48, clean 3; four pass/fail judges, flag 60, catches 56, clean 4. Cutoff 2 is clean but misses half; cutoff 4 catches more but misses 8, including the full-marks example. Pass/fail judges can go directly to held-out.
Don't wing sample size. 19/19 only supports recall of at least 83%. To claim 90%, you need about 35 labeled failures and catch all of them. 2/81 is a 2.5% false-positive rate, with a 95% interval up to 8.6%. To demonstrate below 2%, you need about 190 traces with no policy errors and zero false positives. When freezing the judge, record the evaluator version, rubric, policy, and model snapshot. The author freezes returns-policy@2, model gpt-5-mini-2025-08-07, no cutoff. Then run held-out only once and report counts and percentages. Hamza explicitly says he has not yet run held-out; all numbers in the article are development set.
Conclusion: the prompt is the easy part. Labels are the judge's test suite; every time a new failure appears in production, add one. Don't be fooled by a dashboard's average score. First ask three numbers: what does it miss, how many false positives does it have, and how many can you review per week.
Original: Hamza Tahir, second post in the How to write good evals series, Test your LLM-as-a-judge before you trust it. Link: https://x.com/i/article/2128093168482803712
发布时间: 2026-12-03 11:35