Langsung ke konten
Skillpedia
Analisis & spreadsheet41k ยท #6830

exploring-llm-clusters

Fungsinya

Skill ini menjelajahi klaster yang dibangun PostHog dari lalu lintas AI Anda, yang mengelompokkan jejak, generasi, atau evaluasi yang serupa. Ditujukan untuk tim yang ingin memahami jenis permintaan utama yang ditangani AI mereka.

Kapan dipakai

  • โœ“Saat Anda ingin melihat jenis permintaan apa yang paling sering ditangani AI Anda.
  • โœ“Saat Anda ingin membandingkan perilaku dua kelompok lalu lintas AI.
  • โœ“Saat Anda ingin melihat biaya atau kecepatan dari satu kelompok percakapan.

Link skill

https://github.com/PostHog/posthog/blob/master/products/ai_observability/skills/exploring-llm-clusters/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/PostHog/posthog/blob/master/products/ai_observability/skills/exploring-llm-clusters/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

Contoh permintaan ke AI

โ€œApa jenis permintaan utama yang ditangani AI kami, dan kelompok mana yang paling mahal?โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Skill membaca hasil pengelompokan yang tersimpan, yang mengelompokkan jejak berdasarkan tingkat kemiripannya, lalu menghitung biaya dan kecepatan untuk setiap kelompok. Setelah itu, skill dapat membuka percakapan individual di dalam kelompok untuk menunjukkan contoh.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Exploring LLM clusters

Use this skill when investigating AI observability clusters โ€” understanding what patterns exist in your AI/LLM traffic, comparing cluster behavior, and drilling into individual clusters.

Tools

Tool Purpose
posthog:llma-clustering-job-list List clustering job configurations for the team
posthog:llma-clustering-job-get Get a specific clustering job by ID
posthog:execute-sql Query cluster run events and compute metrics
posthog:query-llm-traces-list Find traces belonging to a cluster
posthog:query-llm-trace Inspect a specific trace in detail

How clustering works

PostHog clusters LLM traces, individual generations, or evaluation events by embedding similarity. A Temporal workflow runs periodically or on-demand, producing cluster events stored as $ai_trace_clusters (trace-level), $ai_generation_clusters (generation-level), or $ai_evaluation_clusters (evaluation-level).

Each cluster event contains:

  • $ai_clustering_run_id โ€” unique run identifier (format: <team_id>_<level>_<YYYYMMDD>_<HHMMSS>[_<job_id>])
  • $ai_clustering_level โ€” "trace", "generation", or "evaluation"
  • $ai_window_start / $ai_window_end โ€” time window of the data that was analyzed
  • $ai_total_items_analyzed โ€” number of traces, generations, or evaluations processed
  • $ai_clusters โ€” JSON array of cluster objects
  • $ai_clustering_params โ€” algorithm parameters used

The analyzed window closes when a run starts, and the cluster event lands once the run finishes. So the cluster event's own timestamp is always after $ai_window_end, by anything from seconds to hours. Use the window only to bound the traces, generations, and evaluations that were analyzed. To find the cluster event itself, filter on $ai_clustering_run_id with a plain recent-time bound.

Cluster object shape (inside $ai_clusters)

{
  "cluster_id": 0,
  "size": 42,
  "title": "User authentication flows",
  "description": "Traces involving login, signup, and token refresh operations",
  "traces": {
    "<trace_or_generation_id>": {
      "distance_to_centroid": 0.123,
      "rank": 0,
      "x": -2.34,
      "y": 1.56,
      "timestamp": "2026-03-28T10:00:00Z",
      "trace_id": "abc-123",
      "generation_id": "gen-456"
    }
  },
  "centroid_x": -2.1,
  "centroid_y": 1.4
}
  • cluster_id: -1 is the noise/outlier cluster (items that didn't fit any cluster)
  • Items in traces are keyed by trace ID (trace-level), generation event UUID (generation-level), or evaluation event UUID (evaluation-level)
  • rank orders items by proximity to centroid (0 = closest)
  • x, y are 2D coordinates for visualization (UMAP/PCA/t-SNE reduced)

Clustering jobs

Each team can have up to 10 clustering jobs. A job defines:

  • name โ€” human-readable label
  • analysis_level โ€” "trace", "generation", or "evaluation"
  • event_filters โ€” property filters scoping which items are included
  • enabled โ€” whether the job runs on schedule

Default jobs named "Default - traces", "Default - generations", and "Default - evaluations" are auto-created and disabled when a custom job is created for the same level.

Workflow: explore clusters

Step 1 โ€” List recent clustering runs

posthog:execute-sql
SELECT
    toString(properties.$ai_clustering_run_id) AS run_id,
    toString(properties.$ai_clustering_level) AS level,
    toString(properties.$ai_clustering_job_id) AS job_id,
    toString(properties.$ai_clustering_job_name) AS job_name,
    toString(properties.$ai_window_start) AS window_start,
    toString(properties.$ai_window_end) AS window_end,
    toFloat64OrNull(toString(properties.$ai_total_items_analyzed)) AS total_items,
    timestamp
FROM events
WHERE event IN ('$ai_trace_clusters', '$ai_generation_clusters', '$ai_evaluation_clusters')
    AND timestamp >= now() - INTERVAL 14 DAY
ORDER BY timestamp DESC
LIMIT 10

Step 2 โ€” Get clusters from a specific run

posthog:execute-sql
SELECT
    toString(properties.$ai_clustering_run_id) AS run_id,
    toString(properties.$ai_clustering_level) AS level,
    toString(properties.$ai_clustering_job_id) AS job_id,
    toString(properties.$ai_clustering_job_name) AS job_name,
  
Pertanyaan umum

Bagaimana PostHog mengelompokkan lalu lintas?

PostHog membandingkan isi jejak atau generasi berdasarkan kemiripan, dan menjalankan pengelompokan itu sesuai jadwal atau saat Anda memulainya.

Bisakah saya melihat isi satu kelompok?

Bisa. Skill menemukan jejak di dalam klaster dan menampilkan rincian salah satu jejak tersebut.

Siapa yang menentukan arti kelompok-kelompok itu?

Kelompok dibuat secara otomatis, sehingga skill membantu Anda membacanya dan memeriksa contohnya sebelum menarik kesimpulan.

Detail

Deskripsi asli dari pembuat

Investigate AI observability clusters โ€” understand usage patterns in AI/LLM traffic, compare cluster behavior, compute cost/latency metrics, and drill into individual traces within clusters.

repo: PostHog/posthog

Popularitas

Bintang GitHub
41k
Peringkat
#6830
Lisensi
โ€”
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa