Module: L2-M05 · Duration: ~120 min (estimate, including the independent exercise) · Previous: L02 · Next: L04
1. Introduction
L2-M02-L03 taught the loop of measuring agreement, adding a rule for the borderline case, measuring again, and resolve, which does not silently pick a side; that lesson promised "detailed disagreement analysis" for L2-M05-L03. L02 gave one overall number. This lesson answers where the disagreement is and what causes it: an ambiguous guideline, a rater who scores more leniently or more strictly, a rater who changes how they score over time, or noise. Then it teaches rule-based adjudication, fixing the guideline with a change log that can be checked against data, and re-measuring on different items to see whether the fix worked.
The annotators, the leniency and the drift in the lab are all simulated; round 2 has lower noise on the ambiguous kinds, so the "improvement" is by construction and only illustrates the method. The output of this lesson is a guideline v2 with the reason for each change and a record of the adjudicated items.
2. Learning objectives
- Analyse disagreement by item, by confused level pair and by item kind, and avoid the alpha trap in a homogeneous group. Practice: §8.2 parts A, B, §9 (TODO 2).
- Distinguish a rater with a constant offset from a rater who drifts, and use anchor items to tell who drifts. Practice: §8.2 part C, §9 (TODO 1).
- Adjudicate with a rule and an adjudicator, without silently choosing. Practice: §8.2 part F, §8.3.
- Write guideline v2 with a change log where every line rests on real figures. Practice: §8.2 part D, §9 (TODO 3).
- Compare two rounds on new items using bootstrap intervals and conclude at the right strength. Practice: §8.2 part E, §8.3.
3. Prerequisites and tools
- L2-M02-L03: the guideline, the borderline case, adjudication, the loop. L2-M05-L02: alpha, the bootstrap interval. L2-M05-L01: gold items and assignment.
- The code lab
code-labs/l2-m05(self-contained). Data: round 1 (guideline v1) and round 2 (v2, 60 items with new ids), five annotatorsA1toA5(simulated), 16 anchor items with an expert score.
4. Concepts
4.1 Disagreement has many sources, and not every source is an error
Four common sources: an ambiguous guideline (everyone deviates on the same kind of item); different leniency (one person is always higher or lower than the others); drift (one person changes how they score over time); noise (carelessness, tiredness: Anthropic mentions "reviewer fatigue" [R1]). McHugh writes that when kappa is strongly negative (the data look more random than systematic) one needs to "retrain raters or redesign the instruments" [R2]: retrain the people or redesign the instrument, so you have to know which source it is.
There is one more source that is not an error. Plank (2022) argues that variation among annotators is often treated as noise but can reflect real variation: disagreement, subjectivity, several plausible answers [R3, abstract only]. Pavlick and Kwiatkowski (2019) conclude that disagreement about textual inference is "not dismissible as annotation noise" [R4, abstract only]. Both are about natural language tasks, not about tutoring. The practical lesson: do not erase the original disagreement after adjudication; keep both the original labels and the final label.
4.2 Where to look for disagreement
Three views are already in lab/disagree.py. By item: hard_items lists the items whose scores differ by two levels or more. By level pair: pair_confusions counts the pairs of differing scores (low, high) over every pair of people, showing which level is often confused with which. By item kind: slice_report gives each group the number of items, the number of pairs, the share of pairs that match exactly and the mean absolute difference between the pairs.
The trap: alpha inside a homogeneous group. If all items in a group are nearly the same in true quality, D_e is small and close to D_o, so alpha tends to 0 even though the people agree (a test pins this trap, §5.1). Within a group, read the match rate and the mean difference; alpha is for a set diverse enough.
4.3 Adjudication with a rule
Anthropic lists "inter-rater disagreement requires reconciliation" among the drawbacks of studies using people [R1]; OpenAI recommends combining several raters by majority vote [R6] (the quotes from Anthropic, OpenAI and McHugh come from the automatic summary of the page-reading tool). adjudicate has two rules. Majority: a label chosen by more than half of the item's raters wins. Median: an item with an odd number of labels that differ by at most one point takes the middle score; this rule is stricter than majority (whatever it decides, majority also decides, with the same label), and serves only to illustrate a more cautious rule. An item the rule cannot decide needs an adjudicator: their label is passed in, and a missing label is an error, AdjudicationNeeded, not a silent choice; a label for an item the rule already decided, an unknown item or a label outside the scale is also an error. The result keeps method and the original scores. The lab does not record the adjudicator's name; outside the lab, record who adjudicated and why (L2-M02-L03).
5. Technical deep dive
5.1 Round 1 under guideline v1
On 60 items (simulated): 22 items have a gap of two levels or more, and 13 items have no label chosen by more than half of the raters (they need an adjudicator). The level pairs most often confused (counting pairs of differing people): (4, 5) 29 times, (1, 2) 17, (1, 3) 15, (2, 3) 12, (3, 4) 12. By item kind:
hint_borderline(the line "Chắc là 4, em thử tính xem", roughly "It's probably four, try working it out"): 12 items, 36 pairs, exact match 0.194, mean deviation 1.444.rude(the right answer but with a put-down): 8 items, match 0.250, deviation 1.083.bare(only the answer): match 0.417, deviation 1.000.good_verbosematch 0.300, deviation 0.800;wrongmatch 0.625, deviation 0.500;good_clearmatch 0.714, deviation 0.286.
The trap of §4.2: good_clear is the group where people match best (0.714) but the alpha inside the group is −0.004. The three kinds that deviate most are hint_borderline, rude, bare, exactly the groups where v1's anchors are ambiguous. In the simulation, the noise of these three kinds is set higher; in real life you have to read each item to learn the reason.
5.2 Raters: constant offset, drift and anchor items
rater_offsets computes for each person: the mean of (their score minus the mean score of the other people on the same item). Round 1: A1 +0.04, A2 0.00, A3 −0.67, A4 +0.40, A5 +0.22; with the lab's limit of 1/3 point, A3 (strict) and A4 (lenient) are flagged. This is a rater's directional bias (offset), relative to the other people, not relative to the truth: if the whole group is one point higher, every offset is 0. It differs from the judge's leniency in L2-M04-L03, which was measured against human labels.
The relative approach can also blame the wrong person. Comparing the second half of round 1 with the first, A5's offset rises by 0.56 but A1's falls by 0.75: A1 has not changed, it is the point of comparison (which includes A5, who is shifting up) that has moved. The right way is to compare against a fixed reference: 16 clear anchor items with an expert score, hidden in the sample and spread evenly across batches. An anchor item differs from the rubric's "anchor example" (L2-M03-L03), which is shown to the raters; it resembles the canary set of L2-M04-L05 but measures the drift of people instead of the judge. anchor_offsets measures each person's error against the expert score by batch; anchor_drift_flags flags a person whose error in the second half differs from the first half by 3/4 point or more (in either direction), when each half has at least 6 labels on anchor items. Result: only A5 (+0.88). Limits: the anchors must really be unambiguous and not recognised; the thresholds of 3/4 and 6 are the lab's choices, and comparing two halves is only a rough test, not a significance test.
5.3 Adjudication, guideline v2 and comparing two rounds
Guideline v1 passes through lint_guideline with 2 problems (no borderline-case rule, no policy for when unsure). Guideline v2 adds three rules and a change log: each line has evidence (the item kind, the number of items, the mean difference) and rationale. check_changes checks that each line cites exactly one kind present in the data, that the item count matches, that the difference matches when rounded to three digits, that codes are not repeated and that the rationale is at least 8 words long; the lab's v2 passes all these checks. It does not check whether the rule is any good. examples_in_items reports an example that duplicates an item to be labelled (normalising case and whitespace), but does not detect an example in which a few numbers were changed.
Round 2 uses 60 items with new ids under v2. compare_rounds rejects two rounds that share item ids, but it only checks ids: 33 of the 60 replies in round 2 repeat verbatim a reply from round 1 because the lab's reply templates repeat. Pass text_of so the function reports the number of repeats (text_overlap), or strict_text=True to reject. The two rounds must also be sampled with the same proportions of item kinds (stratified as in L01); otherwise a difference in alpha may be due to the set of items rather than the guideline.
The quadratic alpha of round 1 is 0.665 (interval 0.528 to 0.767, seed "rounds"; the bootstrap interval changes with the seed) and of round 2 is 0.815 (0.735 to 0.872). The score rises but the two intervals overlap (0.735 is less than 0.767), so the verdict is UNCLEAR; UNKNOWN if an interval is undefined. IMPROVED only when the round 2 interval lies entirely above round 1: a cautious rule, since an overlap can still hide a real improvement. More items or a paired design are needed. Round 2 has only 9 items needing an adjudicator (round 1: 13); 51 items were decided by the rule.
6. The QA perspective
6.1 What this analysis does not prove
- A relative offset does not say who is wrong; only anchors (if good) give a fixed reference.
- A small group gives unstable numbers (
rudehas only 8 items): read n next to the number. - A change log with correct numbers does not mean the rule is good; you need someone who has not seen the guideline to label a trial set.
- The two rounds can partly repeat verbatim and differ in the proportions of item kinds: compare with
text_ofand the same stratum proportions. - The thresholds of 1/3 point, 3/4 point, 6 anchors and the overlapping-interval rule are the lab's choices, not a standard.
- The adjudicator labels in the demo (all equal to 3) are only a placeholder; that round 2 is less noisy comes from the simulation, and it does not follow that every guideline fix improves things.
6.2 Criteria that change while scoring: the guideline must be versioned
Shankar and colleagues describe "criteria drift": users need criteria to grade outputs, but grading outputs helps them define the criteria [R5, arXiv abstract only; a preprint]. The consequence: the guideline will change as people look at data, so you need a version number, a change log and re-measurement on items not used to write the rules. Record the guideline version and which items are used only for measuring.
7. Real-world scenarios
Scenario 1 (fictional): "Reminding the wrong person". A team compared each person with the mean of the others, saw A1 fall by 0.75 and told A1 to retrain. The anchor items showed that A1's error had not changed, while A5 had shifted up by 0.88 points. The team switched to measuring against anchors.
Scenario 2 (fictional): "Fixing on the very same items". A team wrote the rules after reading 60 items, then re-scored those same 60 items and reported that alpha rose. compare_rounds raises an error because they share item ids. They took 60 different items: UNCLEAR, more items needed.
8. Hands-on tutorial
8.1 Setup
cd academy-content/code-labs/l2-m05
python3 -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
python -m pip install -r requirements.txt
python -m pytest # 71 passed
8.2 Run the demo
python -m lab.demo l03
Output (copied from a real run on Python 3.14.6 and 3.12.14, 2026-11-04; the two versions give identical output). Every annotator is simulated:
A. round 1 under guideline v1 (simulated annotators) : items 60 items with a range of 2+: 22 need an adjudicator (no majority): 13
level pairs that differ (low, high): count -> {(1, 2): 17, (1, 3): 15, (2, 3): 12, (3, 4): 12, (4, 5): 29}
B. by item kind (pairs, exact, mean abs diff, quadratic alpha)
bare items 8 pairs 24 exact 0.417 diff 1.000 alpha -0.017
good_clear items 14 pairs 42 exact 0.714 diff 0.286 alpha -0.004
good_verbose items 10 pairs 30 exact 0.300 diff 0.800 alpha -0.222
hint_borderline items 12 pairs 36 exact 0.194 diff 1.444 alpha 0.017
rude items 8 pairs 24 exact 0.250 diff 1.083 alpha 0.040
wrong items 8 pairs 24 exact 0.625 diff 0.500 alpha 0.123
C. offset of each rater from the other raters (points): {'A1': '0.04', 'A2': '0.00', 'A3': '-0.67', 'A4': '0.40', 'A5': '0.22'} flagged: ['A3', 'A4']
relative drift (second half minus first): {'A1': '-0.75', 'A5': '0.56'}
anchor drift (error against the expert score): {'A5': '0.88'}
D. guideline v1 lint: 2 problems; v2 lint: [] ; v2 change log vs round 1 data: []
E. round 2 (60 items with new IDs, guideline v2): quadratic alpha 0.665 (0.528-0.767) -> 0.815 (0.735-0.872) UNCLEAR
round-2 items whose reply text repeats a round-1 reply: 33 of 60 (the lab's reply templates repeat; seed 'rounds')
same items twice -> the two rounds share items: ['R001', 'R002', 'R003']
F. adjudication of round 2: 51 items by the rule, 9 by an adjudicator (placeholder adjudicator labels: all 3)
Reading the output: A is the number of hard items, the often-confused level pairs (printed only from 12 occurrences) and the number of items needing an adjudicator; B is the table by item kind; C is the offset, the relative drift flags (A1, A5) and the anchor-based ones (only A5); D is the lint and the change log check; E is the two-round comparison with the number of verbatim repeats; F is the adjudication of round 2.
8.3 Try it yourself
Save it as try_l03.py in the lab's root folder (next to lab/), run python try_l03.py, then delete the file:
from lab import disagree as D, guideline as G
t = {"a": {"x": 4, "y": 4, "z": 5}, "b": {"x": 1, "y": 3, "z": 5}, "c": {"x": 2, "y": 3}}
print(D.needs_adjudication(t), D.needs_adjudication(t, "median"))
print(D.adjudicate(t, "majority", {"b": 3, "c": 2})["b"])
try:
D.adjudicate(t)
except D.AdjudicationNeeded as e:
print(e)
def table(p, off):
return {f"{p}{n}": {"A": n % 5 + 1, "B": min(5, n % 5 + 1 + off), "C": n % 5 + 1} for n in range(30)}
r = G.compare_rounds(table("x", 2), table("y", 0), reps=200)
print(r["verdict"], r["text_overlap"])
Output (identical on Python 3.14.6 and 3.12.14):
['b', 'c'] ['b', 'c']
{'label': 3, 'method': 'adjudicator', 'scores': [1, 3, 5]}
b: scores [1, 3, 5] need an adjudicator
IMPROVED None
Reading: item b (scores 1, 3, 5) and c (two raters, 2 and 3) need an adjudicator under both rules; item a (4, 4, 5) is decided by the rule. Line 2 shows that the record keeps method and the original scores. Line 3: calling without an adjudicator label is an error and says which item. Line 4: on the self-made data (30 items; in the first round one person is always two levels off, in the later round all three match exactly), compare_rounds gives IMPROVED, and text_overlap is None because text_of was not passed. Line 1 prints two identical lists because the median is stricter than majority (§4.3).
8.4 Run the lesson's tests
python -m pytest tests/test_l03_disagree.py tests/test_data.py -v
Result: 22 passed (17 tests for this lesson, 5 data checks). Read test_relative_drift_blames_the_wrong_rater_and_anchors_do_not, test_slice_report_numbers_and_the_alpha_trap, test_adjudicate_refuses_bad_adjudicator_input and test_check_changes_accepts_the_shipped_log_and_rejects_each_defect. The tests run on in-memory values and the lab's data; they check no guideline outside the lab.
8.5 Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
AdjudicationNeeded |
The rule cannot decide an item | Supply an adjudicator label (needs_adjudication lists them) |
compare_rounds reports share items |
The two rounds share item ids | Take different items |
check_changes reports does not match the data |
A number in the log is off | Recompute from slice_report |
9. Independent exercise
Problem: On new simulated data, find the person who drifts, name the most confused level pair and write a change log based on the figures.
Requirements: complete exercises/test_l03_disagree.py:
- TODO 1:
DRIFTING_RATER(a string) andFIRST_DRIFT_BATCH(an integer): the only person flagged byanchor_drift_flags, and the first batch in which that person's anchor error is higher than the mean of batches 1 and 2 by 3/4 point or more. - TODO 2:
most_confused_neighbours(table): among adjacent level pairs, the most confused pair and its share of all disagreeing pairs of people; return((low, high), share)with aFraction, ties go to the smaller low level,ValueErrorwhen no pair differs. - TODO 3:
V2_CHANGES: a list of change records for guideline v2, exactly one line for each of the two item kinds with the largest mean difference.
Test data: exercises/ex_round.jsonl (30 items, three raters, four kinds, three batches), exercises/ex_anchors.jsonl (18 anchor items, four raters, six batches).
Deliverable: two variables, a function and a list in the file exercises/test_l03_disagree.py itself.
Acceptance criteria: python -m pytest exercises/test_l03_disagree.py passes (3 tests): the drift flag via anchor_drift_flags, the function on a small table and on the data, the change log via check_changes. The tests do not judge whether the rationale is convincing.
Hint: TODO 1: read anchor_offsets by batch before choosing the person. TODO 2: start from pair_confusions, counting the non-adjacent pairs as well to get the denominator. TODO 3: take the item counts and differences from slice_report, rounded to three digits.
10. Knowledge check
0/16 done · Results are kept in this browser only.
P02 · True or false
P04 · Select all that apply
P05 · Put in order
P06 · Match
P07 · Spot the bug
The function below copies the majority rule of adjudicate but has one bug: with two people giving 3 and 4 it returns 3 instead of requiring an adjudicator.
def majority_label(vals):
n = len(vals)
top, cnt = Counter(vals).most_common(1)[0]
return top if cnt * 2 >= n else NoneP08 · Short answer
On round 2 (simulated), by item kind (items, mean difference, quadratic alpha): hint_borderline 12 items, 0.889, 0.110; good_verbose 10 items, 0.800, −0.142; rude 8 items, 0.750, −0.222; good_clear 14 items, 0.143, 0.191. Ranked by alpha, rude is the worst. Which number should you read to choose the kind that needs a rule first, and why?
P09 · Essay
Write 5-8 sentences: draft one change-log line for the good_verbose group of round 2 (simulated: 10 items, mean difference 0.800). Include the new rule (one sentence, observable), the evidence part (group, item count, difference), a rationale of at least 8 words, and how you will measure whether the rule works.
P11 · Recall
Lesson: L2-M05-L02P12 · Recall
Lesson: L2-M04-L05P13 · Multiple choice
P14 · True or false
P15 · Select all that apply
P16 · Multiple choice
11. Summary
- Concepts: disagreement has many sources (guideline, leniency, drift, noise) and can reflect real variation; a relative offset differs from error against anchors; rule-based adjudication does not silently choose; the guideline is versioned; re-measure on new items.
- Skills: analysis by item, kind and person; adjudication; comparing two rounds.
- Traps: alpha inside a homogeneous group, blaming by relative offset, re-measuring on the very items already used, a change log with correct numbers but a poor rule, erasing the original labels.
- You can now: receive a table saying "agreement 0.67" and ask: in which item kind does it deviate, which person deviates against a fixed reference, on which items was the new guideline measured.
12. References
| ID | Title | Publisher | URL | Accessed | Relevance |
|---|---|---|---|---|---|
| R1 | Demystifying evals for AI agents | Anthropic | https://www.anthropic.com/engineering/demystifying-evals-for-ai-agents | 2026-11-04 | WebFetch (automatic summary) |
| R2 | Interrater reliability: the kappa statistic (McHugh, 2012) | Biochemia Medica (PMC) | https://pmc.ncbi.nlm.nih.gov/articles/PMC3900052/ | 2026-11-04 | WebFetch: the "retrain raters" sentence |
| R3 | The "Problem" of Human Label Variation (Plank, EMNLP 2022) | ACL Anthology | https://aclanthology.org/2022.emnlp-main.731/ | 2026-11-04 | Abstract only |
| R4 | Inherent Disagreements in Human Textual Inferences (Pavlick and Kwiatkowski, TACL 2019) | ACL Anthology | https://aclanthology.org/Q19-1043/ | 2026-11-04 | Abstract only |
| R5 | Who Validates the Validators? (Shankar et al., 2024) | arXiv:2404.12272 | https://arxiv.org/abs/2404.12272 | 2026-11-04 | Abstract only; a preprint, not recorded as peer-reviewed |
| R6 | Evaluation best practices | OpenAI | https://developers.openai.com/api/docs/guides/evaluation-best-practices | 2026-11-04 | WebFetch: majority vote |
Key terms (English ↔ Vietnamese)
| English | Tiếng Việt |
|---|---|
| Disagreement analysis | Phân tích bất đồng |
| Hard item | Mục khó (điểm chênh từ hai mức) |
| Rater offset | Thiên lệch có hướng (offset) của người chấm so với những người còn lại; khác leniency của judge (L2-M04-L03) |
| Anchor item | Mục neo: mục rõ ràng có điểm chuyên gia, giấu lẫn trong mẫu (khác "ví dụ neo" của rubric, L2-M03-L03) |
| Adjudicator | Người phân xử |
| Change log | Nhật ký thay đổi của guideline |
| Criteria drift | Tiêu chí đổi theo điều đã thấy khi chấm (khác "trôi" của người) |