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.
| Stage | Purpose | Output |
|---|---|---|
| Task definition | Fix the label schema and its meaning | Guideline with examples and edge cases |
| Sampling | Choose which raw items to label | Representative or targeted batch |
| Annotation | Assign labels in a tool | Raw labels per annotator |
| Quality control | Detect errors and disagreement | Agreement scores and flagged items |
| Adjudication | Resolve conflicts with an expert | Single consensus label per item |
| Versioning and export | Freeze the dataset for training | Dataset version linked to guideline |
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 type | Data | Relative effort | Typical use |
|---|---|---|---|
| Classification | Image, text, audio | Low | Spam filters, content moderation |
| Bounding boxes | Image, video | Medium | Object detection, retail shelves |
| Semantic segmentation | Image | Very high | Autonomous driving, medical imaging |
| Named entity spans | Text | Medium | Information extraction, search |
| Transcription | Audio | High | Speech recognition |
| Preference ranking | Pairs of model outputs | Medium to high | Reward models, RLHF, DPO |
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.
| Metric | What it measures | Interpretation |
|---|---|---|
| Cohen’s kappa | Agreement of two annotators beyond chance | Above about 0.8 is usually strong |
| Fleiss’ kappa | Chance-corrected agreement of many annotators | Same scale, sensitive to class balance |
| Krippendorff’s alpha | Agreement for any scale and missing data | Above about 0.8 is considered reliable |
| Gold-set accuracy | Match with expert answers on hidden items | Tracks individual annotator accuracy |
| Intersection over union | Overlap of boxes or masks | Common review threshold near 0.5 to 0.7 |
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.
| Approach | How it works | Best when |
|---|---|---|
| Active learning | Model selects its most uncertain items for humans | Unlabeled data is plentiful, budget is small |
| Model-assisted pre-labeling | A model proposes labels that people correct | A reasonable baseline model exists |
| Weak supervision | Heuristic rules generate noisy labels at scale | Domain rules are known but imperfect |
| LLM-as-annotator | A language model labels with human spot checks | Tasks are well defined and low risk |
| Data augmentation | Transforms existing labeled items into new ones | Labels survive the transformation |
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.