FastPrepFind the Annotator Who Mislabels Data
Problems/Find the Annotator Who Mislabels Data

Find the Annotator Who Mislabels Data

OpenAI logoOpenAI● MediumFULLTIMEONSITE INTERVIEW

Updated Nov 2026

QuestionConstraints

Problem statement

Source note: In a July 2026 report on an OpenAI virtual onsite, the author says they settled on a brute-force ranking of annotator quality. It was a pandas round about spotting bad annotation data. The report keeps no table layout, cleaning rules, scoring rule or output.

Here the tables, the cleaning steps (trimming, lowercasing, dropping blanks, keeping the latest resubmission), scoring against trusted reference labels, and the ranking order are our own choices. So are the examples.

Our version is about 40% the same as the reported question.

A labeling team tags items with short text labels, and one of the annotators may be getting many of them wrong. Each row of annotations is one label that an annotator submitted for an item. The raw labels are messy: they may have extra spaces at either end, mixed letter case, or no value at all, and an annotator may have submitted more than once for the same item. reference_labels holds a trusted label for some of the items.

Write rank_annotators(annotations, reference_labels) with pandas. It cleans the data, scores every annotator against the trusted labels, and ranks the annotators so that the most likely mislabeler comes first. Apply these steps in order:

  1. Clean each label: remove the spaces at its start and end, then make it lowercase. Drop every row whose label is null or is empty after this cleaning.
  2. If an annotator still has more than one row for the same item, keep only the one with the largest annotation_id, which is their latest answer.
  3. Keep only rows whose item_id appears in reference_labels. A kept label is wrong when it is not equal to that item's reference label.
  4. For each annotator with at least one kept row, report labeled_items (their kept rows), wrong_labels (how many of those are wrong) and error_rate = wrong_labels / labeled_items.

Return the columns annotator, labeled_items, wrong_labels and error_rate. Sort the rows by error_rate from high to low, then by wrong_labels from high to low, then by annotator in alphabetical order. An annotator with no kept rows does not appear, so the result can be empty. An error_rate within 10^-6 of the exact value is accepted.

Table schema

Pandas

Use the same input data with any supported language. Open the Schema tab in the editor to see the generated SQL setup or Pandas DataFrames.

annotations

ColumnTypeNullableDescription
annotation_idPKIntegerNo—
item_idIntegerNo—
annotatorTextNo—
labelTextYes—

reference_labels

ColumnTypeNullableDescription
item_idPKIntegerNo—
labelTextNo—

Expected result

Your query or function must return these columns.

ColumnTypeNullableDescription
annotatorTextNo—
labeled_itemsIntegerNo—
wrong_labelsIntegerNo—
error_rateDecimalNo—

Row order: must match exactly. Numeric tolerance: 0.000001.

Constraints

  • annotations has 1 to 2000 rows, and reference_labels has 1 to 500 rows.
  • annotation_id values are unique positive integers. item_id values are positive integers and are unique within reference_labels.
  • annotator is 1 to 12 characters long and uses only lowercase letters and digits.
  • A raw label is null or at most 20 characters: letters, with spaces allowed only at the start or the end.
  • Every reference label is 1 to 15 lowercase letters.

More OpenAI Onsite Interview questions

  • Sparse Plant Infection SimulationPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Rectangle Point Coverage CountsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Message Event AggregationPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • 15-Minute Chat Session TrackerPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Segmented Durable Key-Value StorePHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Durable Work Queue OperationsPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Versioned Social NetworkPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Budgeted API Inference with Out-of-Order FeedbackONSITE INTERVIEW · Seen Oct 2026
  • Plant Infection Simulation, Part 4: Death CountdownPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Count Friend CirclesPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026

Similar questions at other companies

  • Daily USD Totals with Effective-Dated Exchange RatesMicrosoft · ONSITE INTERVIEWMicrosoft interview questions
  • Most Recent Order for Each CustomerCapgemini · ONSITE INTERVIEWCapgemini interview questions
  • Tenth-Highest Distinct SalaryInfosys · ONSITE INTERVIEWInfosys interview questions
  • Fifth Highest Salary In A DepartmentZS · ONSITE INTERVIEWZS interview questions
  • Order Book Data ValidationJane Street · ONSITE INTERVIEWJane Street interview questions
  • Nth-Highest Distinct Salary Without Ranking FunctionsMastercard · ONSITE INTERVIEWMastercard interview questions
  • Contest Participants with Long Totals and Short QuestionsThe Walt Disney Company · ONSITE INTERVIEWThe Walt Disney Company interview questions
  • First Order per Merchant per DateAmazon · ONSITE INTERVIEW
  • Block Transaction Count TrendsChainalysis · ONSITE INTERVIEWChainalysis interview questions
  • Third-Highest Distinct SalaryExpedia · ONSITE INTERVIEWExpedia interview questions

OpenAI interview experiences

  • OpenAI OA: What It Tests (2026)
All OpenAI interview questionsSee OpenAI hiring insights