Let a Model Judge, Then Put the Judge Through an Exam
Anything code can decide should never go to a model, but open-ended quality genuinely has to. Today you write rubrics and pairwise comparison, measure the judge's three systematic biases with a position-swap experiment, and decide whether it is fit to use with an agreement coefficient rather than accuracy.
Today's Goals
- Decide whether a criterion belongs to a code, model or human grader, and state the concrete cost of choosing wrong
- Design a position-swap experiment that measures a judge's position bias, and explain why a verdict that flips has to be scored as a tie
- Explain why accuracy misleads when labels are heavily imbalanced, and use an agreement coefficient instead to decide whether a judge qualifies
Plain-Language Walkthrough
Two judges, and whether they agree with each other
A competition has two judges on the panel. What do you most want to know about them?
Most people say: are they judging correctly. That question has no answer. If a reference key existed that could tell you who was right, you would not need judges at all — the whole reason judges exist is that this thing has no key.
So the question that can actually be asked, and that actually helps, is: do the two judges agree with each other?
Agreement is measurable. Show the same contestants to both judges and count how often they reach the same verdict. High agreement means the standard is executable and somebody else would get the same result. Low agreement means the score depends mostly on who holds the pen, and writing it into a report is writing down one person's impression.
Today points that logic at a model. You will have a model score an agent's replies — a model grader, commonly called an LLM as judge. Then, immediately, something more important: put that judge through an exam of its own, quantify the systematic bias it carries, and use agreement to decide whether it is fit for the job.
Three kinds of grader, and the order is fixed
Before writing any rubric, settle the selection. There are exactly three kinds of grader, and the priority is not negotiable.
| Kind | How it decides | Cost per use | When to use it |
|---|---|---|---|
| Code | Inspects the outcome, compares fields, runs assertions | Nearly zero | The default. Any time the criterion lands on a settled fact |
| Model | Another model reads it and scores against a rubric | One call in money and latency | The criterion really is open-ended: was it clear, was the tone right |
| Human | A person reads it | Most expensive, and it does not scale | Calibrating the other two, and settling disputes they cannot |
The cost of choosing wrong is asymmetric, so take the two directions separately.
Using a model where code would do means paying for a worse verdict. Whether a refund happened is one database row: code decides it deterministically, for free, instantly. Ask a model to read "your refund has been processed" and you get an answer that wobbles, costs money, and can be fooled by a well-turned sentence. The liar target in D1's self-test is that counterexample — it calls no tools and only produces nice sentences.
Using code where a model is needed is more insidious. To make the criterion code-checkable you quietly reshape it into something a keyword match can handle, such as requiring the phrase "business days". Now the grader examines wording rather than quality, the agent gets optimized in that direction, and you end up with a support bot that hits every keyword and helps nobody.
Human grading is always rationed. It is not for running the full suite. It has one correct use: judging the judge. Today's calibration set is the product of a human grader — thirty items, and thirty is enough.
The rubric: taking "answered it well" apart
A model grader takes more than a block of text as input. It also takes a rubric — you have to tell the judge what standard to score against. Ask "is this reply good" directly and you get a different number every time, for an unsurprising reason: the question was never defined. The rubric breaks one vague holistic judgment into a few small questions that are non-overlapping and decidable. For the refund support agent this course targets, the lab's rubric has three criteria:
- States the final disposition: refunded, declined, or escalated to a human
- Gives the grounds: the applicable refund policy and the key facts, such as how many days ago the order was placed
- Gives the next step: when the money arrives, the escalation path, or an alternative
They share three properties, each for a reason.
Non-overlapping. Two criteria must not be satisfied by the same fact, or you score one thing twice. Split the first into "states the disposition" and "is unambiguous about it" and they live and die together: two criteria carrying the information of one.
Decidable. Each reduces to whether the text contains this thing, not to whether it is written well. If the criterion itself needs a subjective call, you only deferred the subjectivity by a layer.
Few of them. Three to five. Add more and the judge's attention spreads thin and scores get less stable, not more. The same is true of human scorers.
Three systematic biases
A judge makes two kinds of mistake. One is random and averages out across runs. The other is systematic: no number of runs removes it, they only make you more confident in the wrong answer. There are three of those, and the course uses these names throughout.
| Name | How it shows up | How to remove it |
|---|---|---|
| Position bias | In a pairwise comparison, favors whichever answer came first | Score both orderings, call every flip a tie |
| Verbosity bias | For the same information, the longer answer scores higher | Declare in the rubric that brevity is not penalized, or apply a length penalty |
| Self-preference bias | Scores its own family's output systematically higher | Use a judge from a different vendor, then recalibrate |
You will use these names for the rest of the week. The next two sections quantify the first two; the third gets a dedicated demonstration in the lab.
Position swap: you only win if you win twice
Pairwise comparison is the most common scoring shape: put two answers in front of the judge and ask which is better. It is steadier than absolute scoring, because the judge never maps "good" onto a number, it only compares. The price is extreme sensitivity to position: show the same answers in the opposite order and the judge may change its mind. The lab's move is simple — score each pair in both directions, then merge under one hard rule.
- Both rounds say A wins, A wins
- Both rounds say B wins, B wins
- The rounds contradict each other, it is a tie
- Either round says tie, it is a tie
The third rule matters most. A flip means the verdict was decided by position rather than by quality, and it carries zero information. There is a natural urge to take one round at random, so at least you have a verdict. Do not. That writes noise into the report, and it has a fifty percent chance of matching what you expected, which makes you trust it more. A tie is not a surrender. A tie honestly reports that this pair could not be separated.
The offline judge in the lab carries configurable bias, and the numbers come out like this:
-- 2. position swap experiment --
12 pairs, each scored in both directions
first-slot win rate: 70.8% (should be 50.0% with no position bias)
verdict flip rate: 41.7%
after merging: 7 usable verdicts, 5 ties
warning: scoring one direction only would give 12 "usable" verdicts, 5 of them decided by positionFirst-slot win rate is the most direct evidence of position bias: across single-round verdicts that produced a winner, the share where the winner happened to be listed first. With no position bias it should be 50 percent. Here it is 70.8.
A 41.7 percent flip rate means that if you score one direction and write the verdicts into a report, five of twelve were decided by position, and the report will not tell you which five.
Why not accuracy
With the judge calibrated, the last step is deciding whether it qualifies: take a batch of human-labeled samples and check how often the judge agrees with the human.
The natural move is to compute accuracy — out of thirty, how many did it get right. That move is wrong here, and wrong in a way that hides well.
The reason is the distribution of production samples: the batch you send for human labeling is overwhelmingly normal. The lab's calibration set is twenty-seven passes out of thirty, close to real traffic.
Now consider a judge that looks at nothing and always says pass. Its accuracy is twenty-seven over thirty, 90 percent. A judge with zero information scores 90 percent. This is not a contrived edge case: the more imbalanced the labels, the higher it climbs. On ninety-nine to one data it scores 99 percent.
The fix is Cohen's kappa. Its definition is one line:
po = share of samples where the two verdicts agree (this is accuracy)
pe = share where they would agree by chance, given each side's label distribution
kappa = (po - pe) / (1 - pe)pe is the point. If both parties were guessing in proportion to their own label rates, how often would they agree anyway? Subtract that and what remains is the agreement that actually came from judgment. For the always-pass judge, po is 0.9 and pe is also 0.9, so kappa is exactly 0.
The comparison in the lab makes the case:
-- 4. agreement with human labels --
calibration set: 30 items, 27 labeled pass by a human
this judge accuracy 86.7% kappa 0.259
always-pass judge accuracy 90.0% kappa 0.000The judge that looks at nothing beats the real one by 3.3 percentage points on accuracy. If accuracy is your admission criterion, you select it — you eliminate the only judge carrying information and replace it with a constant.
Kappa also has far better resolution. Set the bias coefficients to zero and accuracy rises from 86.7 to 93.3 percent, 6.6 points, while kappa jumps from 0.259 to 0.714, crossing from nearly useless straight over the admission line. Same improvement, two metrics responding an order of magnitude apart.
Rules of thumb: below 0.2 is nearly useless, 0.4 to 0.6 marginal, 0.6 to 0.8 fit for a pipeline, above 0.8 good. This course sets the admission line at 0.6.
Source Reading
Today's primary source is the paper studying models as judges (arXiv 2306.05685). It is among the first works to systematically quantify the practice, and all three biases used today come from it.
Focus on two parts. The first is its method for measuring position bias — swap the order, score again, count how often the verdict holds; today's swap experiment is the minimal implementation of that. The second is that it puts judge-versus-human agreement side by side with human-versus-human agreement: human annotators do not agree 100 percent of the time either, so the judge's target was never perfection, it is reaching the level humans reach with each other. Without that frame of reference you will set a bar no person could clear.
The Anthropic post on evaluation method supplies the other half, the selection question: three kinds of grader, with "if code can decide it, use code" as the priority. It does not cover calibrating a judge, which is the gap today fills.
One thing today does not cover but you should know: kappa is designed for two annotators. With more than two you switch to Fleiss' kappa, a different formula with the same idea — subtract out the agreement that chance alone would have produced.
Hands-On Lab
Today adds two modules to evalkit: graders/judge.ts is the model grader, and graders/calibration.ts holds the swap experiment and kappa.
One design decision first: the judge in the lab is offline, and carries configurable bias.
That is not about saving an API key. Today's work is a controlled experiment, and "what should this number return to once bias is set to zero" is the only way to verify the experiment code itself. A real model cannot give you that control group: you cannot dial its bias, and its bias moves between runs anyway. So the lab ships a judge that genuinely favors the first slot, longer answers, and its own byline, with all three coefficients declared in one place. Wiring up a real gateway means replacing the scoring function with one model call; the rubric, the swap experiment, the kappa computation and the admission threshold all keep working unchanged.
The backbone of rubric scoring looks like this:
// score = rubric base + verbosity bonus + self-preference bonus
// Return the three separately: the report has to be able to say
// "0.25 of this 0.58 was a gift from length"
export function scoreByRubric(answer, rubric, cfg) {
const met = []
const missed = []
for (const c of rubric) {
if (c.markers.some((m) => answer.text.includes(m))) met.push(c.id)
else missed.push(c.id)
}
const base = rubric.length === 0 ? 0 : met.length / rubric.length
const lengthBonus = cfg.lengthBias * Math.min(1, answer.text.length / 200)
const selfBonus = answer.author === cfg.family ? cfg.selfBias : 0
return { base, lengthBonus, selfBonus, total: Math.min(1, base + lengthBonus + selfBonus), met, missed }
}# score = rubric base + verbosity bonus + self-preference bonus
# Return the three separately: the report has to be able to say
# "0.25 of this 0.58 was a gift from length"
def score_by_rubric(answer, rubric, cfg):
met = [c["id"] for c in rubric if any(m in answer["text"] for m in c["markers"])]
missed = [c["id"] for c in rubric if c["id"] not in met]
base = 0 if len(rubric) == 0 else len(met) / len(rubric)
length_bonus = cfg["length_bias"] * min(1, len(answer["text"]) / 200)
self_bonus = cfg["self_bias"] if answer.get("author") == cfg["family"] else 0
total = min(1, base + length_bonus + self_bonus)
return {"base": base, "length_bonus": length_bonus, "self_bonus": self_bonus,
"total": total, "met": met, "missed": missed}The easiest thing to get wrong in the swap experiment is the second round. The arguments are reversed, so a returned "first wins" means B won, not A:
const forward = judgePair(pair.a, pair.b, rubric, cfg)
const backward = judgePair(pair.b, pair.a, rubric, cfg)
// Careful: in round two, first means b won. Get this backwards and the flip
// rate becomes 0, with nothing raising an error
const firstRound = forward === 'tie' ? 'tie' : forward === 'first' ? 'a' : 'b'
const secondRound = backward === 'tie' ? 'tie' : backward === 'first' ? 'b' : 'a'
// Accept only when both rounds agree; every flip becomes a tie
const flipped = firstRound !== 'tie' && secondRound !== 'tie' && firstRound !== secondRound
const verdict = firstRound === secondRound ? firstRound : 'tie'forward = judge_pair(pair["a"], pair["b"], rubric, cfg)
backward = judge_pair(pair["b"], pair["a"], rubric, cfg)
# Careful: in round two, first means b won. Get this backwards and the flip
# rate becomes 0, with nothing raising an error
first_round = "tie" if forward == "tie" else ("a" if forward == "first" else "b")
second_round = "tie" if backward == "tie" else ("b" if backward == "first" else "a")
# Accept only when both rounds agree; every flip becomes a tie
flipped = first_round != "tie" and second_round != "tie" and first_round != second_round
verdict = first_round if first_round == second_round else "tie"Kappa itself is four lines, but both degenerate branches have to be handled:
const po = (truePass + trueFail) / n
const judgeRate = (truePass + falsePass) / n
const humanRate = (truePass + falseFail) / n
const pe = judgeRate * humanRate + (1 - judgeRate) * (1 - humanRate)
// kappa is undefined as 1 - pe approaches 0. Report 0, not a perfect score
const kappa = 1 - pe < 1e-9 ? 0 : (po - pe) / (1 - pe)po = (true_pass + true_fail) / n
judge_rate = (true_pass + false_pass) / n
human_rate = (true_pass + false_fail) / n
pe = judge_rate * human_rate + (1 - judge_rate) * (1 - human_rate)
# kappa is undefined as 1 - pe approaches 0. Report 0, not a perfect score
kappa = 0 if 1 - pe < 1e-9 else (po - pe) / (1 - pe)The README's manual checklist has eight items, each worth walking through. A green self-test does not mean you understood those two sets of numbers, and they are the whole point of today.
Interview Questions
Today's four questions cover four points: the order in which graders are selected, the design of the position-swap experiment, the conditions under which accuracy lies, and what to do with flipped data. The third comes up often and separates candidates the most. Most people can say "use kappa, not accuracy", but not under what conditions accuracy lies or by how much. Explain that when nine in ten samples are passes an always-pass judge also scores ninety percent accuracy, then add that its kappa is 0, and the question is answered in full.
Checklist and Tomorrow
By the end of today you should be able to:
- State the priority order of the three grader kinds, and the cost of using a model where code belongs and of using code where a model belongs
- Break one vague quality requirement into three to five non-overlapping, decidable rubric criteria
- Name the three systematic biases and the mitigation for each
- Design a position-swap experiment, and explain why a flipped verdict becomes a tie rather than a coin flip
- Explain why accuracy lies under imbalanced labels, and use kappa instead as the admission criterion
- Get all ten assertions green with
MOCK=1 pnpm selftest - Compare the biased and unbiased runs yourself: first-slot win rate 70.8 against 50.0, kappa 0.259 against 0.714
Tomorrow is D4, Trajectory Evaluation: It Reached the Destination, but How Many Things Did It Hit. Today and D1 both graded the ending — was the answer right, was the reply good. A whole class of failures is invisible in the ending: it got the right answer, but it took seven detours, spent ten times the money, and called a tool it had no business calling. Tomorrow writes graders for the transcript itself, with tool-sequence checks, loop detection and step budgets, and answers a question that goes wrong easily: pinning the process down too tightly punishes smarter solutions, so how far should the checking go.
Interview questions
When would you refuse to use a model as the judge and reach for code or a human instead? State your decision order.什么情况下你会拒绝用模型当裁判,改用代码或人工?说出你的判断顺序。
Common in ChinaCommon overseasIntermediate#evaluation#graders#llm-as-judgeHow to reason about it · think before answering
- This tests selection discipline, not model knowledge. Jumping straight to prompt design misses the point: the interviewer wants to hear when you would NOT use a model judge.
- There is one ordering rule: if code can decide it, never hand it to a model. Whenever the criterion reduces to a settled fact, use code. Whether a refund happened is one database row; whether a file exists is one stat call; whether a status code matches is one comparison. Deterministic, free, instant.
- Only genuinely open-ended criteria reach the model tier: was it explained clearly, is the tone right, did it invent material that was not in the source. There is no fact to look up, so code cannot decide it.
- Human grading is the last tier, and it is not for running the full suite. Its one correct use is judging the judge: a few dozen human labels calibrate the model judge, and the model judge then runs at scale. Doing it the other way round spends the most expensive resource on the cases that need judgment least.
- State the cost in both directions - that is where candidates separate. Using a model where code would do buys you a noisy verdict that well-phrased lies can pass: an agent that calls no tool and merely says 'your refund has been processed' can score highly. Using code where a model is needed forces you to rewrite the criterion as keyword matching, so the grader starts measuring wording instead of quality, and the agent gets optimized toward hitting keywords nobody can read.
- Expected follow-up: what if half of an open-ended output is machine-checkable? Layer it rather than choosing. Whatever reduces to state goes to code (do the cited links resolve, are the required points present) and only the subjective remainder goes to the model. Attach both graders to the same task, each owning its half.
分析过程 · 先想清楚再作答
- 这题考的是选型纪律,不是模型知识。上来就聊提示词怎么写的,方向已经偏了——面试官想听的是你在什么时候**不**用它。
- 判断顺序只有一条:**能用代码判的绝不交给模型**。判据只要能落到一个确定的事实上,就该用代码。退款有没有发生是一行数据库记录,文件有没有生成是一次 stat,接口返回码对不对是一次比较,这些一律代码判——确定、免费、瞬时。
- 只有当判据本身是开放式的,才轮到模型:讲清楚了没有、语气合不合适、有没有编造材料里没有的内容。这类判据没有可查的事实,代码判不了。
- 人工型是最后一档,而且**不是拿来跑全量的**。它的正确用法只有一个:当裁判的裁判。用几十条人工标注去校准模型裁判,然后让模型裁判去跑全量。反过来做就是把最贵的资源浪费在最不需要判断力的地方。
- 两个方向的代价要分别说清楚,这是区分度所在。**该用代码却用了模型**:你花钱买了一个会抖、会被漂亮话骗过去的判定——一个什么工具都不调、只会说「已为您办理退款」的 Agent,在模型裁判下可能拿高分。**该用模型却用了代码**:为了让代码判得了,你会把判据改成关键词匹配,于是评分器考的是措辞而不是质量,Agent 会朝这个方向被优化,最后你得到一个句句踩关键词、没人看得懂的系统。
- 可预期的追问是「开放式输出里有一半能用代码判怎么办」。答案是**分层而不是二选一**:能落到结果态的部分交给代码(引用的链接解不解析得开、必须覆盖的要点在不在),剩下真正主观的部分才交给模型。同一个任务上挂两个评分器,各管各的那一半。
Key points
- The order is fixed: never give a model what code can decide; humans only calibrate the other two.
- If the criterion reduces to a settled fact, use code: outcome state, fields, status codes - deterministic and free.
- Model where code would do: a noisy, paid verdict that an agent producing only nice words can pass.
- Code where a model is needed: the criterion degrades into keyword matching and the grader measures wording, not quality.
- Layer open-ended output instead of choosing: checkable parts to code, subjective remainder to the model.
答题要点
- 顺序是固定的:能用代码判的绝不交给模型,人工只用来校准前两者。
- 判据能落到确定事实上就用代码:结果态、字段、返回码,确定且免费。
- 该用代码却用模型:判定会抖、会花钱、会被不干活只说漂亮话的 Agent 骗过。
- 该用模型却用代码:判据被迫退化成关键词匹配,评分器开始考措辞而不是质量。
- 开放式输出要分层,不是二选一:可查的部分给代码,主观的剩余部分给模型。
How would you prove your model judge has no position bias? Describe an experiment someone could actually run.你怎么证明自己的模型裁判没有位置偏好?请描述一个可执行的实验。
Common in ChinaCommon overseasDeep dive#evaluation#llm-as-judge#biasHow to reason about it · think before answering
- The question asks for a runnable experiment, so 'I would watch out for ordering effects' scores zero. Specify the data, the judging runs, the statistics, and the decision rule.
- Design: take a set of answer pairs and judge each pair twice, once with A first and once with B first, everything else identical. One pair yields two verdicts; N pairs yield 2N.
- The core statistic is the front-slot win rate: among all decisive single rounds, the fraction where the winner happened to be presented first. With no position bias it should sit at 50%. Significantly above is position bias, and significantly below is too - some models favor the second option, which is equally systematic.
- The second statistic is the flip rate: the fraction of pairs whose two rounds contradict each other. It is not a detector but a loss estimate - a 40% flip rate means that judging once leaves 40% of your conclusions determined by position, and the report will not say which ones.
- Sampling matters: deliberately include evenly matched pairs. Position bias only shows up when quality is close; a set of lopsided pairs buries the bias under the quality gap and you will measure a comforting 50%. This is the easiest place for the experiment to lie to you.
- Close with the decision rule and the control. Use a statistical test rather than eyeballing: a binomial test of the front-slot rate against 50%, noting that a small sample gives an interval too wide to conclude anything. For the control, run the same data through a judge known to be unbiased and confirm the harness reports 50% - without that step you cannot distinguish 'measured a real bias' from 'the harness always reports bias'.
- Expected follow-up: what do you do once bias is confirmed? In order: switch to independent per-item scoring to avoid pairwise entirely; if pairwise is required, run the swap and call flips ties; only then consider changing the judge model.
分析过程 · 先想清楚再作答
- 这题问的是「可执行的实验」,所以答「我会注意顺序的影响」是零分。必须给出数据怎么造、判决怎么跑、统计什么数字、判据是什么。
- 实验设计:取一批成对的答案,每一对**正反各评一次**。第一轮把 A 放前面,第二轮把 B 放前面,其余条件完全相同。一对答案得到两条判决,N 对得到 2N 条。
- 要统计的核心数字是**前排胜率**:在所有分出胜负的单轮判决里,赢家恰好被摆在前面的比例。没有位置偏好时它应该是 50%。显著高于 50% 就是位置偏好,显著低于 50% 也是(少数模型会偏向后一个,同样是系统性偏差)。
- 第二个数字是**结论翻转率**:两轮结论互相矛盾的对数占比。它的用途不是检测,而是估算损失——翻转率是 40% 就意味着,只评一轮的话你的结论里有四成是位置决定的,而报告不会告诉你是哪四成。
- 样本怎么造是有讲究的:**要故意包含一批势均力敌的答案对**。位置偏好只在质量接近时发作,全拿一优一劣的对子去测,偏差被质量差距盖住,你会测出一个漂亮的 50% 并得出错误结论。这也是这个实验最容易做假的地方。
- 最后要说判据与对照。判据用统计检验而不是眼看:前排胜率对 50% 做二项检验,样本量不够时区间会宽到什么都说明不了。对照组的做法是拿一个**已知无偏**的裁判跑同一批数据,确认实验代码本身会输出 50%——不做这一步,你无法区分「量出了偏差」和「实验代码恒定报告有偏差」。
- 可预期的追问是「测出来有偏差之后怎么办」。顺序是:先换成逐条独立打分绕开成对比较;必须成对时用交换实验并把翻转的判平;两者都不行才考虑换裁判模型。
Key points
- Judge each pair twice with the order swapped; N pairs give 2N verdicts under otherwise identical conditions.
- Primary metric: front-slot win rate, which should be 50% for an unbiased judge.
- Secondary metric: flip rate, estimating how many single-round conclusions position would have decided.
- Deliberately include evenly matched pairs, or the quality gap masks the bias.
- Decide with a binomial test, and run a known-unbiased judge as a control to confirm the harness reports 50%.
答题要点
- 同一对答案正反各评一次,N 对得到 2N 条判决,其余条件完全相同。
- 主指标是前排胜率:赢家恰好排在前面的比例,无偏时应为 50%。
- 辅指标是翻转率,用来估算「只评一轮」会让多少结论由位置决定。
- 样本必须故意包含势均力敌的对子,否则质量差距会把偏差盖住。
- 判据用二项检验,并拿一个已知无偏的裁判做对照,确认实验本身会输出 50%。
Why measure judge quality with an agreement coefficient rather than accuracy? Give a scenario where accuracy lies.为什么评估裁判质量要用一致性系数而不是准确率?举一个准确率会骗人的场景。
Common in ChinaCommon overseasDeep dive#evaluation#metrics#kappaHow to reason about it · think before answering
- The discriminator is not whether you know kappa, but whether you can state the conditions and the magnitude by which accuracy lies. 'Accuracy is unreliable on imbalanced data' is common knowledge, not an answer.
- Lead with a concrete scenario. You send thirty samples for human labeling; humans mark twenty-seven acceptable and three not. That ratio is realistic - most production samples sent for labeling are fine. Now compare a judge that looks at nothing and always says pass: it is right twenty-seven times, for 90% accuracy. A zero-information constant scores 90%.
- And this is not a contrived extreme. The more imbalanced the labels, the higher it goes: on ninety-nine to one data the same constant reports 99%. On imbalanced data accuracy is systematically optimistic, not occasionally wrong.
- Kappa applies one correction: compute pe, the agreement two labelers would reach by chance given their own label distributions, and subtract it from the observed agreement po, as (po - pe) over (1 - pe). For the constant judge po is 0.9 and pe is also 0.9, so kappa is exactly 0. Kappa of zero means the judge is equivalent to guessing from the label distribution, regardless of how high its accuracy looks.
- Resolution makes the case even better. In a measured comparison, removing a judge's length bias moved accuracy from 86.7% to 93.3%, about six and a half points, while kappa jumped from 0.259 to 0.714 - from nearly useless to over the admission line. The same improvement, an order of magnitude apart in signal. And before the fix, the always-pass constant scored 90%, higher than the real judge. Gate on accuracy and you eliminate the only judge carrying information.
- Close with thresholds and edge cases. Rules of thumb: below 0.2 is nearly useless, 0.4 to 0.6 is marginal, 0.6 to 0.8 is pipeline-grade. Two edges are worth naming: when both labelers assign every sample to one class kappa is undefined and the implementation must return 0 rather than 1; and with more than two labelers you switch to Fleiss' kappa, same idea.
分析过程 · 先想清楚再作答
- 这题的区分度不在「知不知道 kappa」,而在能不能把准确率骗人的**条件与幅度**说具体。只说「数据不均衡时准确率不可靠」,答的是常识。
- 先把场景摆出来,越具体越好:你送了三十条样本去人工标注,人工判定二十七条合格、三条不合格。这个比例接近真实——线上送去标注的样本本来就大多数是正常的。现在拿一个**什么都不看、一律判通过**的裁判来比:它判对了二十七条,准确率 90%。**一个零信息量的常量,拿到了 90% 的准确率。**
- 而且这不是极端构造。标签越不均衡,这个数字越高:九十九比一的数据上,同一个常量裁判能报出 99%。准确率在不均衡数据上是一个**系统性乐观**的指标,不是偶尔失灵。
- kappa 的修正只有一步:先算出「随机也能一致」的比例 pe,再从观察一致率 po 里扣掉它,公式是 (po - pe) 除以 (1 - pe)。那个常量裁判的 po 是 0.9,pe 也是 0.9,kappa 正好是 0。**kappa 为 0 的含义是「这个裁判等价于按标签分布瞎猜」,与它的准确率有多高完全无关。**
- 更能说明问题的是分辨率。实测过一组对照:同一个裁判修掉长度偏好之后,准确率从 86.7% 升到 93.3%、涨了 6.6 个点,而 kappa 从 0.259 跳到 0.714——从「几乎没用」直接跨过准入线。同一个改进,两个指标的反应差了一个数量级。而在修之前,那个一律判通过的常量裁判准确率是 90%,**比真裁判还高**。用准确率做准入,你会淘汰掉唯一一个带信息的裁判。
- 最后给阈值与边界:经验上 0.2 以下几乎没用,0.4 到 0.6 勉强,0.6 到 0.8 可以进流水线。两个边界情形要提:两人都把所有样本判成同一类时 kappa 无定义,实现里必须返回 0 而不是 1;标注者多于两人时换 Fleiss' kappa,思路一样。
Key points
- Scenario: with twenty-seven of thirty acceptable, an always-pass constant already scores 90% accuracy.
- The more imbalanced the labels, the higher it climbs - accuracy is systematically optimistic here.
- Kappa subtracts pe, the chance agreement, and the constant judge lands at exactly 0.
- Kappa resolves far better: one fix moved accuracy 6.6 points but kappa from 0.259 to 0.714.
- 0.6 and up is pipeline-grade; kappa is undefined when both labelers pick one class and must return 0; use Fleiss for more labelers.
答题要点
- 场景:三十条里二十七条合格时,一律判通过的常量裁判准确率就有 90%。
- 标签越不均衡这个数字越高,所以准确率是系统性乐观,不是偶尔失灵。
- kappa 把「随机也能一致」的 pe 扣掉,那个常量裁判的 kappa 正好是 0。
- kappa 的分辨率高得多:同一次修复准确率涨 6.6 个点,kappa 从 0.259 到 0.714。
- 阈值 0.6 起可进流水线;两人同判一类时 kappa 无定义必须返回 0,多人换 Fleiss。
In a pairwise comparison the two rounds disagree. How do you handle that data point, and why not just pick one at random?成对比较时两轮结论不一致,你会怎么处理这条数据?为什么不是随机取一个?
Common in ChinaCommon overseasIntermediate#evaluation#llm-as-judge#pairwiseHow to reason about it · think before answering
- This looks like a detail but tests whether you will write noise into a report as if it were signal. Answering 'take the first round because it matches real usage order' has already fallen in.
- The correct handling is to call it a tie. A flip means precisely one thing: that conclusion was decided by position, not by quality. Its information content is zero, and a tie is the honest way to say 'these two cannot be separated'. A tie is not a failure to conclude; it is a conclusion.
- Why not pick at random: that writes noise into the report, and half the time it will coincidentally match your expectation. The coincidental half increases your confidence in the judge, so the error gets locked in. The cost of treating noise as signal is not one missing data point but one fabricated one.
- Why not always take the first round either: that swallows the position bias wholesale. The entire purpose of the swap was to remove positional influence, so resolving by position undoes the experiment.
- Also specify what happens downstream. A tie is neither a pass nor a fail; it belongs in its own bucket in the report, alongside the count of decisive conclusions. A high tie rate is itself a finding - it says your rubric cannot separate these answers, either because it is too coarse or because the two systems really are comparable.
- Expected follow-up: what if ties leave too few data points? Fix it on the data side - more samples, or finer criteria so the rubric can discriminate - not by relaxing the merge rule. Relaxing it trades conclusion quality for conclusion count, which is backwards.
分析过程 · 先想清楚再作答
- 这题看着是个细节,实际上考的是「会不会把噪声当成信号写进报告」。答「取第一轮的结果,因为它更接近真实使用顺序」的,已经掉进坑里了。
- 正确处理是**判平局**。翻转的含义很明确:这条结论是由位置决定的,不是由质量决定的。它携带的信息量是零,而平局恰恰是「分不出来」的如实表达。平局不是认输,是一个有内容的结论。
- 为什么不能随机取一个:随机取等于把噪声写进了报告,而且它有一半的概率碰巧和你的预期一致。碰巧一致的那一半会让你更相信这个裁判,于是错误被固化。**把噪声当成信号的代价,不是少了一条数据,而是多了一条假数据。**
- 为什么也不能固定取第一轮:那等于把位置偏好整个吞了下去。你测这个实验的全部目的就是消除位置的影响,最后却按位置取结论,等于没做。
- 顺带要说清楚平局的下游处理。平局不能当成失败,也不能当成通过,它应该单独成一档进报告:多少条有效结论、多少条判平。平局比例过高本身就是一个结论——它说明这批答案在你的量表下分不出差别,要么量表太粗,要么这两个系统确实旗鼓相当。
- 可预期的追问是「平局太多导致样本量不够怎么办」。答案不是放宽合并规则,而是从数据侧解决:加样本量、或者把判据拆细让量表分得动。放宽合并规则等于用降低结论质量来换结论数量,方向反了。
Key points
- Call every flipped pair a tie: it was decided by position, not quality, and carries zero information.
- Picking at random writes noise into the report and half the time appears to confirm your expectation, locking in the error.
- Always taking the first round swallows the position bias and wastes the swap entirely.
- Report ties as their own bucket - neither a pass nor a fail.
- Too many ties is a data-side problem: more samples or finer criteria, not a looser merge rule.
答题要点
- 翻转的结论一律判平:它由位置而不是由质量决定,信息量是零。
- 随机取一个是把噪声写进报告,还会有一半概率碰巧印证你的预期,固化错误。
- 固定取第一轮等于吞掉位置偏好,交换实验白做。
- 平局单独成一档进报告,不能算失败也不能算通过。
- 平局过多要从数据侧解决:加样本、拆细判据,而不是放宽合并规则。