Clusters

Clusters is in beta

Clusters is currently in beta. We'd love to hear your feedback as we develop this feature.

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 every day. 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

  1. PostHog analyzes your recent traces or generations from the past 7 days.
  2. Similar items are grouped together based on their content.
  3. AI generates a title and description for each cluster.
  4. Metrics like average cost, latency, token usage, and error rate are computed per cluster.

Clustering runs automatically every day — no setup needed beyond having traces captured.

Viewing clusters

Navigate to LLM analytics > Clusters to see the overview.

Filtering events

Click the Filters button in the Clusters view to configure which traces or generations are included in clustering. Use property filters to scope clustering to specific events — for example, filtering by model name, user segment, or custom properties.

Configured filters persist and apply to both automated daily clustering runs and trace summarization runs.

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.

Toggle between them using the selector at the top of the page.

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.

FeatureDescription
DotsEach dot represents one trace or generation, color-coded by cluster
CentroidsLarger dots marking the center of each cluster
Click dotNavigate to the trace or generation detail
Click centroidNavigate to the cluster detail page
Drag to zoomZoom into a region of the plot
Double-clickReset 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.

Community questions

Was this page useful?

Questions about this page? or post a community question.