Sub topic 5
Running a pilot round
This chapter assumes you have a written task definition, a label schema, and a first draft of the guidelines from the earlier chapters. It also assumes you can read basic Python (lists, dictionaries, files). It does not assume you can compute kappa yet. The agreement measures come in later chapters.
What a pilot round is for
A pilot round is a small, fully independent annotation run that you do before the real project. Two or more annotators label the same items using the draft guidelines. You then look at where they diverge.
The pilot tests your setup, not your annotators. Disagreement at this stage usually points to a problem in the schema, the guidelines, or the tool. A pilot answers these questions:
- Can people apply the labels without asking you what you meant?
- Which labels are confused with each other?
- Does the tool, file format, or instruction page cause mistakes?
- How long does one item take, so you can estimate the cost of the full run?
- Is the task feasible at all, or is it too subjective for the schema you chose?
Finding these problems on 60 items costs an afternoon. Finding them after 6,000 items costs a re-annotation.
The shape of a pilot
Choosing the pilot items
Size
Aim for roughly 50 to 100 items for a first pilot. Fewer than about 30 gives agreement scores so noisy that a single item moves the number noticeably. More than 150 wastes effort if the guidelines are still rough. The right size also depends on your label set: a task with ten labels needs more items than one with two.
Representativeness and coverage
A random sample from your data is the honest baseline, because it shows the label distribution you will face. It has a weakness: rare labels may not appear at all, so you learn nothing about them. Two common remedies:
- Stratify by a cheap signal such as source, length, or topic, so each part of the data is represented.
- Add a small number of deliberately chosen hard cases, such as sarcasm, negation, or ambiguous entity boundaries. Report that these were added, because they lower agreement compared with a random sample.
If you mix random and hand-picked items, tag each item with how it was chosen. You can then compute agreement separately for each group later.
Reproducibility
Fix the random seed and store the item IDs. You will want to re-draw the identical sample if a file is lost, and others will want to know exactly what the pilot contained.
Assigning the same items to everyone
For a pilot, every annotator labels every item. This is a full-overlap design, and it gives the cleanest agreement estimate. Sparse designs, where each item gets only some annotators, come into play later for large projects.
Two details prevent subtle bias:
- Give each annotator the items in a different random order, so fatigue and learning effects do not line up on the same items.
- Hide other annotators' labels and any model predictions. Seeing a pre-filled label anchors people toward it and inflates agreement.
The script below draws a stratified sample, writes one file per annotator in a different order, and checks the returned files.
import csv
import random
from collections import defaultdict
from pathlib import Path
SCHEMA = {"pos", "neg", "neu", "unsure"}
def draw_pilot(items, n, seed=13):
"""Stratified sample: an equal share from each source."""
rng = random.Random(seed)
by_source = defaultdict(list)
for item in items:
by_source[item["source"]].append(item)
per_source = max(1, n // len(by_source))
sample = []
for source in sorted(by_source):
pool = by_source[source]
sample.extend(rng.sample(pool, min(per_source, len(pool))))
return sample
def write_batches(sample, annotators, out_dir, seed=13):
"""One CSV per annotator, same items, different order, empty label column."""
out_dir = Path(out_dir)
out_dir.mkdir(parents=True, exist_ok=True)
for name in annotators:
order = list(sample)
random.Random(f"{seed}-{name}").shuffle(order)
with open(out_dir / f"{name}.csv", "w", newline="", encoding="utf-8") as f:
writer = csv.writer(f)
writer.writerow(["id", "text", "label"])
for item in order:
writer.writerow([item["id"], item["text"], ""])
def check_returned(path, expected_ids):
"""Return a list of problems found in one returned annotation file."""
problems = []
seen = set()
with open(path, newline="", encoding="utf-8") as f:
for row in csv.DictReader(f):
item_id, label = row["id"], row["label"].strip()
if item_id in seen:
problems.append(f"duplicate id {item_id}")
seen.add(item_id)
if label == "":
problems.append(f"missing label for {item_id}")
elif label not in SCHEMA:
problems.append(f"unknown label {label!r} for {item_id}")
for item_id in sorted(set(expected_ids) - seen):
problems.append(f"item {item_id} absent from file")
return problems
if __name__ == "__main__":
sources = ["app", "web", "forum"] * 20
items = [
{"id": f"t{i:03d}", "text": f"Example review {i}", "source": s}
for i, s in enumerate(sources)
]
sample = draw_pilot(items, 12)
write_batches(sample, ["ann1", "ann2"], "pilot_batches")
expected = [item["id"] for item in sample]
# Simulate an annotator returning a file with two mistakes.
path = Path("pilot_batches/ann1.csv")
with open(path, newline="", encoding="utf-8") as f:
rows = list(csv.DictReader(f))
for row in rows:
row["label"] = "pos"
rows[0]["label"] = ""
rows[1]["label"] = "positive"
with open(path, "w", newline="", encoding="utf-8") as f:
writer = csv.DictWriter(f, fieldnames=["id", "text", "label"])
writer.writeheader()
writer.writerows(rows)
print(check_returned(path, expected))The check prints one missing-label problem and one unknown-label problem. Run a validator like this on every returned file before you compute any score. A blank cell silently dropped by a library can shift your numbers without any error.
Running the round
Brief the annotators once, then step back
Give annotators the guidelines and a short walkthrough of the tool. Do not coach them on individual items. If you explain how to handle a case verbally to one person, the guidelines no longer describe what the labels mean, and the pilot measures your explanations instead.
Keep annotation independent
Annotators should not talk about items during the pilot. Give them a separate channel to write questions. Log each question, because a question is direct evidence of a gap in the guidelines. Answer them after the round, in the revised guidelines, rather than mid-round.
Collect more than labels
Ask for these extras, because they make disagreement analysis much easier:
- An
unsureflag or a confidence rating per item. - A free-text note field for items where the annotator hesitated.
- Time spent, or at least start and end times for each session.
Reading the first results
Do the following in this order.
- Validate the files, as in the script above.
- Compute raw percent agreement and the label counts for each annotator. Large differences in how often each annotator uses a label point to a systematic habit, such as one person rarely choosing
neu. - Compute a chance-corrected score. The next chapters explain why percent agreement alone is not enough and how Cohen's kappa works.
- Build a confusion matrix between annotator pairs and read the actual disagreeing items.
- Read the notes and questions the annotators logged.
Do not treat a single pilot score as a verdict. With 60 items, an agreement estimate carries wide uncertainty, so a kappa of 0.6 could plausibly reflect a true value anywhere in a broad range. Use the pilot to find specific, fixable problems. Use the score only to judge whether you are in a plausible range or are clearly failing.
Common mistakes
| Mistake | Effect | Fix |
|---|---|---|
| Sample too small or all easy items | Agreement looks high, hiding problems | Stratify and add known hard cases, and label them as such |
| Annotators see each other's work or model suggestions | Agreement is inflated | Separate files, no pre-filled labels |
| Fixing guidelines mid-round | Labels mix two definitions | Collect questions, revise after the round |
| Skipping file validation | Missing labels distort scores | Run a validator before any measurement |
| Pilot done by the guideline author alone | Misses what is unclear to newcomers | Use annotators who did not write the guidelines |
| Treating one low score as final | Wrong conclusion from a noisy estimate | Inspect disagreements, then run a second pilot |
When to stop piloting
Repeat the loop until the remaining disagreements look like real ambiguity in the data instead of unclear instructions. Concretely, you can stop when:
- Newly revised guidelines produce no new recurring confusion between the same pair of labels.
- Annotators' questions are about rare edge cases, not about the core definitions.
- Agreement is stable between consecutive pilots on fresh items.
A second pilot should use new items. Reusing the old ones tests whether annotators remember the discussion, not whether the guidelines work.
Exercise
You are piloting a three-label sentiment task. Annotator B's labels were pre-filled with the output of a sentiment model so that B could work faster, and only corrected where B disagreed. Annotator A labeled from scratch. Name the problem this creates for the pilot, and describe how you would fix the design.
Show answer
Pre-filling anchors B toward the model's labels, so B's labels are not independent of the model and may differ from what B would choose unaided. Agreement between A and B then partly reflects A's agreement with the model, and the pilot cannot tell you whether humans can apply the guidelines consistently. Fix it by giving both annotators the same unlabeled items, in different random orders, with no model suggestions shown. If you later want to study model-assisted annotation, run that as a separate comparison.