Human evaluation done right
Human judgement is the gold standard only when it is done carefully: clear rubrics, more than one rater, a check on agreement, and blind comparisons.
In 60 seconds
Human evaluation done right
Human judgement is the gold standard only when it is done carefully: clear rubrics, more than one rater, a check on agreement, and blind comparisons.
Four habits of good human evaluation
- 1
Clear rubric
Specific questions with examples of each level, the same rubric for every rater. - 2
Right raters
People who know the domain and the language; train them on examples first. - 3
More than one rater
At least on a sample, so you can measure agreement. - 4
Blind comparisons
Raters do not know which model or version produced which answer, and the order is shuffled.
Measuring agreement: Cohen's kappa
from collections import Counter
def cohens_kappa(a, b):
"""Cohen's kappa for two raters who labelled the same items."""
if len(a) != len(b) or not a:
raise ValueError("need two non-empty lists of the same length")
n = len(a)
observed = sum(x == y for x, y in zip(a, b)) / n
count_a, count_b = Counter(a), Counter(b)
labels = set(count_a) | set(count_b)
chance = sum(count_a[k] * count_b[k] for k in labels) / (n * n)
if chance == 1:
return float("nan") # both raters used one identical label: kappa is undefined
return (observed - chance) / (1 - chance)
rater_1 = ["good", "good", "good", "good", "good", "good", "bad", "bad", "bad", "bad"]
rater_2 = ["good", "good", "good", "good", "good", "bad", "bad", "bad", "bad", "good"]
print(round(cohens_kappa(rater_1, rater_2), 2)) # 0.58When raters disagree
- One person rates everything, knowing which answer is from the new model
- "Rate overall quality 1 to 5" with no examples
- The team that built the model does all the rating
- Two raters on a sample, answers shuffled and labels hidden
- Specific questions with worked examples for each level
- Domain experts and people who speak the users' languages
Watch and read more
Lab
Two sets of labels on the same items, a kappa value, and an improved rubric.
The problem
- Take 20 answers from your test set work (or any 20 chatbot answers you may use). Remove any sign of which model produced them and shuffle them.
- Write a short rubric with labels good, okay and bad, with one example of each.
- You and a friend label all 20 separately, without talking.
- Run the starter script to get raw agreement and kappa.
- Discuss every disagreement. Update the rubric, then both re-label the disagreed items and compute kappa again.
Practice lab
Edit the code and run it. Python runs in your browser — nothing is sent to our server.
No output. Add print(...) to see values.
You are done when
Hard questions
Try to answer before you reveal. If you can answer these, you understood the lesson.
Q1Why can kappa be low even when raw agreement is high?Reveal
Kappa subtracts the agreement expected by chance. If both raters say "good" for most items, chance agreement is already high, so the room above chance is small. A few disagreements on the rare "bad" items then pull kappa down a lot. This is a feature: it shows the raters do not agree well on the cases that matter most.
Q2After fixing the rubric, kappa went up. Why should you be careful about computing it only on the items you discussed?Reveal
You and your friend now know each other's views on those exact items, so agreement on them is no longer independent. A fair check uses new items that neither of you has discussed. Keep some fresh items aside for the second round.
Questions people ask
Why hide which model produced which answer?
Because people are influenced by what they expect. If raters know an answer came from the new, expensive model, they may rate it more kindly. Blind, shuffled comparisons remove that influence.
Is human evaluation always better than an LLM judge?
Careful human evaluation by the right experts is usually the reference point. But untrained, rushed or non-expert raters can be worse than a well-calibrated judge. The quality comes from the process, not just from being human.
What if my labels have more than two categories, like good, okay, bad?
Cohen's kappa works with any number of categories, and the function above handles them. For ordered scales where "good vs okay" is a smaller disagreement than "good vs bad", a weighted kappa gives partial credit for near misses.
How many items should two raters both label?
Enough to see the pattern of disagreements, and enough that a single item does not swing the result a lot. Start with a sample, compute kappa, read the disagreements, and add more double-rated items if the result is unclear.
Lesson test
5 questions. Get 3 right (60%) to pass and complete this lesson.