exploring-llm-clusters

Analyze PostHog LLM clustering runs to compute cost, latency, and error metrics.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/FrekiManagarm/dunlo --skill exploring-llm-clusters-frekimanagarm
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: exploring-llm-clusters
Source: https://github.com/FrekiManagarm/dunlo/tree/main/.agents/skills/exploring-llm-clusters
Command: npx skills add https://github.com/FrekiManagarm/dunlo --skill exploring-llm-clusters-frekimanagarm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps you understand and debug how your LLM system behaves by organizing high-volume traces into meaningful clusters, then quantifying cost, latency, and errors across those clusters.

Core Features & Use Cases

  • Cluster run discovery: Identify recent LLM clustering runs (trace-level and generation-level) over a time window.
  • Cluster inspection & summarization: Retrieve clusters from a chosen run and review cluster titles, descriptions, sizes, and representative traces.
  • Metrics computation: Compute per-trace or per-generation cost, latency, token counts, and error rates within the cluster’s analysis window.
  • Deep trace drilling: Select specific trace IDs from a cluster and inspect full trace details for root-cause investigation.

Quick Start

Use the skill to investigate your most recent clustering run by listing recent clustering runs for the last 7 days, selecting a run, then loading its clusters to identify the most representative and most expensive clusters before drilling into individual traces.

Frequently Asked Questions about exploring-llm-clusters

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze LLM traffic clusters in PostHog to find costly or slow generations?▼

To analyze LLM traffic clusters in PostHog, you can discover recent clustering runs, inspect cluster sizes and representative traces, and compute per-cluster cost, latency, token counts, and error rates over a specific time window. This reveals expensive or slow AI behavior.

How does trace-level clustering work for debugging LLM error rates?▼

Trace-level clustering for debugging LLM error rates groups high-volume traces into meaningful clusters, allowing you to compute error metrics per cluster and drill into individual trace IDs for root-cause analysis using targeted SQL queries against PostHog events.

Can I compare LLM clustering runs across different time windows in PostHog?▼

Yes, you can compare LLM clustering runs across different time windows by listing recent trace-level and generation-level runs, selecting specific runs, and computing cluster-level metrics like cost, latency, and token counts over each run's designated analysis window.

What is the best way to investigate LLM latency patterns using PostHog analytics?▼

The best way to investigate LLM latency patterns using PostHog analytics is to retrieve clusters from a chosen clustering run, compute latency metrics across the cluster's time window, and use trace query tools to inspect specific traces referenced by cluster membership for root-cause identification.

Do I need PostHog event data to compute LLM cost metrics and token counts?▼

Yes, you need PostHog event data containing LLM cost, latency, token, and error fields to compute cluster-level metrics. The Skill executes targeted SQL against these PostHog events to extract clustering metadata and quantify behavior across clusters.