Clusters
Contents
Requirements
- Traces or generations captured – Set up LLM event capture using the installation guide.
- AI data processing enabled – Your organization must have AI data processing consent enabled, the same requirement as trace summarization.
- Automatic daily runs – Clustering runs automatically based on your configured clustering jobs. No manual setup is needed.
Clusters automatically group similar LLM traces or generations together, helping you discover patterns in how users interact with your LLM features without reading every conversation.
Why use clusters?
- Discover usage patterns – See what users are actually asking your LLM to do.
- Find problem areas – Identify clusters with high error rates, costs, or latency.
- Monitor trends – Daily runs show how usage patterns evolve over time.
- Surface outliers – Items that don't fit any cluster are flagged as unusual behavior.
How clusters work
- PostHog analyzes your recent traces or generations from the past 7 days.
- Similar items are grouped together based on their content.
- AI generates a title and description for each cluster.
- Metrics like average cost, latency, token usage, and error rate are computed per cluster.
Enabled clustering jobs run automatically during the next scheduled cycle — no manual intervention needed beyond having traces captured.
Viewing clusters
Navigate to LLM analytics > Clusters to see the overview.
Managing clustering jobs
Clustering jobs let you define independent clustering configurations — for example, one job for traces from a specific model and another for all generations. Click the Jobs button in the Clusters view to open the jobs management panel.
Each job has the following settings:
- Name – A label to identify the job (e.g. "Production GPT-4o")
- Analysis level – Whether to cluster traces (entire conversations) or generations (individual LLM calls)
- Event filters – Property filters to scope which traces or generations are included. Leave empty to include all.
- Enabled – Toggle a job on or off without deleting it
You can create up to five clustering jobs per team. Jobs run automatically during the next scheduled clustering and summarization cycle. The run selector on the Clusters page includes the job name so you can identify which job produced each run.
Trace vs generation clustering
Clusters can operate at two levels:
- Traces – Cluster entire conversations, giving you a high-level view of what users are doing.
- Generations – Cluster individual LLM calls, useful for analyzing specific model interactions.
The analysis level is configured per job in the jobs panel. You can also use the level toggle at the top of the Clusters page to filter which runs are displayed.
Distribution bar
The color-coded bar at the top shows the proportional size of each cluster. Hover over a segment to see the cluster name and item count. Click a segment to jump to that cluster.
Scatter plot
The interactive 2D scatter plot visualizes how items are distributed across clusters.
How to read the scatter plot
Unlike a typical scatter plot, the X and Y axes here don't represent any specific metric — there are no axis labels on purpose. Each trace or generation is converted into a high-dimensional embedding (a numerical fingerprint of its content), which is then projected down to 2D for visualization.
The only thing that matters is distance: similar items are closer together, different items are farther apart. Think of it as a map of your LLM usage where related conversations form neighborhoods.
This means:
- A tight group of dots = traces or generations that your LLM handled in a similar way
- Dots far from any group = outliers or unusual behavior
- The absolute position on the chart doesn't mean anything — only relative distances between dots matter
| Feature | Description |
|---|---|
| Dots | Each dot represents one trace or generation, color-coded by cluster |
| Centroids | Larger dots marking the center of each cluster |
| Click dot | Navigate to the trace or generation detail |
| Click centroid | Navigate to the cluster detail page |
| Drag to zoom | Zoom into a region of the plot |
| Double-click | Reset zoom |
Cluster cards
Below the scatter plot, a grid of cards shows each cluster with:
- AI-generated title and description summarizing the cluster's content
- Size – Item count and percentage of total
- Metrics – Average cost, average latency, average tokens, error rate, and total cost
Expand a card to preview the traces or generations in that cluster.
Items that don't fit any cluster appear in a special Outliers cluster with a dashed border.
Cluster detail page
Click a cluster card or centroid to open the detail page. Here you'll find:
- Cluster title, description, and item count with the date range
- Focused scatter plot showing only items in this cluster
- Paginated list of traces or generations with AI summaries you can expand to see flow diagrams, summary bullets, and notes
- Click any item to view the full trace timeline
Clusters in trace view
When viewing an individual trace, the Clusters tab shows which cluster(s) that trace belongs to. This is useful for understanding what category a specific conversation falls into.