Designing a human review protocol: questions, scales, sampling and assignment

Study time
≈ 2 h (estimate)
Needs
L2-M04-L05
Updated
2026-11-04

Progress is saved in this browser only. No account, nothing is sent to a server.

Draft · reviewed by AI, not yet by a person. Content may change. English translation: AI-assisted, not human-reviewed.
On this page

Module: L2-M05 · Duration: ~120 min (estimate, including the independent exercise) · Previous: L2-M04-L05 · Next: L02

1. Introduction

The earlier modules treated people as a ready-made source of labels. This module turns to the people themselves. Human evaluation is having a group of people read a system's output and score or label it following a written procedure. People are both the standard used to calibrate cheaper graders (code, judge) and a measuring instrument with its own error: they get tired, read the guideline differently and disagree with each other.

This lesson covers the part before any labels exist: writing the review protocol, choosing the sample the people will look at, deciding who looks at which item, and checking the annotators on entry (qualification) with gold items. L02 measures agreement, L03 resolves disagreement, L04 classifies failures.

Every annotator in the lab is simulated: the numbers describe the simulation, not real people. The output of this lesson is a protocol with instructions for reviewers (as data, with a lint) and a sampling and assignment plan.

2. Learning objectives

  1. Write a complete review protocol and run the lint to find what is missing. Practice: §8.2 part A, §9 (TODO 1).
  2. Compute the sample size for a margin of error, allocate a budget across strata and estimate the overall rate from a stratified sample. Practice: §8.2 parts B, C, §8.3, §9 (TODO 3).
  3. Design and check an assignment of k raters per item. Practice: §8.2 part D, §8.3.
  4. Score annotators on gold items, compare them with the floor of a random rater and choose a threshold. Practice: §8.2 part E, §9 (TODO 2).
  5. State what the lint and these checks do not guarantee. Practice: §8.3 (last line), §8.4.

3. Prerequisites and tools

  • L2-M02-L03: the guideline, the borderline case, adjudication. L2-M01-L04: the Wilson interval, sample size. L2-M04-L04: binary kappa.
  • The code lab code-labs/l2-m05 (self-contained, needs only pytest). The fictional product HocVui Tutor: a math tutor chatbot for students in grades 3 to 5.

4. Concepts

4.1 What people do in an evaluation system

Anthropic lists human grading as one kind of grader: the advantage is "gold standard" quality, used to calibrate model-based graders; the drawbacks are that it is expensive, slow and often needs experts at scale [R1]. OpenAI writes along similar lines: human evaluations "provide the highest quality but are slow and expensive", with the challenge of "disagreement among human experts" [R2]. So use human evaluation only where it matters most (calibration, hard cases, a small sample for spot checks), and measure the people's disagreement as well. (The quotes from Anthropic, OpenAI and McHugh come from the automatic summary of the page-reading tool and were not checked word for word against the original page.)

A human label is a measurement produced by a procedure, not "the truth", so the procedure has to be written down for others to rerun. Anthropic notes that when transcripts are read by hand, "reviewer fatigue or different reviewers can affect the signal quality" [R1]; so the protocol has to state the number of raters, the assignment and how they are checked.

4.2 How a protocol differs from a guideline

The guideline (L2-M02-L03) says what a label means. The review protocol adds: who labels, how many raters per item, how they are checked, what they see and do not see (blinding), which items are drawn for review, how disagreement is handled, and which measure with which threshold the report uses. The lab represents the protocol as data (data/protocol_example.json); lint_protocol returns a list of missing or inconsistent parts.

Flow of the review protocol: write the protocol (question, scale, rules) → sample by stratum → check the annotators on gold items; if they miss the entry threshold they are retrained or their labels are not used; if they pass, assign each item to k annotators with information hidden → independent labelling → measure agreement (L02) → adjudicate and revise the guideline (L03).
Diagram: How a protocol differs from a guideline

The reporting threshold (reporting.min_agreement) must be decided before labelling, so the number is not chosen after seeing the result: this is a design rule of the lab. OpenAI also recommends a pass or fail threshold next to the score, and combining several raters by majority vote [R2]; the lab combines them with a written adjudication rule (L03).

4.3 Independence and blinding

Agreement says something about the procedure only if the annotators work independently. The lab's protocol requires three flags: they do not see other people's labels (blind_to_other_labels), they do not know which system produced the item (blind_to_system), and they see the items in random order (random_order). This is a design principle of the lab, not a conclusion from any source. The lint only checks that the flag is true; actually achieving the blinding belongs to the labelling tool and the coordinator, and no test in the lab proves it.

5. Technical deep dive

5.1 Sampling for reviewers: how many, from where, how to estimate

Sample size for a margin of error. For a rate p and a margin m, under the normal approximation, you need n ≥ z² p (1 − p) / m², with z = 1.96 and p = 1/2 as the worst case. sample_size_for_margin computes this exactly with Fraction: a margin of 0.10 needs 97 items, a margin of 0.05 needs 385; with p = 0.1 and a margin of 0.10 only 35 are needed. This is the normal approximation; the Wilson interval (L2-M01-L04) differs when n is small or the rate is near 0 or 1. McHugh gives a rule of thumb that a sample for a reliability study should not be under 30 comparisons [R5]; the lab uses 30 as the floor of sampling.n.

Stratified sample. If 70% of traffic is easy questions, a simple random sample contains almost no rare ones. OpenAI names the anti-pattern of building an evaluation set "that don't faithfully reproduce production traffic patterns" [R2]. The fix: split into strata, give each stratum a minimum number of items, and divide the rest in proportion. stratified_allocation uses the largest remainder method, with ties broken by stratum name; the total equals the budget and never exceeds a stratum's size. With traffic easy 700, hint 150, rude 50, wrong 100 and a budget of 60: proportional gives 42, 9, 3, 6; a minimum of 10 per stratum gives 24, 13, 11, 12 (§8.2 part C). draw picks items in SHA-256 hash order of the item id and the seed: the same list and seed give the same sample, regardless of order.

You must weight. If a rare stratum is oversampled, then pooling everything and dividing overstates the failure rate. weighted_rate computes the sum of N_s · (k_s / n_s) / N (N_s the true stratum size, k_s the failing items, n_s the items reviewed) and raises ValueError when a stratum has items but none of them was reviewed: the rate is then not estimable, not 0 (§8.3 gives 11/75 against 13/60).

Artstein and Poesio. Reliability studies often have several people label a small subset, with one person per item for the rest; the result generalises when the measure reflects the reliability of the procedure, not of those particular people [R4, §3.1]. They also recommend testing with more than two people to reduce the chance that several people misread the same part of the guideline [R4, §3.1]. The lab only requires k ≥ 2 so that agreement can be measured; A&P recommend more than two people.

5.2 Assignment: who looks at which item

Each item needs k different people (overlap.k). k = 1 cannot measure agreement; k = 2 can, but when the two disagree there is no third person; k = 3 allows a majority (L03). design_assignments goes through the items in hash order and gives each item to the k raters with the lowest load (ties broken by hash), so the load of the lightest and heaviest rater differs by at most 1. check_assignments looks for five kinds of error: wrong set of items, wrong number of raters, one rater appearing twice, an unknown rater, load unbalanced by more than 1.

workload estimates the volume: 60 items, k = 3, five raters, 0.5 minutes per label for 180 labels, the busiest rater has 36 labels, 3/10 of an hour. 0.5 minutes is an assumption of the example, not measured on real people. Anthropic says reading transcripts by hand "doesn't scale" [R1]: when the volume is large, reduce n, reduce k or add raters, and record the choice.

5.3 Checking annotators with gold items

A gold item is an item whose score was set in advance by an expert. gold_report computes the exact match rate, the within-one rate (within one point) and the mean absolute error; qualifies requires the within-one rate to reach a threshold and, if one is set, the exact rate to reach its own threshold. The threshold must be compared with the floor of a random rater: random_within_one computes exactly the within-one rate of someone who picks uniformly at random on a scale of 1 to 5, which on the lab's 12 gold items is 0.517. A threshold of 3/4 is clearly above that floor; with a threshold of 1/2 someone mashing buttons can pass.

On the 12 gold items (simulated, §8.2 part E), A1 to A5 pass the 3/4 threshold (within-one from 0.833 to 1.000); X1, who always picks 3, reaches only 0.583 and X2, who picks at random, reaches 0.500; both are rejected. Straight-lining (assigning the same label to almost every item): straight_lining raises the flag when the most common label takes more than 4/5 of the scores; X1 has a share of 1 so is flagged; the function returns None when there are fewer than 10 scores.

6. The QA perspective

6.1 What the protocol and these checks do not prove

  • The lint only checks what is present. The test test_lint_passes_a_protocol_with_nonsense_anchors replaces the anchors with "alpha beta gamma 1" to "5" and the lint still comes back empty. The lint does not know whether an anchor is observable, whether the people were trained, whether the question is the right one; only measuring agreement (L02) and reading the disagreements (L03) tell you.
  • An independence flag is only a flag: blind_to_system: true does not prove the annotators cannot guess the system.
  • Gold items do not catch everything: someone alternating 3, 4, 3, 4 is not caught by straight_lining; a careful person who understands the guideline differently from you still passes and then deviates (L03).
  • A meaningless threshold still passes the lint. The lint only blocks a min_within_one that does not exceed the random rater's ceiling; a min_agreement of 1/100 still passes.
  • Strata and simulation. The allocation is right only for the strata you list; every number about annotators comes from the simulation.

6.2 Operational risks

Three risks to record. Volume: record n, k, the number of raters and the estimated time. Representativeness and the rights of participants: NIST AI RMF 1.0 has a subcategory MEASURE 2.2: evaluations involving human participants ("human subjects") must meet applicable requirements, including protection of the subjects, and be representative of the relevant population; the framework also states that human judgment is needed when choosing specific metrics and thresholds [R3]. This lesson gives no legal opinion and the lab implements no safeguards: whether a particular evaluation falls under this, and which requirements apply, is for the organization and legal counsel. Drift: annotators change how they score between rounds; L03 measures it.

7. Real-world scenarios

Scenario 1 (fictional): "Look at 20 replies, quickly". The HocVui Tutor team took the first 20 replies of the log, one person read them and reported "90% pass". The draft protocol (data/protocol_draft.json) has exactly those shortcomings; the lint lists 16 problems and the team rewrote it as a stratified sample of 60 items, five raters, three raters per item.

Scenario 2 (fictional): "The new person mashed buttons and still passed". A new person answered 3 on every gold item and reached about 60% "within one". The team compared with the random floor (0.517), raised the threshold from 1/2 to 3/4 and added a flag for assigning one label to every item.

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 l01

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. protocol lint: the draft, then the example
   - scale.anchors: level 2 has no anchor of at least 3 words
   - scale.anchors: level 3 has no anchor of at least 3 words
   - scale.anchors: level 4 has no anchor of at least 3 words
   - scale.anchors: two levels share the same anchor text
   - raters.qualification.gold_items: at least 10 gold items
   - raters.qualification.min_within_one: a share between 0 and 1
   - overlap.k: at least 2 raters per item, or agreement cannot be measured
   - independence.blind_to_other_labels: must be true
   - independence.blind_to_system: must be true
   - independence.random_order: must be true
   - unsure_policy: say what a reviewer does when unable to decide
   - adjudication.rule: say who decides when reviewers disagree
   - sampling.method: 'random' or 'stratified' (a convenience sample cannot be generalised)
   - sampling.n: at least 30 items
   - reporting.agreement_metric: one of ['cohen_kappa_quadratic', 'fleiss_kappa', 'krippendorff_alpha_interval', 'krippendorff_alpha_nominal']; raw percent agreement alone is not accepted
   - reporting.ci: report an interval for the agreement
   example -> []
B. sample size for a margin of 0.10 and 0.05 on a rate (normal approximation, p = 1/2): 97 385
C. review budget of 60 over {'easy': 700, 'hint': 150, 'rude': 50, 'wrong': 100}
   proportional: {'easy': 42, 'hint': 9, 'rude': 3, 'wrong': 6}  with at least 10 per stratum: {'easy': 24, 'hint': 13, 'rude': 11, 'wrong': 12}
D. assignments for 60 items, 3 raters each: no problem found {'labels': 180, 'busiest_rater_labels': 36, 'busiest_rater_hours': Fraction(3, 10)}
E. qualification on 12 gold items (simulated annotators)  random rater expected within-one: 0.517
   A1: exact 0.667 within-one 0.917 -> qualifies at 3/4: True
   A2: exact 0.583 within-one 0.917 -> qualifies at 3/4: True
   A3: exact 0.667 within-one 1.000 -> qualifies at 3/4: True
   A4: exact 0.500 within-one 0.833 -> qualifies at 3/4: True
   A5: exact 0.667 within-one 0.833 -> qualifies at 3/4: True
   X1: exact 0.167 within-one 0.583 -> qualifies at 3/4: False
   X2: exact 0.250 within-one 0.500 -> qualifies at 3/4: False

Reading the output: A is the 16 problems of the draft protocol and [] for the example protocol; B is 97 and 385 items; C compares the proportional allocation with the allocation that has a minimum per stratum; D is the assignment of 60 items, with no errors; E is the random floor and the results of seven annotators on the 12 gold items.

8.3 Try it yourself

Save it as try_l01.py in the lab's root folder (next to lab/), run python try_l01.py, then delete the file:

from fractions import Fraction
from lab import qc, sampling as S

print(S.sample_size_for_margin(Fraction(1, 10)), S.sample_size_for_margin(Fraction(1, 10), p=Fraction(1, 10)))
print(S.stratified_allocation({"easy": 700, "hint": 150, "rude": 50, "wrong": 100}, 24, min_per=5))
print(S.weighted_rate({"easy": (3, 30), "hint": (10, 30)}, {"easy": 800, "hint": 200}))
print(qc.straight_lining([3] * 8 + [4, 5]), qc.straight_lining([3, 4] * 10))
ids, raters = ["i1", "i2", "i3", "i4"], ["A", "B", "C"]
print(S.check_assignments(S.design_assignments(ids, raters, 2, "t"), ids, raters, 2))
print(S.check_assignments({"i1": ["A", "A"], "i2": ["A", "B"], "i3": ["A", "B"], "i4": ["A", "B"]}, ids, raters, 2))

Output (identical on Python 3.14.6 and 3.12.14):

97 35
{'easy': 8, 'hint': 6, 'rude': 5, 'wrong': 5}
11/75
{'share': Fraction(4, 5), 'flag': False} {'share': Fraction(1, 2), 'flag': False}
[]
['i1: a rater appears twice', "load unbalanced: {'A': 5, 'B': 3, 'C': 0}"]

Reading: line 1 is 97 (p = 1/2) and 35 (p = 1/10); line 2: 5 items per stratum first, the remaining 4 divided in proportion; line 3: the weighted estimate is 11/75 (0.8 · 0.1 + 0.2 · 1/3), while pooling gives 13/60 because the small stratum was oversampled; line 4: a share of 4/5 does not exceed the ceiling of 4/5 (the rule is greater than), and the rater alternating 3, 4 has a share of 1/2 so is not flagged even though they distinguish no items: the blind spot of §6.1. Lines 5 and 6: the assignment made by design_assignments has no errors ([]); a deliberately wrong assignment gets two errors from check_assignments, rater A appearing twice at i1 and an unbalanced load (A has 5, C has 0).

8.4 Run the lesson's tests

python -m pytest tests/test_l01_protocol.py tests/test_data.py -v

Result: 22 passed (17 tests for this lesson, 5 data checks). Read test_stratified_allocation_edges, test_check_assignments_catches_each_problem and test_lint_passes_a_protocol_with_nonsense_anchors. The tests run on in-memory values and the lab's data files; no test checks real people.

8.5 Troubleshooting

Symptom Cause Fix
ValueError: min_per times the number of strata exceeds the budget The per-stratum minimum times the number of strata is larger than the budget Lower min_per or raise the budget
ValueError: stratum 'x' has N items and no reviewed item The sample has no item from one stratum Draw more for that stratum; do not treat the rate as 0
ValueError: missing gold answers A gold item was left out Require answers for all of them

9. Independent exercise

Problem: Design a protocol for a new criterion, choose the entry threshold for annotators and estimate the failure rate of the whole dataset from a stratified sample.

Requirements: complete exercises/test_l01_protocol.py:

  1. TODO 1: PROTOCOL for the criterion "the tutor's reply uses vocabulary suitable for grade 4" on a scale of 1 to 5: it passes lint_protocol, 3 raters per item, at least 4 raters, enough items for a margin of 1/10, and the busiest rater under 2 hours at 1.5 minutes per label.
  2. TODO 2: MIN_WITHIN_ONE (a Fraction): a threshold that lets candidates c1 to c4 pass, rejects c5 and c6, and is above the random rater's floor.
  3. TODO 3: POPULATION_RATE and POOLED_RATE from ex_strata.json: the failure rate weighted by stratum size, and the rate when pooling all reviewed items.

Test data: exercises/ex_strata.json, exercises/ex_gold.json (12 gold items, six simulated candidates).

Deliverable: the four variables above, in the file exercises/test_l01_protocol.py itself.

Acceptance criteria: python -m pytest exercises/test_l01_protocol.py passes (3 tests): the lint plus numeric constraints, the threshold on the data, the two rates recomputed. The tests do not check the wording of the anchors or the question.

Hint: TODO 1: start from data/protocol_example.json, then run lint_protocol and workload. TODO 2: compute gold_report for each candidate and look at the gap between the two groups. TODO 3: think about why the two calculations differ.

10. Knowledge check

0/16 done · Results are kept in this browser only.

P02 · True or false

After seeing the agreement of the first round, the team may set the reporting.min_agreement threshold for that round, as long as the reason is recorded.

P04 · Select all that apply

lint_protocol returns [] for a protocol. Select everything lint does not guarantee.

P05 · Put in order

Put the steps of a review round in order.

  1. Check the annotators with gold items
  2. Write the protocol: questions, scale, rules
  3. Draw a stratified sample
  4. Measure the agreement
  5. Assign k people per item, with information hidden
  6. Label independently

P06 · Match

A budget of 50 items for three traffic strata of 900, 80 and 20 items (plain, units, trap; made-up numbers). Match each call of stratified_allocation with its result.

P07 · Spot the bug

The function below copies weighted_rate from the lab but has one bug: with hits = {"s1": (2, 20), "s2": (9, 20)} and sizes = {"s1": 900, "s2": 100} it returns 11/20000 instead of 27/200. Find the bug.

def weighted_rate(hits, sizes):
    total = sum(sizes.values())
    est = Fraction(0)
    for s, size in sizes.items():
        k, n = hits.get(s, (0, 0))
        if n == 0:
            raise ValueError(f"stratum {s!r} has {size} items and no reviewed item")
        est += Fraction(k, n)
    return est / total

P08 · Short answer

A team takes the last 25 sentences of the log; two people sit next to each other looking at the same screen and see each other's labels, then report "88% pass". Name at least four parts of the protocol that are missing or violated.

P09 · Essay

Write 5-8 sentences: traffic of 1600 sentences split into plain 1200, hint 300, rude 60, wrong 40; a reviewer budget of 80 items; four people, two people per item, assuming 1.2 minutes per label (not measured on real people). Choose the allocation with a minimum of 10 per stratum, state the items per stratum, the workload of the busiest person, and one thing this allocation still does not guarantee.

P11 · Recall

Lesson: L2-M04-L04

Two annotators rate 100 sentences as pass or fail (made-up numbers): both say "pass" for 60 sentences, only the first says "pass" for 10 sentences, only the second says "pass" for 10 sentences, both say "fail" for 20 sentences. By the binary kappa formula of L2-M04-L04, what is κ = (p_o − p_e) / (1 − p_e)?

P12 · Recall

Lesson: L2-M02-L03

By the guideline loop of L2-M02-L03, when two people differ a lot on one borderline case type, what is the right next step?

P13 · Multiple choice

With hits = {"s1": (2, 20), "s2": (9, 20)} and true stratum sizes {"s1": 900, "s2": 100} (made-up numbers), what is the error rate of the whole estimate?

P14 · True or false

The function straight_lining is called with nine scores that are all 5; it returns a share of 1 and flag is True.

P15 · Select all that apply

An assignment for five items j1 to j5 and three people P, Q, R, k = 2 is {"j1": ["P"], "j2": ["P", "Z"], "j3": ["Q", "R"], "j4": ["Q", "R"]}. Select every error check_assignments reports.

P16 · Multiple choice

A cut-down version has eight gold items with expert scores 1, 2, 3, 4, 5, 3, 3, 2 (made-up numbers; a real protocol needs at least 10 items by lint). random_within_one returns 11/20, that is 0.55. Which min_within_one threshold fits best?

11. Summary

  • Concepts: people are both the calibration standard and a measuring instrument with error; the protocol writes down what the guideline does not say; a stratified sample needs weights; gold items check entry against the floor of someone mashing buttons.
  • Skills: linting a protocol, sample size, stratum allocation, assignment, scoring gold items.
  • Traps: a convenience sample, pooling a stratified sample without weights, a threshold below the random floor, trusting a true flag in place of real blinding, treating a passing lint as a good protocol.
  • You can now: hear "give the reviewers 100 replies" and ask: chosen how, how many raters per item, checked how, which threshold fixed in advance.

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 Evaluation best practices OpenAI https://developers.openai.com/api/docs/guides/evaluation-best-practices 2026-11-04 WebFetch (automatic summary)
R3 AI Risk Management Framework 1.0 (NIST AI 100-1) NIST https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.100-1.pdf 2026-11-04 Full-text PDF: MEASURE 2.2
R4 Inter-Coder Agreement for Computational Linguistics (Artstein and Poesio, 2008) Computational Linguistics https://aclanthology.org/J08-4004.pdf 2026-11-04 Full-text PDF: §3.1
R5 Interrater reliability: the kappa statistic (McHugh, 2012) Biochemia Medica (PMC) https://pmc.ncbi.nlm.nih.gov/articles/PMC3900052/ 2026-11-04 WebFetch: sample size 30

Key terms (English ↔ Vietnamese)

English Tiếng Việt
Review protocol Giao thức rà soát (gồm số người, lấy mẫu, phân xử, báo cáo; guideline chỉ định nghĩa nhãn)
Annotator Người gắn nhãn ("người chấm" của L2-M03)
Stratified sample / stratum Mẫu phân tầng / tầng
Gold item Mục chuẩn: điểm do chuyên gia đặt sẵn
Qualification Kiểm tra đầu vào bằng mục chuẩn
Straight-lining Gán một nhãn cho mọi mục
Overlap (k) Độ chồng lấn: số người mỗi mục