Text annotation is the process of attaching structured, machine-readable labels to written language, such as document categories, named entities, sentiment, intent or relations between words, so that the labeled text can serve as training data and evaluation data for natural language processing models. In artificial intelligence, it is also called NLP annotation or text labeling, and it remains the main way human judgment about meaning is converted into supervision signals a model can learn from.
The quality of annotated text sets an upper bound on model quality. A classifier or extraction model rarely becomes more consistent than the annotators who labeled its data, which is why mature projects invest as much in annotation guidelines, annotator training and quality control as in model architecture.
How text annotation turns language into labels
Text annotation works by defining a label schema, applying it to raw text units, and storing the result in a format that training code can read. The schema lists the allowed labels and their definitions; the annotation unit may be a whole document, a sentence, a span of characters or a pair of spans; and the output is usually stored as JSON Lines, CoNLL-style token columns or a tool-specific export.
Span-level work depends on tokenization and character offsets. Annotators mark a span in the interface, the tool records its start and end offsets, and a conversion step maps them to model tokens, often using the BIO or BILOU tagging scheme. Offset errors introduced at this step are a common, silent source of label corruption, so pipelines should validate that every exported span still matches the original text.
The following table shows the main stages of an annotation project and what each stage produces.
| Stage | Main activity | Output |
|---|---|---|
| Schema design | Define labels, boundaries and edge cases | Label set and guidelines |
| Pilot round | Label a small sample with several annotators | Agreement scores and revised rules |
| Production labeling | Annotate the full dataset | Labeled corpus |
| Adjudication | Resolve disagreements between annotators | Gold-standard labels |
| Quality audit | Review samples and measure error rates | Accepted or relabeled batches |
Main types of text annotation tasks
Text annotation tasks differ mainly in the granularity of the unit being labeled and the structure of the label. Document-level tasks are fast and cheap per item, while span and relation tasks demand more expertise, more time and stricter guidelines.
| Task type | Unit labeled | Typical use |
|---|---|---|
| Text classification | Whole document or message | Topic routing, spam detection |
| Sentiment annotation | Sentence or aspect | Review analysis, brand monitoring |
| Named entity recognition | Character or token span | Extracting names, dates, amounts |
| Relation annotation | Pair of spans | Knowledge graph construction |
| Intent and slot labeling | Utterance and its spans | Chatbots and voice assistants |
| Preference ranking | Pairs of model outputs | Fine-tuning language models |
Recent large language model work has added generative annotation tasks, in which annotators write reference answers, rewrite responses or rank alternative outputs. These tasks feed instruction datasets and preference data, and they require far more domain knowledge than selecting a label from a list.
Measuring annotation quality and agreement
Annotation quality is measured by checking how consistently independent annotators label the same items, a property called inter-annotator agreement. Raw percentage agreement overstates consistency because some matches occur by chance, so projects use chance-corrected coefficients instead.
| Metric | Applies to | Practical note |
|---|---|---|
| Cohen’s kappa | Two annotators, categorical labels | Values above 0.8 are usually considered strong |
| Fleiss’ kappa | Fixed number of several annotators | Sensitive to skewed label distributions |
| Krippendorff’s alpha | Any number of annotators, missing data | Supports nominal, ordinal and interval labels |
| Span-level F1 | Entity and span tasks | Compares one annotator against another as a reference |
Agreement thresholds depend on the task. Subjective tasks such as sarcasm or toxicity labeling rarely reach a kappa of 0.7, and that is a property of the task, not necessarily a failure of the annotators. In such cases, teams often keep the full label distribution rather than forcing a single majority label, because the disagreement itself is informative.
Workforce and tooling options
The choice of workforce determines cost, speed and label reliability. Common options are in-house experts, managed vendors, crowdsourced labeling platforms and programmatic or model-assisted approaches, and many production pipelines combine several of them.
| Approach | Strength | Main limitation |
|---|---|---|
| Domain experts | Highest accuracy on specialist text | Expensive and slow to scale |
| Managed vendor teams | Trained, stable workforce | Requires careful onboarding |
| Crowdsourcing | Fast and cheap for simple labels | Noisy without redundancy and checks |
| Programmatic labeling | Labels millions of items quickly | Rules encode systematic bias |
| Model-assisted pre-labeling | Cuts human effort per item | Annotators may accept wrong suggestions |
Annotation platforms such as Label Studio, Labelbox or similar tools provide span selection, review queues and export formats. Active learning can reduce volume by sending only the most uncertain examples to humans, and human-in-the-loop labeling keeps people reviewing model suggestions instead of starting from an empty screen.
Limitations, risks and common mistakes
The most damaging annotation problems are systematic rather than random. Random slips average out over large datasets, but an ambiguous guideline applied the same wrong way thousands of times teaches the model a consistent error that evaluation on similarly labeled data will not reveal.
- Vague guidelines: annotators invent their own rules for edge cases, which lowers agreement and creates label noise.
- Schema drift: labels are redefined mid-project without relabeling earlier batches, so old and new data disagree.
- Anchoring on pre-labels: annotators accept model suggestions too readily, which copies model errors into the dataset.
- Annotator bias: the cultural and linguistic background of the workforce shapes subjective labels and contributes to dataset bias.
- Privacy exposure: raw text often contains personal data, so redaction and access controls must precede labeling.
Teams can detect many of these issues with confident learning methods that flag examples whose labels conflict with model predictions, followed by targeted human review of the flagged items.
In simple terms
Text annotation means people marking up text so a computer can learn from it. A person reads a sentence and adds notes. One note might say that a word is a city. Another might say that a review is angry.
Think of a teacher grading essays with colored pens. Each color stands for one kind of mark. A computer studies thousands of marked essays and learns the patterns. Clear rules for marking matter most, because a model copies the mistakes of its teachers.
A practical example
A hospital network wants a model that extracts medication names, doses and frequencies from discharge notes. The data team removes patient identifiers first, then writes a 20-page guideline that covers edge cases such as combined products and doses written as ranges. Two trained clinical annotators label a pilot set of 300 notes, reach a span-level F1 of 0.86, and revise the guideline where they disagreed.
The production round covers 8,000 notes. A model trained on the first 2,000 notes pre-labels the remaining text, and annotators correct its suggestions, which cuts labeling time by about 40 percent per note. A senior pharmacist adjudicates conflicts and creates a 500-note gold-standard test set. The final extraction model reaches accuracy close to the human agreement level, and the team keeps the guideline under version control for future relabeling.