1.  [](/)
2.  [Code examples](/recipes)
3.  Taxonomy Enrichment Pipeline

Back to code examples

Enhanced

# Taxonomy Enrichment Pipeline

Automatically classify and tag content using custom taxonomies. Map your content to IAB categories, custom hierarchies, or industry-specific classifications.

text

image

video

Multi-Tier

[Run in Builder](/build?recipe=taxonomy-enrichment-pipeline)

Python

cURL

import requests

from mixpeek import Mixpeek

client \= Mixpeek(api\_key\="YOUR\_API\_KEY", namespace\="enriched-content")

API \= "https://api.mixpeek.com/v1"

HEADERS \= {"Authorization": "Bearer YOUR\_API\_KEY", "X-Namespace": "enriched-content"}

\# 1. Labeled examples: one document per category, with its label in the text

example\_bucket \= client.buckets.create(

    bucket\_name\="category-examples",

    bucket\_schema\={"properties": {"example": {"type": "text"}}},

)

examples \= client.collections.create(

    collection\_name\="category-examples",

    source\={"type": "bucket", "bucket\_ids": \[example\_bucket\["bucket\_id"\]\]},

    feature\_extractor\={

        "feature\_extractor\_name": "text\_extractor",

        "version": "v1",

    },

)

client.buckets.upload(

    example\_bucket\["bucket\_id"\],

    blobs\=\[{"property": "example", "type": "text", "data": "s3://your-bucket/taxonomy/ai-ml.txt"}\],

)

client.collections.trigger(examples\["collection\_id"\])

\# 2. The retriever the taxonomy uses to find the closest example

matcher \= client.retrievers.create(

    retriever\_name\="category-matcher",

    collection\_identifiers\=\["category-examples"\],

    input\_schema\={"query": {"type": "text", "required": True}},

    stages\=\[

        {

            "stage\_name": "search",

            "stage\_id": "feature\_search",

            "parameters": {

                "searches": \[

                    {

                        "feature\_uri": "mixpeek://text\_extractor@v1/multilingual\_e5\_large\_instruct\_v1",

                        "query": {"input\_mode": "text", "value": "{{INPUT.query}}"},

                        "top\_k": 3,

                    },

                \],

                "final\_top\_k": 3,

            },

        },

    \],

)

\# A flat taxonomy matches each document, through a retriever, against a

\# collection of labeled examples. The SDK has no taxonomies resource, so this is REST.

taxonomy \= requests.post(API + "/taxonomies", headers\=HEADERS, json\={

    "taxonomy\_name": "content-categories",

    "config": {

        "taxonomy\_type": "flat",

        "retriever\_id": matcher\["retriever\_id"\],

        "input\_mappings": \[{"input\_key": "query", "source\_type": "payload", "path": "text"}\],

        "source\_collection": {"collection\_id": examples\["collection\_id"\]},

    },

}).json()

\# 3. The articles collection materializes the taxonomy, so every new document

\#    is labeled as it is written

bucket \= client.buckets.create(

    bucket\_name\="articles",

    bucket\_schema\={"properties": {"article": {"type": "text"}}},

)

articles \= client.collections.create(

    collection\_name\="articles",

    source\={"type": "bucket", "bucket\_ids": \[bucket\["bucket\_id"\]\]},

    feature\_extractor\={

        "feature\_extractor\_name": "text\_extractor",

        "version": "v1",

    },

    taxonomy\_applications\=\[{"taxonomy\_id": taxonomy\["taxonomy\_id"\], "execution\_mode": "materialize"}\],

)

client.buckets.upload(

    bucket\["bucket\_id"\],

    blobs\=\[{"property": "article", "type": "text", "data": "s3://your-bucket/articles/cloud-costs.md"}\],

)

client.collections.trigger(articles\["collection\_id"\])

### Feature Extractors

Text Embedding

Extract semantic embeddings from documents, transcripts and text content

### Retriever Stages

## Frequently asked questions

### How deep can taxonomies go?

Mixpeek supports hierarchical taxonomies with unlimited depth. Most use cases work well with 2-4 levels.

### Can I use standard taxonomies like IAB?

Yes. Mixpeek includes pre-built IAB Content Taxonomy 2.2 and 3.0 that you can use out of the box.

### How accurate is automatic classification?

Accuracy depends on taxonomy clarity and content quality. Typical accuracy ranges from 85-95% for well-defined categories.

## Use Cases Using This Recipe

Intermediate

6 min read

### Contextual Page Signals for Ad Placement

One article URL in, five structured signals out: IAB category, entities with salience scores, sentiment, brand safety, keywords.

Five, from a single pass

Signals per URL

[

advertising

](/solutions/advertising)[

ip safety

](/solutions/ip-safety)

Who It's For

Contextual advertising and ad-targeting teams who decide, per article, which creative renders beside it, and who need that decision to be defensible to a brand.

[View Details](/use-cases/contextual-page-signals)

Advanced

8 min

### SNF Documentation Intelligence

Automate MDS assessments and clinical documentation for skilled nursing facilities

40% less time on charting

Documentation time reduction

[

healthcare

](/solutions/healthcare)

Who It's For

SNF operators, MDS coordinators, directors of nursing, and post-acute care organizations managing clinical documentation across skilled nursing facilities

[View Details](/use-cases/snf-documentation-intelligence)

Intermediate

### Insurance Claims Document Processing

Extract structured data from claims documents, photos, and correspondence automatically

70% reduction in manual document handling

Adjuster data entry time

insurance

Who It's For

Insurance carriers, claims adjusters, and third-party administrators processing 1,000+ claims monthly across property, casualty, auto, and health lines

[View Details](/use-cases/insurance-claims-document-processing)

Intermediate

### Media Archive Face Search

Find every appearance of any person across your entire media archive

95%+ of appearances found vs. 30% with caption search

Person search completeness

[

entertainment

](/solutions/entertainment)

media

Who It's For

News organizations, entertainment studios, photo agencies, and media archives managing millions of images and video assets featuring identifiable persons

[View Details](/use-cases/media-archive-face-search)

Advanced

### Video Compliance Monitoring

Automatically verify regulatory and policy compliance across video content at scale

10x faster than manual review

Compliance review speed

[

security

](/solutions/security)

Who It's For

Compliance teams, broadcast standards departments, advertising regulators, and enterprise communications teams reviewing video content for regulatory adherence

[View Details](/use-cases/video-compliance-monitoring)

Intermediate

8 min

### IAB Content Taxonomy 3.1 classification API for video, images and audio

Send video, images or podcast audio and get IAB Content Taxonomy 3.1 tier paths with a confidence score per category and timestamps per video scene.

Official IAB Content Taxonomy 3.1 IDs, checked by a unit test

Taxonomy

[

advertising

](/solutions/advertising)

Who It's For

Engineers at SSPs, DSPs, publishers, CTV platforms and podcast networks who need IAB Content Taxonomy 3.1 IDs on video, image and audio inventory, and who want to call an API and check the output themselves.

[View Details](/use-cases/iab-taxonomy-classification)

Intermediate

6 min

### Visual Taste & Recommendations

Serve scene-similarity ranked recommendations that learn from every click

+35-55% vs. tag-based systems

Recommendation CTR

[

entertainment

](/solutions/entertainment)[

ecommerce

](/solutions/ecommerce)

media

Who It's For

Streaming platforms, e-commerce companies, stock media libraries, and content marketplaces that want to recommend visually similar content based on what users actually engage with

[View Details](/use-cases/visual-taste-recommendations)

## Related code examples and resources

Pages on the same stages, extractors and patterns.

[

Extractor

### Text Embedding

Extract semantic embeddings from documents, transcripts and text content

Learn more





](/extractors/text)[

Recipe

### Multimodal RAG Pipeline

Build a retrieval-augmented generation system that works with text, images, and video. Feed relevant multimodal context to LLMs for grounded responses.

Learn more





](/recipes/multimodal-rag-pipeline)[

Recipe

### Content Clustering Pipeline

Automatically group similar content together using embedding-based clustering. Discover themes, identify duplicates, and organize large content libraries.

Learn more





](/recipes/clustering-pipeline)[

Recipe

### Metadata Enrichment Pipeline

Automatically enrich your data with extracted metadata: entities, topics, sentiment, language, and custom attributes. Transform raw content into structured, queryable data.

Learn more





](/recipes/metadata-enrichment-pipeline)[

Recipe

### Multimodal Hybrid Search Pipeline

Combine vector search with keyword search (BM25) across text, images, and video for the most comprehensive multimodal retrieval system.

Learn more





](/recipes/multimodal-hybrid-search)[

Recipe

### Clinical Documentation Structuring

Production-grade pipeline for ingesting clinical documents, scanned charts, EHR exports, wound photos, and therapy notes, and structuring them into coded fields aligned with MDS 3.0, PDPM, and CMS audit requirements. Combines OCR, clinical NER, taxonomy classification, and hybrid retrieval to turn unstructured bedside documentation into queryable, auditable data.

Learn more





](/recipes/clinical-documentation-structuring)