Skip to main content
Taxonomies let you attach structured metadata to documents by matching them against a reference collection. They are implemented as retriever-powered joins and can run on demand or be materialized into collections. Taxonomies are warehouse-native enrichment: the multimodal equivalent of a SQL JOIN, linking documents to canonical entities via embedding similarity rather than key equality.
From clusters to taxonomies: documents are embedded into a shared vector space, unsupervised clustering discovers natural structure, an LLM labels each cluster (product reviews, technical docs, legal contracts, support tickets), and stable clusters are promoted into reusable hierarchical taxonomy nodes. The taxonomy then auto-classifies new documents at ingest, becomes search filters at query time, and reclassifies existing documents retroactively when the hierarchy changes.

From clusters to taxonomies: embed, cluster, label, promote — then the taxonomy classifies new documents at ingest, powers filters at query time, and reclassifies retroactively when nodes change.

Taxonomy Types

Each node references a collection, retriever, and list of enrichment fields. Child nodes inherit parent properties automatically.

Flat Taxonomy: Product Catalog Recognition

Flat taxonomy showing multimodal documents matched against a product catalog reference collection
In a flat taxonomy, documents from any modality (video, image, audio, text) are matched against a single reference collection. Each document uses its appropriate feature embedding (CLIP for visual, text embeddings for audio transcripts) to find the best match. Enrichment fields (SKU, category, price) are attached when similarity exceeds the threshold.

Hierarchical Taxonomy: Media Content Classification

Hierarchical taxonomy showing media content classification with multiple levels from brand to campaign
In a hierarchical taxonomy, documents traverse multiple levels of progressive refinement. Starting from a broad brand classification (1 node), through content category (2 nodes), sport/style type (4 nodes), audience segmentation (5 nodes), to specific campaigns (6 nodes). Each level narrows the classification using different multimodal features—CLIP for brand detection, scene classification for categories, activity detection for sport types, demographic models for audiences, and campaign-specific patterns at the final level. Documents inherit all properties from parent nodes as they traverse down the tree.

Execution Modes

Configure execution mode via a collection’s taxonomy_applications array or by adding a taxonomy stage to a retriever.

How Hierarchical Taxonomies Execute

Hierarchical taxonomies are executed like Common Table Expressions (CTEs) in SQL—each level builds on the results of the previous level, creating a recursive evaluation chain from root to leaf nodes.
At each level:
  1. Documents that matched the parent node are passed down
  2. The child node’s retriever executes against its reference collection
  3. Enrichment fields from matching nodes are accumulated
  4. Only documents exceeding the similarity threshold continue to child nodes
This CTE-style execution ensures that a document classified as “Nike → Athletic → Running” inherits enrichment fields from all three levels, not just the leaf node.

Application Methods

Hierarchical taxonomies can be applied through three methods: On-demand enrichment adds a taxonomy_enrich stage to your retriever pipeline:
Materialized enrichment runs automatically after document extraction completes. Configure it in the collection’s taxonomy_applications:
Retroactive enrichment applies a taxonomy to documents already in the collection:
Use retroactive application when:
  • You’ve updated a taxonomy and need to reclassify existing documents
  • You’re migrating from a flat taxonomy to a hierarchical one
  • You’ve added new reference data to taxonomy collections

Internals: JOIN Stage

Taxonomies reuse the join@v1 stage under the hood:
  • Direct join – key-based match (join_type: "direct").
  • Retriever join – similarity match using a nested retriever (join_type: "retriever").
  • Join strategiesreplace, enrich, left, or append control how fields merge.
Parallel execution (asyncio.gather) makes retrieval joins 10–50× faster than sequential lookups.

Create a Flat Taxonomy

Only taxonomy_name and config are required at the top level. Everything that describes the taxonomy goes inside config.
retriever_id and input_mappings are required for a flat taxonomy.
input_mappings maps a retriever input key to where the value comes from. Each entry is { input_key, source_type, path }. input_key must be a key the retriever’s own input_schema declares. Use path as a dot-path for payload and vector sources, and override to pass a static value for literal.It does not take a feature URI. A feature_uri identifies a vector index, not an input source.
Every enrichment_fields[].field_path must already exist in the source collection’s output schema. These fields are copied from the source, so a path that is not there returns a 422 listing the fields that are.merge_mode is replace or append.

Create a Hierarchical Taxonomy

Hierarchical nodes inherit parent enrichment properties; children can override or extend them.
A hierarchy is a flat list, not nested JSON. Nodes never contain child nodes. Each node names its parent with parent_collection_id, null marks a root, and the tree is rebuilt from those pointers. Order does not matter.collection_id is the only required field on a node, and it identifies the node. There is no separate node id.On a hierarchical taxonomy, retriever_id and input_mappings are optional at the config level and can be set per node. You can also let Mixpeek infer the shape with inference_strategy (schema, cluster, or llm) plus inference_collections, instead of listing nodes by hand.

Attach to a Collection

  • Materialized enrichment updates documents ~30 seconds after ingestion completes (debounced to avoid thrashing).
  • On-demand enrichment keeps documents untouched; retrievers call the taxonomy join at query time.

Test On Demand

Inference Strategies

  • Manual – Define nodes explicitly (IDs, collections, retrievers).
  • Schema-based – Infer nodes from existing collection schemas (planned).
  • Cluster-based – Create nodes from clustering output.
  • LLM-based – Generate hierarchical structure from sample documents.
Combining strategies is encouraged: bootstrap via inference, then fine-tune manually.

Monitoring

  • List taxonomies: POST /v1/taxonomies/list
  • Inspect hierarchy and node metadata: GET /v1/taxonomies/{id}?expand_nodes=true
  • Track materialized enrichment progress via webhook events (collection.documents.written)
  • Use retriever analytics to ensure taxonomy stages don’t dominate latency.

Best Practices

  1. Start flat for quick wins; layer hierarchies once value is proven.
  2. Keep enrichment minimal—copy only fields needed at query time.
  3. Cache taxonomy stages in retrievers when reference collections rarely change.
  4. Version taxonomies (via snapshots) before major structural changes.
  5. Combine with clusters to discover candidate nodes and measure coverage.
Taxonomies let you inject domain knowledge into multimodal search—link documents to canonical entities without relying on brittle key joins.