
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
Hierarchical Taxonomy: Media Content Classification
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.- Documents that matched the parent node are passed down
- The child node’s retriever executes against its reference collection
- Enrichment fields from matching nodes are accumulated
- Only documents exceeding the similarity threshold continue to child nodes
Application Methods
Hierarchical taxonomies can be applied through three methods:
On-demand enrichment adds a
taxonomy_enrich stage to your retriever pipeline:
taxonomy_applications:
- 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 thejoin@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 strategies –
replace,enrich,left, orappendcontrol how fields merge.
asyncio.gather) makes retrieval joins 10–50× faster than sequential lookups.
Create a Flat Taxonomy
Create a Hierarchical Taxonomy
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.
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
- Start flat for quick wins; layer hierarchies once value is proven.
- Keep enrichment minimal—copy only fields needed at query time.
- Cache taxonomy stages in retrievers when reference collections rarely change.
- Version taxonomies (via snapshots) before major structural changes.
- Combine with clusters to discover candidate nodes and measure coverage.

