> ## Documentation Index
> Fetch the complete documentation index at: https://phidatainc-agui.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Data labeling and classification

> Label and classify text, images, audio, video, and PDFs.

Agents can now:

* Turn text, images, audio, video, and PDFs into structured records.
* Assign labels, label sets, taxonomy paths, and labeled spans.
* Score and rank model outputs for evals and preference data.
* Add a reviewer and an adjudicator when label quality matters.

Each task follows a similar pattern: an agent with an `output_schema`.

Agno is natively multimodal and type-safe, so the full labeling stack can be built in pure python.

## Example

Here's a quick example classifying reviews into `{positive, negative, neutral}` using `gemini-3.5-flash`. The agent outputs a valid `Classification` object.

```python cookbook/data_labeling/_01_text_classification/basic.py theme={null}
from typing import Literal
from agno.agent import Agent
from pydantic import BaseModel, Field


class Classification(BaseModel):
    label: Literal["positive", "negative", "neutral"] = Field(
        ..., description="The assigned sentiment label"
    )


agent = Agent(
    model="google:gemini-3.5-flash",
    instructions="You classify product reviews by sentiment.",
    output_schema=Classification,
)

result = agent.run("Broken on arrival, total waste of money.").content
# Classification(label='negative')
```

Swap the schema and instructions and the same pattern covers data extraction, span labeling, scoring, and preference ranking.

<Tip>
  If you're looking to jump straight into code - the [data labeling cookbook](https://github.com/agno-agi/agno/tree/main/cookbook/data_labeling) contains 40+ runnable recipes across 18 data labeling patterns.
</Tip>

## Data labeling workflows

Pick the page that matches what you need.

| Workload             | Input                    | Output                          | Page                                                              |
| -------------------- | ------------------------ | ------------------------------- | ----------------------------------------------------------------- |
| Data extraction      | Any modality             | Typed Pydantic object           | [Data extraction](/use-cases/data-labeling/structured-extraction) |
| Classification       | Any modality             | One label, label set, or spans  | [Classification](/use-cases/data-labeling/classification)         |
| Scoring / evaluation | Prompt + response        | Rubric scores                   | [LLM as judge](/use-cases/data-labeling/llm-as-judge)             |
| Preference ranking   | Prompt + two responses   | Winner + rationale              | [Preference data](/use-cases/data-labeling/preference-data)       |
| Non-text input       | Image, audio, video, PDF | Any of the above                | [Multimodal inputs](/use-cases/data-labeling/multimodal-inputs)   |
| Reviewed labels      | Any input                | Adjudicated label + audit trail | [Quality pipeline](/use-cases/data-labeling/quality-pipeline)     |

## Model choice

We use `gemini-3.5-flash` across the cookbooks because it handles text, image, audio, video, and PDF. Agno is model-agnostic, so you can swap models as needed.

## Explore

<CardGroup cols={2}>
  <Card title="Data extraction" icon="brackets-curly" href="/use-cases/data-labeling/structured-extraction">
    Turn any modality into a typed object, with optional per-field confidence.
  </Card>

  <Card title="Classification" icon="tags" href="/use-cases/data-labeling/classification">
    Single-label, multi-label, hierarchical, and span labeling.
  </Card>

  <Card title="LLM as judge" icon="gavel" href="/use-cases/data-labeling/llm-as-judge">
    Score outputs against a rubric. The same machinery, used for evals.
  </Card>

  <Card title="Preference data" icon="scale-balanced" href="/use-cases/data-labeling/preference-data">
    Rank A vs B for RLHF and DPO datasets.
  </Card>

  <Card title="Multimodal inputs" icon="photo-film" href="/use-cases/data-labeling/multimodal-inputs">
    Feed images, audio, video, and PDFs into any labeler.
  </Card>

  <Card title="Quality pipeline" icon="users-gear" href="/use-cases/data-labeling/quality-pipeline">
    Two labelers, a reviewer, and an adjudicator with an audit trail.
  </Card>
</CardGroup>

## Developer Resources

* [Data labeling cookbook](https://github.com/agno-agi/agno/tree/main/cookbook/data_labeling)
* [Structured output](/input-output/structured-output/agent)
* [Multimodal agents](/multimodal/overview)
