Stage Category: GROUP (Groups documents)Transformation: N documents → K clusters with documents
When to Use
When NOT to Use
Parameters
Clustering Algorithms
auto runs one lightweight LLM call on the first batch — given sample size, dimensionality, variance, and intended cluster count — and locks in a concrete algorithm. Rides the wave: upgrading the LLM improves selection without code changes. Falls back to kmeans if the LLM call fails.Configuration Examples
How Clustering Works
- Extract Embeddings: Get embedding vectors from each document
- Apply Algorithm: Run clustering algorithm (e.g., k-means)
- Assign Documents: Each document assigned to nearest cluster
- Compute Centroids: Calculate cluster centers
- Label (optional): Generate human-readable cluster names
Output Schema
Performance
Common Pipeline Patterns
Search + Cluster
Cluster + Sample Representatives
Theme Discovery Pipeline
Diverse Results Pipeline
Cluster Labeling
Whenlabel_clusters: true, an LLM generates descriptive labels:
Choosing num_clusters
Error Handling
Related
- Group By - Group by field values
- Sample - Select representatives
- MMR - Diversity in ranking
- Deduplicate - Remove duplicates

