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

Back to code examples

Enhanced

# Metadata Enrichment Pipeline

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

text

image

video

audio

Single Tier

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

Python

cURL

from mixpeek import Mixpeek

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

\# 1. A bucket for feedback, and a collection whose LLM step extracts entities,

\#    topic, sentiment and language onto every document

bucket \= client.buckets.create(

    bucket\_name\="customer-feedback",

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

)

collection \= client.collections.create(

    collection\_name\="customer-feedback",

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

    feature\_extractor\={

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

        "version": "v1",

        "parameters": {

            "response\_shape": "entities (list of names), topic, sentiment (positive, neutral or negative) and language code",

            "llm\_provider": "openai",

            "llm\_model": "gpt-4o-mini",

        },

    },

)

\# 2. Upload and process

client.buckets.upload(

    bucket\["bucket\_id"\],

    blobs\=\[{"property": "ticket", "type": "text", "data": "s3://your-bucket/feedback/ticket-8812.txt"}\],

)

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

\# 3. Read the enriched documents

docs \= client.documents.list(collection\["collection\_id"\], page\_size\=100)

for doc in docs\["results"\]:

    print(doc\["document\_id"\], doc.get("sentiment"), doc.get("topic"), doc.get("entities"))

### Feature Extractors

Text Embedding

Extract semantic embeddings from documents, transcripts and text content

### Retriever Stages

## Frequently asked questions

### What entities are extracted?

People, organizations, locations, dates, monetary values, products, and custom entity types.

### Can I combine multiple enrichment types?

Yes. Apply as many extractors as needed. Each runs independently and results are merged into the document metadata.

### Does enrichment work in real-time?

Yes for text content. Image and video enrichment is near-real-time depending on the extractors used.

## 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)

## 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

### Taxonomy Enrichment Pipeline

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

Learn more





](/recipes/taxonomy-enrichment-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

### Multimodal Knowledge Base

Consolidate documents, videos, images, and audio into a single searchable knowledge base with RAG capabilities. Supports natural language Q&A across all content types, with citations linking back to the exact source document, video timestamp, or image.

Learn more





](/recipes/multimodal-knowledge-base)[

Recipe

### Feature Extraction

Multi-tier feature extraction that decomposes content into searchable components: embeddings, transcripts, detected objects, OCR text, scene boundaries, and more. The foundation for all downstream retrieval and analysis.

Learn more





](/recipes/feature-extraction)