Resolving Annotator Disagreement Step by Step in Potato
Run Potato's adjudication example, see why each of eight reviews reached the queue, record final labels, and export the decisions for analysis.
Researchers who collect labels from several annotators can follow this tutorial to resolve the annotators' disagreements with the adjudication queue in Potato 2.14.0. Adjudication is the step in which a reviewer reads every annotator's answer on an item and records one final label. The tutorial works through the adjudication example that ships with Potato, a sentiment task on eight short reviews with three simulated annotators whose answers a setup script writes to disk. You will read why each review reached the queue, record final labels for three reviews, and export the decisions. Adjudication and resolving disagreement covers when to adjudicate and when to aggregate labels instead, and the Adjudication reference page lists every option.
Running the adjudication example
The example lives in Potato's repository under examples/advanced/adjudication, with a config, a data file of eight reviews, and a script named setup_demo.py. Clone the repository at the 2.14.0 tag, install the same release, write the three annotators' answers, and start the server:
git clone --branch v2.14.0 --depth 1 https://github.com/davidjurgens/potato.git
pip install potato-annotation==2.14.0
cd potato/examples/advanced/adjudication
python setup_demo.py
potato start config.yaml -p 8000setup_demo.py writes a user_state.json file for each of user_1, user_2, and user_3 under annotation_output/. The sentiment scheme is a radio question with the labels positive, negative, neutral, and mixed. A second scheme, topics, is a multiselect question over food, service, price, ambiance, and recommendation. Open http://localhost:8000, register the username adjudicator with a password of your choice, and go to http://localhost:8000/adjudicate. Running python setup_demo.py --clean later resets the annotators' answers and deletes saved decisions.
The adjudication block of the example's config reads as follows, with the display options left out:
adjudication:
enabled: true
adjudicator_users:
- "adjudicator"
min_annotations: 2
agreement_threshold: 0.75
show_all_items: true
require_confidence: true
error_taxonomy:
- "ambiguous_text"
- "guideline_gap"
- "annotator_error"
- "edge_case"
- "subjective_disagreement"adjudicator_users lists the accounts allowed into the queue by name. min_annotations: 2 keeps an item out of the queue until two annotators have answered the item, and agreement_threshold: 0.75 keeps out items whose agreement is 0.75 or higher. show_all_items: true skips the agreement check, and require_confidence: true adds a confidence picker to every decision.
The queue, flags, files, and command output on this page come from a run of the example at the v2.14.0 tag. The test run sent three decisions and one skip to the adjudication page's own routes, with the request body the page's script builds. Timestamps in the quoted output are replaced with <timestamp>.
Why each of the eight reviews is in the queue
Potato scores each review with pairwise percent agreement, scheme by scheme. With three annotators, each scheme has three pairs of annotators. A scheme on which two annotators match scores 0.33, and a scheme on which all three match scores 1.00. The topics scheme counts a pair as matching only when both annotators ticked the same set of topics, and an annotator who ticked no topic is left out of the topics score. Each review's overall agreement is the mean over the schemes that have a score.
The queue returned the eight reviews in the order below, with the lowest overall agreement first:
| Item | Review, shortened | user_1 | user_2 | user_3 | Sentiment | Topics | Overall |
|---|---|---|---|---|---|---|---|
| item_001 | "amazing food but terrible service" | mixed; food, service | positive; food | negative; service | 0.00 | 0.00 | 0.00 |
| item_004 | "The pasta was decent but overpriced." | negative; food, price | neutral; food | mixed; food, price | 0.00 | 0.33 | 0.17 |
| item_005 | "The staff was rude and the food was cold." | negative; food, service | negative; service | positive; food, service | 0.33 | 0.33 | 0.33 |
| item_006 | "The hotel room was clean" | positive; ambiance | positive; ambiance | negative; price | 0.33 | 0.33 | 0.33 |
| item_007 | "Nothing special but gets the job done." | neutral | neutral | positive; recommendation | 0.33 | no score | 0.33 |
| item_003 | "The movie was okay." | neutral; ambiance | negative | positive; ambiance | 0.00 | 1.00 | 0.50 |
| item_002 | "Highly recommend!" | positive; recommendation | positive; recommendation | neutral; recommendation | 0.33 | 1.00 | 0.67 |
| item_008 | "The customer service team was incredibly helpful" | positive; service | positive; service | negative; service | 0.33 | 1.00 | 0.67 |
Every review scores below the example's agreement_threshold of 0.75, and the highest overall agreement is 0.67, on item_002 and item_008. On the example's data, show_all_items: true changes nothing, because all eight reviews reach the queue on agreement alone. The sidebar shows each score as a badge, from "0% agree" on item_001 to "67% agree" on item_002 and item_008.
Two scores in the table need a second look. On item_003, user_2 ticked no topic, and the topics score of 1.00 compares only user_1 and user_3. The two annotators both ticked ambiance on a review of a movie, and the perfect topics score hides a doubtful label. On item_007, only user_3 ticked a topic. The topics scheme has no score there, and the overall agreement equals the sentiment score of 0.33.
Annotator flags
Opening an item shows each annotator's answers side by side, with a badge on any annotator the server flags. The example's timing and edit data are written to set off the flags. The example sets fast_decision_warning_ms to 2,000, and user_2 spent 700 to 1,500 ms on each of six reviews. The page marks each of the six answers as "fast decision on this item". Potato marks an answer with more than five changes as "many edits on this item". The edit flag appears on user_2 for item_004 (7 changes) and item_008 (8 changes), and on user_3 for item_001 (6 changes) and item_004 (9 changes).
user_3 has the flag "low agreement across all items" on all eight reviews. Potato compares each annotator's sentiment answer with the strict majority label across the queued items and flags an annotator who matched the majority on fewer than 40% of the items. user_3 matched the majority on none of the eight, and the flag's tooltip reads "Agreement rate with consensus: 0%". MACE estimates each annotator's competence and a best-guess label from the same kind of answers without a reviewer. The 2.14.0 adjudication page does not show MACE's predicted label.
Recording decisions on three reviews
Under the annotators' answers, the page builds one decision form per scheme. The sentiment form lists the four labels, with a chip beside each label for every annotator who chose the label, and the topics form does the same with checkboxes. Below the forms are the confidence picker (High, Medium, and Low), the five error categories from the example's error_taxonomy, a notes box, and a checkbox to flag the item for a guideline update. Submit and continue saves the decision and opens the next item, and Skip marks the item skipped.
The test run recorded three decisions and skipped item_007:
- item_001. Sentiment
mixed, topics food and service, confidence High, and the error category "Annotator Error". The review praises the food and complains about a 45-minute wait.user_1gave the same answer, anduser_2anduser_3each caught one half of the review. - item_004. Sentiment
mixed, topics food and price, confidence Medium, and the error categories "Guideline Gap" and "Subjective Disagreement". The decision also includes a guideline flag asking whethermixedcovers a review that is lukewarm about one thing and negative about another. - item_003. Sentiment
mixed, confidence Low, the error category "Ambiguous Text", and no topics decision. A scheme left undecided stays out of the decision, and the doubtful ambiance label never becomes final.
A decision without a confidence is refused. The page blocks the submission and asks for a confidence, and a request sent straight to the server without a confidence returns HTTP 400 with the message below:
{"error": "A confidence value is required for this task (require_confidence)."}After the three decisions and the skip, /adjudicate/api/stats reported 3 items completed, 4 pending, and 1 skipped, out of 8.
What decisions.json stores for each decision
Potato writes every decision to annotation_output/adjudication/decisions.json when the decision is submitted. The test run wrote the entry below for item_004:
{
"instance_id": "item_004",
"adjudicator_id": "adjudicator",
"timestamp": "<timestamp>",
"label_decisions": {
"sentiment": "mixed",
"topics": {"food": true, "price": true}
},
"span_decisions": [],
"source": {"sentiment": "adjudicator", "topics": "adjudicator"},
"confidence": "medium",
"notes": "Decent pasta, high price, and the writer says they are unsure.",
"error_taxonomy": ["guideline_gap", "subjective_disagreement"],
"guideline_update_flag": true,
"guideline_update_notes": "Say whether mixed covers a review that is lukewarm about one thing and negative about another.",
"time_spent_ms": 63000,
"source_origins": {}
}A radio decision stores the chosen label as a string, and a multiselect decision stores the ticked topics as a map to true. The 2.14.0 page records adjudicator as the source of every radio and multiselect decision. The item_001 decision matches the answer of user_1 and still records adjudicator for both schemes.
Exporting decisions with the adjudication format
The adjudication export format writes only the decisions. Run the export from the example's folder:
python -m potato.export -c config.yaml -f adjudication -o exports/The command printed the summary below:
Loading config from: config.yaml
Loaded 8 items, 24 annotations
Exporting to adjudication format...
Export successful!
Files written:
exports/adjudicated.csv
exports/adjudication_log.jsonl
Statistics:
n_decisions: 3
n_resolved_labels: 5
n_items: 3
n_span_decisions: 0
n_schemas: 2exports/adjudicated.csv has one row per item and scheme, with the final value, the value's source, the adjudicator, the confidence, and the time of the decision. The three decisions gave five rows, because item_003 has no topics decision:
instance_id,schema,value,source,adjudicator_id,confidence,timestamp
item_001,sentiment,mixed,adjudicator,adjudicator,high,<timestamp>
item_001,topics,"{""food"": true, ""service"": true}",adjudicator,adjudicator,high,<timestamp>
item_004,sentiment,mixed,adjudicator,adjudicator,medium,<timestamp>
item_004,topics,"{""food"": true, ""price"": true}",adjudicator,adjudicator,medium,<timestamp>
item_003,sentiment,mixed,adjudicator,adjudicator,low,<timestamp>exports/adjudication_log.jsonl holds one line per decision with the notes, error categories, guideline flag, and time spent. The csv, jsonl, and parquet export formats read each annotator's own labels, and an export in any of the three formats after adjudication still holds the disagreements rather than the final labels.
The potato.adjudication_export command is meant to merge the decisions with the items the annotators agreed on, to make one final dataset. In 2.14.0, python -m potato.adjudication_export stops with the error 'str' object has no attribute 'config_file' before reading any data, and the maintainers have been told. Until a release fixes the command, use python -m potato.export -f adjudication, as in the run above. Exporting adjudicated labels describes both commands.
The queue after a server restart
Potato reloads saved decisions when the server starts, and the rebuilt queue leaves out the items decided before the restart. In the test run, a restart left 5 items in the queue, all pending, and the progress counts started again at 0 of 5 completed. Potato put the skipped item_007 back in the queue as pending. The three earlier decisions stayed in decisions.json, and an adjudication export run after the restart still wrote all three.
Limits in Potato 2.14.0
Three behaviors of Potato 2.14.0 matter when you adapt the example to your own study:
- Blinding stops at the screen. With
show_annotator_names: false, the queue and the item view replace usernames with aliases such as "Annotator 1". After a submit or a skip on the last item in the list, the page asks the/adjudicate/api/nextroute for the next item, and the route's response holds the real usernames. Anyone who opens the browser's developer tools can read the usernames in the response. - The confidence picker needs
require_confidence: true. The example sets the option, andtrueis also the default. Withrequire_confidence: false, the page shows no picker and every decision stores an empty confidence. - Similarity search needs
precompute_on_start: true. The example's config contains a commented-outsimilarityblock, and turning the block on needs thesentence-transformerspackage. Withprecompute_on_start: false, the 2.14.0 server embeds no items, and the page finds similar items only in an embedding cache that an earlier run left on disk.
Before you run adjudication on real data, set num_annotators_per_item to 2 or more and remove show_all_items: true. Without show_all_items, the queue holds only the items whose agreement falls below agreement_threshold.
Further reading
- Adjudication, for every option, the queue criteria, and who can open the queue
- Adjudication and resolving disagreement, for when to adjudicate and when to aggregate labels instead
- MACE, for estimating annotator competence and a best-guess label without a reviewer
- Review workflow board, for tracking items through review states on a board whose Adjudication column links to the adjudication page