AI
Data Labeling: What It Is and How AI Training Data Is Made
Data labeling explained: what it is, label types, how AI training data is made, how to measure label quality with agreement scores, and common mistakes.
Data labeling is the process of attaching meaningful tags to raw data (images, text, audio, video or records) so that a machine learning model can learn from it and be tested against it. A photo gets the label "cat", an email gets "spam", a sentence gets its list of names and places. These labels are the "answers" a supervised model studies, and the quality of the model rarely rises above the quality of the labels. The same activity is often called data annotation, and in practice the two terms are used interchangeably.
This guide covers what is data labeling in plain terms, the main label types, how data labeling for AI projects is organised from guidelines to quality checks, a data labeling example you can follow with real numbers, how labelling large language models differs, how to measure label quality with an agreement score, what drives cost and time, and the mistakes that quietly ruin training data.
What Is Data Labeling?
What is data labeling? It's the human (or human-checked) step that turns raw data into training data: examples paired with the correct output. If you want a model that sorts support tickets into "billing", "bug" and "feature request", someone first has to read a few thousand tickets and mark each one. Those marked tickets are the labelled dataset. The model learns the pattern from most of them and is then evaluated on a held-out part whose labels it never saw.
Labels are sometimes called ground truth, which is slightly misleading: they're a human judgement, and humans disagree. A "good" review for one person is "neutral" for another. A big part of data labeling is therefore not clicking but deciding what each label means, writing it down and checking that different people apply it the same way.
| Raw data | Label | What a model learns |
|---|---|---|
| A photo of a street | Boxes around cars and pedestrians | Object detection |
| An email | "spam" or "not spam" | Text classification |
| A sentence | Spans marked as person, company, place | Named entity recognition |
| A recording | The words that were said | Speech recognition |
| Two chatbot answers | Which one is better | A preference or reward model |
| A medical scan | Outline of a tumour | Segmentation |
Not every machine learning approach needs labels. Methods that learn without them, such as clustering, sit on the other side of the line explained in supervised vs unsupervised learning. But most practical systems, from spam filters to self-driving perception, rely on labelled examples somewhere in the pipeline.
Types of Data Labeling by Data Type
The label you attach depends on the data and on what the model must do.
| Data | Common label types | Example |
|---|---|---|
| Images | Classification (one tag per image), bounding boxes, polygons and segmentation masks, keypoints (joints or landmarks) | Marking every pedestrian with a box |
| Video | The image types plus tracking an object across frames | Following one car through a clip |
| Text | Classification (topic, intent, sentiment), entity spans, relations between entities, summaries | Tagging "Paris" as a place |
| Audio | Transcription, speaker labels, timestamps, sound events | Writing out a voice message |
| Tabular and numeric | A target value, a category, a score | Marking each transaction as fraud or not |
| Rankings and preferences | Which of two outputs is better, or a rating scale | Choosing the better chatbot answer |
Richer labels cost more. One category per image is quick; a pixel-accurate outline of every object can take many times longer per item, so choose the least detailed label that still supports the model's job.
How Data Labeling for AI Works, Step by Step
A labeling project is a small production line. The steps that matter:
- Define the task and the label set. What decision must the model make, and what are the allowed answers? Keep the taxonomy as small as the business needs. Fifteen overlapping categories mean fifteen arguments.
- Write guidelines with examples. For each label, say what it includes and excludes, show clear examples, and show borderline cases with the decision. Most disagreement between labelers comes from vague guidelines, not careless people.
- Run a pilot. Have two or three people label the same 100 to 200 items, measure how often they agree and how long each item takes, then fix the guidelines.
- Label at scale. Use trained annotators, domain experts where judgement needs expertise (medicine, law, code), or a managed service.
- Check quality continuously. Mix in items with known answers, have a second person review a sample, and track agreement over time.
- Resolve disagreements. Use a tie-break rule: a senior reviewer, majority vote or a written policy update.
- Version the data. Record the guideline version and who labeled what, so you can explain and reproduce results later.
- Iterate with the model. Look at where the trained model fails, label more of those cases and update the guidelines.
Our guide to how to train an AI model shows where labelled data fits in the whole training process.
Data Labeling Methods Compared
Pure manual labeling is the gold standard and the slowest. Most teams mix several methods.
| Method | How it works | Strength | Weakness |
|---|---|---|---|
| Manual | People label each item | Highest quality when guidelines are good | Slow and costly at scale |
| Model-assisted | A model pre-labels, a person corrects | Much faster for easy cases | People can accept wrong suggestions without noticing |
| Active learning | The model picks the examples it is least sure about for people to label | Labels where they teach the most | Needs a first working model |
| Programmatic (weak supervision) | Rules and heuristics write noisy labels automatically | Labels millions of items cheaply | Noise must be modelled and checked |
| Synthetic data | A model generates examples with labels built in | No human work for the generated part | Can copy the generator's blind spots |
| Crowd or vendor | Outside annotators work to your guidelines | Elastic capacity | Needs strict quality control |
Automatic labels need validation too. A rule-based or model-based labeler makes consistent, systematic mistakes, which can be worse for training than random human errors because the model learns them confidently. For the synthetic route, see our guide to synthetic data.
Data Labeling Example: Sorting Support Tickets
Here's a small data labeling example with numbers. A team wants a model that flags support tickets that report a bug. They write a one-page guideline ("a ticket is a bug if it describes the product behaving differently from how it is documented; questions about how to use a feature are not bugs") and ask two annotators, A and B, to label the same 100 tickets.
| B says bug | B says not bug | Total | |
|---|---|---|---|
| A says bug | 40 | 8 | 48 |
| A says not bug | 7 | 45 | 52 |
| Total | 47 | 53 | 100 |
They agree on 40 + 45 = 85 tickets, so the raw agreement is 85%. That sounds fine, but it's inflated by chance: two people guessing at roughly even odds would agree about half the time. The standard correction is Cohen's kappa, which scikit-learn's documentation defines as (observed agreement minus chance agreement) divided by (one minus chance agreement).
- Chance agreement: A says "bug" 48% of the time and B 47%, so they'd both say bug by chance 0.48 × 0.47 = 0.2256 of the time, and both say "not bug" 0.52 × 0.53 = 0.2756 of the time. Total chance agreement: 0.5012.
- Kappa = (0.85 − 0.5012) / (1 − 0.5012) = 0.3488 / 0.4988 ≈ 0.70.
A kappa of 1 means perfect agreement and 0 means no agreement beyond chance. About 0.70 means reasonable but not great agreement, and the 15 disagreements are the most valuable thing in the pilot: the team reads them, finds that "the export button is greyed out" splits opinions (bug or feature gap?), adds that case to the guideline and re-runs a pilot. That loop, not the raw label count, is what produces good training data.
Why Label Quality Matters
Bad labels hurt twice: they teach the model wrong answers, and they make evaluation unreliable. A 2021 study by Northcutt, Athalye and Mueller examined the test sets of 10 of the most widely used machine learning datasets and estimated an average of at least 3.3% label errors, with at least 6% in the ImageNet validation set. They also showed that fixing the labels could change which model looks best: on some benchmarks a smaller model (ResNet-18) overtakes a larger one (ResNet-50) once the share of mislabelled test examples rises by just 6%.
Practical ways to protect quality:
- Measure agreement (raw agreement and kappa) on every pilot and on a regular sample.
- Seed gold items: mix in items whose correct label is known and track each annotator's accuracy on them.
- Review disagreements, not just random samples.
- Use confident-learning tools or model errors to find likely mislabelled examples: items a good model strongly "disagrees" with are often label mistakes.
- Keep a label for "unsure" or "cannot tell", so ambiguous items don't force a random choice.
Data Labeling for LLMs and Generative AI
Large language models still depend on human labeling, though in a different form. Pretraining uses raw text with no labels, but turning a base model into a useful assistant uses human-produced data.
In OpenAI's InstructGPT work, labelers wrote demonstrations of the desired behaviour (used for supervised fine-tuning) and ranked model outputs by preference (used for reinforcement learning from human feedback). The results made the point about data quality: human evaluators preferred outputs from the 1.3 billion parameter InstructGPT model over those of the 175 billion parameter GPT-3, despite it having 100 times fewer parameters. Better labeled data beat a model more than 100 times larger. Our guide to RLHF explains how those preference labels are turned into a reward signal.
For generative AI, labeling tasks now include writing ideal answers, rating helpfulness and safety, ranking two responses, red-teaming (trying to make a model misbehave and recording what happened), and checking factual claims. These tasks need judgement and sometimes domain knowledge, so the annotators are often experts, and agreement is harder to reach than on "is there a cat in the photo".
What Drives Data Labeling Cost and Time
Prices vary too much by task and vendor to quote reliably, but the cost drivers are consistent:
| Driver | Why it matters |
|---|---|
| Label complexity | A category tag takes seconds; a pixel mask or a long text judgement takes far longer |
| Expertise needed | Medical, legal or code review needs qualified people |
| Quality targets | Double-labeling and review multiply the effort per item |
| Ambiguity | Unclear guidelines cause rework |
| Volume and variety | Rare cases need dedicated effort |
| Tooling | Good tools with model assistance save time; poor ones waste it |
Always run a pilot before quoting a budget: the measured time per item and the agreement score give you a far better estimate than a guess. Many teams find that a smaller, cleaner dataset beats a larger noisy one, so start small and grow.
Data Annotation Tools and Jobs
Tools. Look for support for your data types, easy guideline display, review and agreement features, model-assisted pre-labeling, role management and export in the formats your training code needs. Open-source options such as Label Studio and CVAT are common starting points, and commercial platforms add managed workforces.
Jobs. Data labeling work includes annotators, specialists and analysts who label to a guideline, reviewers who check quality and domain experts who handle specialised tasks. Much of it is contract or crowd work, and the tasks for generative AI increasingly ask for subject expertise. Treat claims about pay and job counts with caution, since they vary widely by employer and country.
Common Data Labeling Mistakes
- Starting without guidelines. "Label the sentiment" means something different to every person.
- Too many labels. Fine distinctions that even experts can't agree on teach the model noise.
- Skipping the pilot. You discover guideline problems after labelling 50,000 items instead of 100.
- One annotator per item with no checks. You have no way to know the error rate.
- Trusting model pre-labels blindly. Reviewers get used to clicking accept.
- Labelling the test set differently from the training set. Evaluation then measures the wrong thing.
- Ignoring disagreements. They are the best signal about unclear definitions.
- Never updating labels. Definitions and data drift, and old labels go stale.
FAQ
What is data labeling?
Data labeling is attaching tags or answers to raw data such as images, text and audio so a machine learning model can learn from it and be evaluated. It's the step that produces supervised training data.
What is the difference between data labeling and data annotation?
None in practice. Both mean adding labels or markup to data for machine learning. Some teams use "annotation" for richer markup such as boxes and masks and "labeling" for simple category tags.
Why is data labeling important for AI?
A supervised model can only learn what its labels teach it, so label errors become model errors. Good labeling also makes testing trustworthy, and for language models it is how human preferences are turned into training signals.
How is data labeling quality measured?
Common measures are raw agreement between annotators, Cohen's kappa (agreement corrected for chance), accuracy on gold items with known answers, and review of disagreements. In the example above, 85% raw agreement corresponds to a kappa of about 0.70.
Can AI label data itself?
Partly. Models can pre-label data for humans to correct, and rules or models can label automatically at scale. Those labels still need checking, because automatic labelers make systematic mistakes that a model can learn.