Hierarchical Classification
Assign content to multi-level category hierarchies using embedding-based classification. Define your taxonomy once, then classify new content automatically with confidence scores.
"Show all educational tutorial videos classified under safe content with high confidence"
Why This Matters
Taxonomies are organizational infrastructure. Once defined, they enable consistent classification, compliance tagging, and structured navigation across all content.
import requestsAPI_URL = "https://api.mixpeek.com"headers = {"Authorization": "Bearer YOUR_API_KEY", "X-Namespace": "your-namespace"}# Create hierarchical taxonomytaxonomy = requests.post(f"{API_URL}/v1/taxonomies", headers=headers, json={"taxonomy_name": "content_classification","taxonomy_type": "hierarchical","retriever_id": "ret_classifier","input_mappings": {"query_embedding": "mixpeek://multimodal_extractor@v1/embedding"},"hierarchy": [{"node_id": "safe","collection_id": "col_safe_examples","enrichment_fields": ["metadata.category"]},{"node_id": "educational","parent_node_id": "safe","collection_id": "col_educational_examples","enrichment_fields": ["metadata.topic"]}]}).json()# Apply taxonomy to collectionrequests.post(f"{API_URL}/v1/collections/col_my_content/apply-taxonomy",headers=headers,json={"taxonomy_id": taxonomy["taxonomy_id"]})# Search within taxonomy categoriesresults = requests.post(f"{API_URL}/v1/retrievers/taxonomy-search/execute",headers=headers,json={"query": {"text": "educational tutorial videos"}}).json()for doc in results["documents"]:print(f"Document: {doc['document_id']}")print(f" Category: {doc.get('taxonomy_path', 'N/A')}")
Feature Extractors
Image Embedding
Generate visual embeddings for similarity search and clustering
Text Embedding
Extract semantic embeddings from documents, transcripts and text content
Video Embedding
Generate vector embeddings for video content
Retriever Stages
attribute filter
Filter documents by metadata attributes
sort
Sort documents by field values
