Skip to content
mentoor

Topic 2 of 6 · 5 min read

Labelling guidelines and annotator agreement

Goal: Write a labelling guide for one task and plan an agreement check that flags ambiguous items.

Labels are decisions made by people, and a model can only be as consistent as those decisions; write the rules down and measure whether two people following them give the same answer. If annotators disagree, the model is being trained on noise and your test set measures it.

Check yourself · 1 of 3

Why measure agreement between two annotators before labelling the whole dataset?

Choose one answer

Why it matters

A labelling team given only a category name will each invent their own boundary. One person marks "refund request" for any complaint, another only for explicit asks. The model learns the average of that confusion, and no architecture change fixes it.

How to build the guide

  1. Define each label in one sentence, then add two or three clear examples and two or three near misses that do not belong. Near misses do most of the work.
  2. Write tie-break rules. What if a message is both a complaint and a refund request? Choose a priority order or allow multiple labels, and say which.
  3. Add an escape label such as "unclear" or "other", so annotators are not forced to guess.
  4. Pilot on about 50 items labelled by at least two people independently. Do not discuss them until both are done.
  5. Measure agreement. Raw percent agreement is inflated when one class dominates. Cohen's kappa corrects for agreement expected by chance; sklearn.metrics.cohen_kappa_score computes it for two annotators.
  6. Read the disagreements, not just the score. Most are one of three things: a missing rule, an unclear definition or a truly ambiguous item. Fix the guide and run another pilot.
  7. Decide how disputes are resolved: a third reviewer, majority vote, or keeping the item out of the test set.

Cost

Labelling cost is roughly items times labels per item times time per label times rate. Double labelling doubles it. Spend the second label where it pays: on the pilot, on a sample for ongoing quality checks and on items where a model is unsure.

Before and after

Weak guide: "Label each review as positive, negative or neutral." The pilot shows agreement is low on mixed reviews like "great camera, battery dies in a day".

Fixed guide: labels are defined by the overall recommendation to a buyer, with a rule that mixed reviews follow the final verdict, five examples per label and a "cannot tell" option. The second pilot shows higher agreement.

What goes wrong

  • Trusting percent agreement. 95 percent looks high when 95 percent of items are one class.
  • Changing the guide without relabelling. Old and new labels mean different things.
  • Using an LLM as the only labeller. Its labels carry its own biases and need a human-checked sample.

Examples

Near misses in a guide

A guide for the label billing_issue lists: 'I was charged twice' (yes), 'Why did my price go up?' (yes), and near misses 'How do I download an invoice?' (no, how_to) and 'The app crashed when I paid' (no, bug). Disagreement in the pilot drops once the near misses are added.

Why kappa and not percent

Two annotators label 100 emails as spam or not spam, and 95 are not spam. They agree on 96. Percent agreement is 96, but most of that is both saying 'not spam' by default. Kappa, which discounts chance agreement, comes out much lower and shows the guide still needs work on the spam class.

Key points

  • Define every label with a sentence, examples and near misses, and add a rule for ties.
  • Give annotators an unclear or other option instead of forcing a guess.
  • Pilot with independent double labelling before the full job, and measure agreement with a chance-corrected score such as Cohen's kappa.
  • Read the disagreements: they show missing rules and ambiguous items, not only a score.
  • Spend extra labels where they pay: the pilot, quality samples and uncertain items.

Common mistakes

  • Writing label names without definitions or near-miss examples.
  • Reporting percent agreement on a skewed dataset as proof of quality.
  • Letting annotators talk through the pilot items before they label them independently.
  • Editing the guide mid-project and keeping old labels without noting which version produced them.

Check yourself · 2 of 3

Why is Cohen's kappa often reported instead of raw percent agreement?

Choose one answer

Check yourself · 3 of 3

A pilot shows many disagreements on messages that are both a complaint and a refund request. What is the best fix?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic