Data labeling

Also known as: data annotation

On this page 7

Data labeling, also called data annotation, is the process of attaching ground-truth targets to raw examples, such as a class name to an image, a bounding box to an object or a quality rating to a model answer, so that a model can learn the mapping from input to output. In artificial intelligence, labeled data is the raw material of supervised training and of most evaluation, because a model can only be measured against answers that someone has defined.

Labels determine what a model learns and what it treats as correct. A large model trained on inconsistent or biased labels reproduces those flaws faithfully, which is why practitioners often say that label quality matters more than model architecture for many applied tasks. Modern labeling covers classic computer vision and text tasks as well as preference data for aligning language models.

How a data labeling workflow operates

A labeling workflow turns an unlabeled pool into a versioned, quality-checked dataset through a repeatable sequence of steps. It starts with a labeling guideline, a written specification that defines every class, edge case and tie-breaking rule, because annotators who interpret a task differently produce noise rather than signal.

Annotators then label batches in a dedicated tool, a share of items is labeled by several people independently, and disagreements go to an expert reviewer. The final labels are exported with the guideline version, so that a later change in definitions does not silently mix incompatible data. The table below shows the main stages and their outputs.

StagePurposeOutput
Task definitionFix the label schema and its meaningGuideline with examples and edge cases
SamplingChoose which raw items to labelRepresentative or targeted batch
AnnotationAssign labels in a toolRaw labels per annotator
Quality controlDetect errors and disagreementAgreement scores and flagged items
AdjudicationResolve conflicts with an expertSingle consensus label per item
Versioning and exportFreeze the dataset for trainingDataset version linked to guideline
Stages of a labeling workflow

Types of labels and annotation tasks

The type of label follows from the prediction the model must make, and each type carries a different cost per item. A single image class takes seconds, while pixel-level segmentation of a street scene can take an hour or more.

The following table compares common annotation types by data, effort and typical use.

Annotation typeDataRelative effortTypical use
ClassificationImage, text, audioLowSpam filters, content moderation
Bounding boxesImage, videoMediumObject detection, retail shelves
Semantic segmentationImageVery highAutonomous driving, medical imaging
Named entity spansTextMediumInformation extraction, search
TranscriptionAudioHighSpeech recognition
Preference rankingPairs of model outputsMedium to highReward models, RLHF, DPO
Common annotation types

For language models, labeling increasingly means writing demonstration answers for supervised fine-tuning and comparing two responses to say which is better. These tasks demand domain experts, such as physicians or lawyers, rather than general crowd workers, which raises cost per item considerably.

Measuring label quality

Label quality is measured by how consistently and how correctly items are labeled, and the two are not the same. High agreement among annotators who all misread the guideline still yields wrong labels, so teams combine agreement statistics with expert-verified gold items.

The table below lists widely used quality metrics and how to read them.

MetricWhat it measuresInterpretation
Cohen’s kappaAgreement of two annotators beyond chanceAbove about 0.8 is usually strong
Fleiss’ kappaChance-corrected agreement of many annotatorsSame scale, sensitive to class balance
Krippendorff’s alphaAgreement for any scale and missing dataAbove about 0.8 is considered reliable
Gold-set accuracyMatch with expert answers on hidden itemsTracks individual annotator accuracy
Intersection over unionOverlap of boxes or masksCommon review threshold near 0.5 to 0.7
Label quality metrics

Thresholds depend on the task: subjective judgments, such as toxicity or helpfulness, rarely reach the agreement of objective tasks, and forcing them to do so can hide genuine ambiguity. In such cases it is often better to keep the label distribution rather than collapse disagreement into one answer.

Reducing labeling cost

Labeling is frequently the most expensive part of a supervised project, so teams use methods that cut the number of human judgments without lowering quality. The choice depends on budget, available models and how much error the task tolerates.

The decision table below summarizes the main approaches.

ApproachHow it worksBest when
Active learningModel selects its most uncertain items for humansUnlabeled data is plentiful, budget is small
Model-assisted pre-labelingA model proposes labels that people correctA reasonable baseline model exists
Weak supervisionHeuristic rules generate noisy labels at scaleDomain rules are known but imperfect
LLM-as-annotatorA language model labels with human spot checksTasks are well defined and low risk
Data augmentationTransforms existing labeled items into new onesLabels survive the transformation
Approaches to cheaper labeling

Each shortcut introduces its own bias. Pre-labels anchor annotators toward the model’s answer, and labels produced by a language model inherit its blind spots, so a human-verified evaluation set must remain independent of any automated labeling.

Common pitfalls in data labeling

Most labeling failures come from process gaps, not careless annotators. The recurring problems are well known to practitioners:

  • Vague guidelines that leave edge cases to individual judgment, producing inconsistent classes.
  • Label leakage, where hints about the answer appear in the input or metadata, so the model learns a shortcut.
  • Sampling bias, where labeled data underrepresents rare classes, regions or user groups.
  • Schema drift, where definitions change mid-project and old and new labels are mixed without versioning.
  • Overlooked annotator welfare, since moderation tasks can expose workers to harmful content and require safeguards.

Privacy also applies: labeling personal data counts as processing under data protection law, so access controls, contracts with vendors and data minimization belong in the workflow from the start.

A plain-language summary

Data labeling means giving examples their correct answers so a computer can learn from them. A person looks at a photo and writes cat. Another person marks every car in a street picture. The computer studies thousands of these examples and learns the pattern.

It works like a teacher preparing an answer key for a practice test. If the answer key contains mistakes, the student learns the mistakes too. That is why careful, consistent labels matter so much. The model can never be better than the answers it was shown.

An example from practice

A hospital imaging team wants a model that flags possible fractures on wrist X-rays. Radiologists first write a guideline that defines what counts as a fracture, how to treat old healed breaks and when to mark an image as uncertain. Two radiologists then label each of 12,000 images independently, and a senior specialist resolves the roughly 8 percent of cases where they disagree.

After a first model is trained, the team uses active learning to send only the 1,500 most uncertain new images to radiologists instead of labeling everything. Agreement on the gold set stays above a kappa of 0.85. The outcome is a reliable training dataset at a fraction of the expected cost, with a separate expert-labeled test set that keeps the evaluation honest.