Writing Effective Annotation Guidelines
How to write an annotation codebook that produces consistent labels, clear definitions, worked examples, edge-case rules, and a pilot-and-revise loop.
Annotation guidelines (a "codebook") are the rulebook annotators follow. What drives label quality is whether the guidelines make two careful people choose the same label, not how detailed they are. A short, sharp codebook with good examples beats a long vague one.
This connects to content analysis in the social sciences, where codebook design has been studied for decades, and it is what ultimately determines your inter-rater reliability.
What a good codebook contains
- A one-sentence definition per label, plus a line on what the label is not. Negative definitions prevent the most common disagreements.
- Worked examples, including borderline ones. Real items from your data beat invented ones.
- Tie-breaker rules. When two labels could apply, say which wins.
- A "when in doubt" default and an escape hatch (a "can't tell" option) so annotators don't guess silently.
Put the rules where annotators see them
Potato can show instructions and per-label tooltips right next to the controls, so the guideline lives at the point of decision rather than in a separate document:
annotation_schemes:
- annotation_type: radio
name: toxicity
description: "Is this comment toxic? Toxic = rude, disrespectful, or likely to make someone leave a conversation."
labels: [Toxic, Not toxic, Can't tell]The "Can't tell" option matters: it separates genuine ambiguity from forced guesses, which keeps your agreement metrics honest.
A guideline template
A guideline document holds what annotators need beyond the label names and the one-line question in a config. Download the template, a Markdown file with a short prompt under every heading, and fill in each section for your task. The template has eight sections:
- Purpose and scope. State what the labels will train or measure, which data is in scope, and which data is out of scope.
- Definitions. Define each term the labels depend on once for the whole task. Two examples are "target" and "personal attack".
- Per-label rules. Give each label a short definition, inclusion rules, exclusion rules, examples, and counter-examples.
- Boundary cases. List items near the line between two labels, each with the label the team chose and the reason.
- Decision order. Say which label to check first when more than one label seems to apply.
- Unsure policy. Name the label or action for an item the guidelines do not settle.
- Calibration examples. Collect items with a fixed correct label and an explanation, for practice before the real task.
- Changelog. Give each version a number and a date, and record every change with the reason and the labels the change affects.
Per-label rules leave open which label wins when two labels apply to one item, and a decision order names the winner. Two annotators who both see that "Toxic" and "Off-topic" apply to one comment choose the same label when the guidelines say to check "Toxic" first. Write the order as a numbered list in the document, and repeat the list in the banner above every item.
The per-label section of the template uses the headings of Potato's codebook page, such as "Use when" and "Avoid when". A scheme marked codebook: true can take each label's entry when you paste the label's section into /codebook. Developing a Codebook for Qualitative Research walks through the paste, and Writing a Codebook an LLM Can Follow covers rewriting the same entries for a model annotator.
Where each part of the guidelines lives in Potato
A Potato config holds the label names and each scheme's question, and the rest of a guideline document goes on other surfaces. Annotators meet each surface at a different moment, from once before the first item to every item. The table maps each part of the template to a surface, names the config key, and says what the Study Designer fills in:
| Template part | Where annotators see the part | Config key | Study Designer |
|---|---|---|---|
| Purpose and scope | An instructions page before the first item | phases, with an entry of type: instructions and an HTML file | No form. An imported phases block is kept. |
| Definitions | The instructions page, and the full document behind the Codebook button | annotation_codebook_url | No form. An imported key is kept. |
| Short definition of each label | The scheme's question and the label's hover text | description, labels[].tooltip | Fills description. Writes label names only, and drops tooltips from an imported config. |
| Inclusion and exclusion rules, examples | The label's hover text for a one-line rule, the /codebook page for a codebook-backed scheme, or the full document | labels[].tooltip, codebook: true | No form |
| Boundary cases | The full document, and settled cases as gold items checked during the task | annotation_codebook_url, gold_standards | Fills gold_standards and writes an example items file |
| Decision order | A banner above every item, open by default | annotation_instructions | No form. An imported key is kept. |
| Unsure policy | A label of its own, and the banner | a "Can't tell" label, annotation_instructions | Fills the label |
| Calibration examples | A training phase that shows an explanation after a wrong answer | training, and a phases entry of type: training | No form. Imported blocks are kept. |
| Changelog | The full document, and for a codebook-backed scheme the codebook revision stamped on each annotation | annotation_codebook_url, codebook: true | No form |
The Study Designer's task description field writes task_description. Potato 2.13.1 uses task_description as the fallback summary of a published dataset card and does not show the field on the annotation page, so put the purpose and scope on the instructions page as well.
The config below puts a toxicity task's guidelines on all of these surfaces. Annotators read the purpose, scope, and definitions once on an instructions page, pass two calibration items, and then see the decision order above every item and each label's rule on hover:
annotation_task_name: Comment toxicity, guidelines v1.2
task_dir: .
output_annotation_dir: annotation_output/
data_files:
- data/comments.jsonl
item_properties:
id_key: id
text_key: text
user_config:
allow_all_users: true
users: []
# The full guideline document, opened from a Codebook button in the navigation bar
annotation_codebook_url: https://example.org/toxicity-guidelines-v1.2
# Read once: purpose, scope, and definitions. Then the calibration items.
phases:
order: [guidelines, calibration, annotation]
guidelines:
type: instructions
file: guidelines/overview.html
calibration:
type: training
file: data/calibration.json
training:
enabled: true
data_file: data/calibration.json
annotation_schemes: [toxicity]
passing_criteria:
min_correct: 2
allow_retry: true
failure_action: repeat_training
# Shown above every item: the decision order and the rule for unsure cases
annotation_instructions: |
<p>Check Toxic first, then Not toxic. Choose Can't tell only when the
comment's target or meaning is unclear without context you don't have.</p>
annotation_schemes:
- annotation_type: radio
name: toxicity
description: Is this comment toxic?
labels:
- name: Toxic
tooltip: "Attacks a person or group, or would likely make someone leave the conversation. Not: blunt criticism of an idea."
- name: Not toxic
tooltip: "Rude or blunt about an idea or action, with no attack on a person."
- name: Can't tell
tooltip: "The target or meaning depends on context the item does not show."Replace the annotation_codebook_url with the address of your own document, such as a wiki page or a shared document. The training block sets the passing bar, and the calibration entry in phases places the training phase between the instructions page and the task. Training Phase gives the format of data/calibration.json. Each calibration item's explanation is the text an annotator sees after a wrong answer, so write the explanation as the guideline rule that gives the item its label. A re-calibration round sends annotators back through the same items in the middle of a study.
Pilot, then revise
Guidelines are never right on the first try. Run a small pilot, look at every item where annotators disagreed, and decide whether the guideline was unclear or the item was genuinely ambiguous. Fix the guideline and re-pilot. Two or three rounds usually stabilizes the label set.
Potato's gold standards and attention checks let you encode the settled cases as checks so future annotators stay calibrated.
Frequently asked questions
Should I retrain annotators or revise the guidelines when agreement is low?
Revise the guidelines when most annotators disagree on the same label boundary, and retrain an annotator who disagrees with the others on items the guidelines already settle. A low coefficient alone does not say which of the two applies, so look at where the disagreements fall. Potato's admin dashboard reports each annotator's training pass rate, and the adjudication page lists the items where annotators split. Record each guideline change in the changelog before the next round.
How do I show annotation guidelines before the annotation phase in Potato?
Add a phases block whose order lists an instructions page before annotation, and point the page's file at an HTML file holding the guidelines. The guidelines phase in the config above is an example. Multi-Phase Workflows covers consent pages, surveys, and the other phase types.
Further reading
- Inter-Annotator Agreement
- Gold Standards and Attention Checks
- Adjudication and Disagreement
- Developing a Codebook for Qualitative Research
- Training Phase
- Multi-Phase Workflows
- Shared Codebook for Qualitative Coding
- Rubric-Based LLM Evaluation, for anchoring the scale points of a rubric
- MedNLI Clinical Natural Language Inference, a design that puts each label's definition in a tooltip