Sub topic 8
Human evaluation and labeling guidelines
Automated checks and LLM judges are cheap and fast, but they measure only what you can describe in advance. Human evaluation is the reference point for everything else. It tells you whether your metrics track what users actually care about. This chapter covers when to use human review, how to write labeling guidelines, how to measure agreement between annotators, and how to turn labels into a usable dataset.
This chapter assumes you have read the earlier chapters on success criteria, evaluation datasets, and the evaluation harness. You should be comfortable with Python and with proportions and means.
When humans are worth the cost
Human review is slow and expensive, so use it where it adds the most value:
- Defining the standard. Subjective qualities such as tone, helpfulness, or completeness have no ground truth until people label examples.
- Calibrating automated scorers. A judge prompt is only trustworthy once you have compared it with human labels. The next chapter covers that comparison in detail.
- Discovering failure modes. Reading real outputs shows problems that no one thought to write a check for.
- Auditing high-stakes cases. Medical, legal, or financial answers often need an expert to review a sample.
Humans are a poor fit for running on every commit. The usual pattern is to label a modest set once, use it to validate cheaper scorers, and then re-sample periodically to check that those scorers still agree with people.
Choosing a labeling format
The format you pick shapes the quality of your data. Three formats are common.
| Format | What the annotator does | Strength | Weakness |
|---|---|---|---|
| Binary pass/fail | Decides if the output meets a stated criterion | Fast, high agreement, easy to aggregate | Hides how close a failure was |
| Rating scale (for example 1 to 5) | Assigns a score per criterion | Captures degrees of quality | Annotators use the scale differently |
| Pairwise preference | Picks the better of two outputs | Easier than absolute scoring | Gives no absolute quality level, and cost grows with the number of systems |
For most application work, start with binary labels per criterion. A single "overall quality" score mixes several questions together, and annotators weight them differently. Splitting the score into separate yes/no questions, such as "Is every claim supported by the context?" and "Does the answer address the question asked?", produces labels that are easier to agree on and easier to act on.
If you use a rating scale, define every point on it. A scale with only the endpoints named invites each annotator to invent their own midpoint.
Writing labeling guidelines
Guidelines are the specification of your metric. Two annotators given the same vague instruction will produce different labels, and you will not be able to tell whether the system or the instruction is the cause.
A good guideline contains:
- A single criterion per question, stated as a testable condition.
- A definition of each label, with the boundary between labels made explicit.
- Worked examples, including at least one borderline case for each label, with the reasoning written out.
- Rules for edge cases, such as what to do when the question is ambiguous, the output is empty, or the output refuses to answer.
- An escape option, such as "unsure" or "cannot judge," so annotators are not forced to guess.
Here is a short excerpt for a faithfulness criterion:
Question: Is every factual claim in the answer supported by the context?
PASS: Each claim can be found in, or directly inferred from, the context.
FAIL: At least one claim is absent from the context or contradicts it.
UNSURE: The context is too unclear to decide. Add a note.
Edge cases:
- Common-knowledge phrases ("as you know") do not count as claims.
- If the answer says "I don't know" and the context lacks the answer, PASS.
- Numbers must match exactly. "About 10" for a context value of 12 is FAIL.Notice that the edge cases came from reading real outputs. Guidelines are rarely right on the first draft, so plan to revise them.
Running a pilot round
Do not label your whole dataset with the first version of the guidelines. Run a pilot first:
- Pick 20 to 50 examples that include easy cases and hard ones.
- Have at least two annotators label them independently, without discussing.
- Compare labels and list every disagreement.
- For each disagreement, decide whether the guideline was unclear, the example was ambiguous, or one annotator made a mistake.
- Update the guidelines and repeat until agreement is acceptable.
Most disagreement turns out to be a guideline problem. Fixing the wording at this stage is much cheaper than relabeling thousands of examples later.
Measuring agreement
Agreement tells you how repeatable your labels are. The simplest measure is raw percent agreement, the fraction of items on which two annotators gave the same label. It is easy to compute, but it can look good by accident. If 90% of items are PASS, two annotators who label everything PASS will agree 100% of the time without reading anything.
Cohen's kappa corrects for this. It compares observed agreement with the agreement expected by chance, given how often each annotator uses each label:
kappa = (po - pe) / (1 - p_e)
Here po is the observed agreement and pe is the agreement expected by chance. A value of 1 means perfect agreement and 0 means no better than chance.
from collections import Counter
def cohens_kappa(labels_a, labels_b):
if len(labels_a) != len(labels_b) or not labels_a:
raise ValueError("Label lists must be non-empty and equal in length")
n = len(labels_a)
observed = sum(a == b for a, b in zip(labels_a, labels_b)) / n
count_a = Counter(labels_a)
count_b = Counter(labels_b)
expected = sum(
(count_a[label] / n) * (count_b[label] / n)
for label in set(count_a) | set(count_b)
)
if expected == 1:
return 1.0 # both annotators used one identical label throughout
return (observed - expected) / (1 - expected)
a = ["PASS", "PASS", "FAIL", "PASS", "FAIL", "PASS", "PASS", "FAIL"]
b = ["PASS", "PASS", "FAIL", "FAIL", "FAIL", "PASS", "PASS", "PASS"]
print(round(cohens_kappa(a, b), 3)) # 0.467Here the annotators agree on 6 of 8 items, which is 75%. Kappa is only about 0.47 because both use PASS often, so a good share of that agreement is expected by chance.
As a rough guide, values above 0.8 indicate strong agreement, 0.6 to 0.8 is acceptable for many tasks, and values below 0.4 mean the criterion is not being applied consistently. These bands are conventions, not laws. Subjective criteria may reasonably sit lower than factual ones. Cohen's kappa handles two annotators. For three or more, use Fleiss' kappa or Krippendorff's alpha.
Resolving disagreements
Once agreement is acceptable, you still need one label per item. Common approaches:
- Majority vote with three or more annotators. Simple, but it discards the information that people disagreed.
- Adjudication, where a senior reviewer settles each disagreement. This costs more but gives cleaner labels and often exposes guideline gaps.
- Keeping the disagreement. Store the individual labels and mark items without consensus as "contested." You can then report metrics on the agreed subset and examine contested items separately.
Keep the raw labels, annotator IDs, and guideline version alongside the final label. You will want them when a metric looks wrong.
Practical sources of bias and error
Human labels have their own failure modes:
- Fatigue and drift. Quality drops over long sessions, and annotators gradually shift their standards. Use short batches and re-insert a few already-labeled "gold" items to check consistency.
- Order and position effects. In pairwise comparison, people can favor the first or the longer answer. Randomize order and hide which system produced which output.
- Anchoring on fluency. Polished text is often rated as more correct than it is. For factual criteria, require annotators to check claims against the source.
- Missing expertise. A non-expert cannot verify a legal or clinical claim. Match annotators to the domain, or label only what they can check.
- Leakage of expectations. If annotators know which version is the new one, they may rate it more favorably. Blind them where you can.
Putting labels into the harness
Labeled data should feed the same harness you built earlier. A simple way is to store each human label as the expected value and compare automated scorers against it:
def scorer_agreement(human_labels, scorer_labels):
"""Fraction of items where an automated scorer matches the human label."""
pairs = [
(human_labels[i], scorer_labels[i])
for i in human_labels
if i in scorer_labels
]
if not pairs:
return 0.0
return sum(h == s for h, s in pairs) / len(pairs)
human = {"c1": True, "c2": False, "c3": True, "c4": True}
auto = {"c1": True, "c2": True, "c3": True, "c4": True}
print(scorer_agreement(human, auto)) # 0.75This raw agreement is a starting point. The next chapter extends it with per-class error rates and a check for the judge's known biases.
Common mistakes
- Starting to label before the success criteria are written down.
- Using one broad "quality" question instead of several specific ones.
- Skipping the pilot and discovering unclear guidelines after labeling is done.
- Reporting percent agreement without accounting for chance.
- Treating human labels as perfect. They are noisy, and the noise puts a ceiling on how well any automated scorer can appear to agree with them.
- Forgetting to version the guidelines, which makes old and new labels incomparable.
Exercise
Two annotators label 100 answers as PASS or FAIL. They agree on 92 items, but 95% of all labels from both annotators are PASS. Why might Cohen's kappa still be low, and what would you do next?
Show answer
With 95% of labels at PASS, the agreement expected by chance is already about 90%, so 92% observed agreement is only slightly better than chance and kappa will be low. The few FAIL items are where the criterion is actually tested, and the annotators disagree on several of them. Next, report both raw agreement and the label distribution, then review the disagreements, which are mostly borderline FAIL cases. Revise the guideline wording and examples for those cases, and consider oversampling likely failures in the pilot set so the guideline is tested on more than easy PASS items.
Exercise
You want to compare two prompt versions on helpfulness using human raters. Name two design choices that reduce bias and explain why each helps.
Show answer
Randomize the order in which the two outputs appear and hide which version produced each. This removes position bias and the effect of raters favoring the version they expect to be better. Also split "helpfulness" into specific yes/no questions with defined labels and examples, which reduces the variation caused by each rater applying a different personal standard.