exploring-llm-clusters
Skill này làm gì
Skill này khám phá các cụm mà PostHog tạo ra từ lưu lượng AI của bạn, nhóm các trace, lần tạo nội dung hoặc đánh giá tương tự lại với nhau. Nó dành cho các nhóm muốn hiểu các loại yêu cầu chính mà AI của họ xử lý.
Khi nào nên dùng
- ✓Khi bạn muốn xem AI của bạn xử lý loại yêu cầu nào thường xuyên nhất.
- ✓Khi bạn muốn so sánh cách hai nhóm lưu lượng AI hoạt động.
- ✓Khi bạn muốn xem chi phí hoặc tốc độ của một nhóm cuộc hội thoại.
Liên kết skill
https://github.com/PostHog/posthog/blob/master/products/ai_observability/skills/exploring-llm-clusters/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Các loại yêu cầu chính mà AI của chúng tôi xử lý là gì, và nhóm nào tốn chi phí nhất?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill đọc kết quả phân cụm đã lưu, tức là nhóm các trace theo mức độ giống nhau, rồi tính chi phí và tốc độ cho từng nhóm. Sau đó, skill có thể mở các cuộc hội thoại riêng lẻ trong một nhóm để đưa ra ví dụ.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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: -1is the noise/outlier cluster (items that didn't fit any cluster)- Items in
tracesare keyed by trace ID (trace-level), generation event UUID (generation-level), or evaluation event UUID (evaluation-level) rankorders items by proximity to centroid (0 = closest)x,yare 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,
Câu hỏi thường gặp
PostHog nhóm lưu lượng như thế nào?
Nó so sánh nội dung của các trace hoặc lần tạo nội dung để tìm độ tương tự, và chạy việc nhóm theo lịch hoặc khi bạn bắt đầu.
Tôi có thể xem bên trong một nhóm không?
Có. Skill tìm các trace trong một cụm và hiển thị chi tiết của bất kỳ trace nào.
Ai quyết định các nhóm có nghĩa là gì?
Các nhóm được tạo tự động, nên skill giúp bạn đọc chúng và kiểm tra các ví dụ trước khi rút ra kết luận.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 41k
- Vị trí xếp hạng
- #6830
- Giấy phép
- —
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
depot-ci
41kGiúp agent của bạn thiết lập và chạy quy trình Depot CI, một lựa chọn thay thế GitHub Actions, gồm chuyển các quy trình hiện có và đọc nhật ký chạy.
depot-container-builds
41kGiúp agent của bạn build image Docker trên các builder từ xa của Depot, gồm image đa nền tảng, đẩy lên registry và sửa lỗi build.
depot-github-runners
41kGiúp agent của bạn chuyển các job GitHub Actions sang runner do Depot quản lý, chọn kích thước và nhãn runner, và xử lý lỗi thiết lập runner.
editing-agents-md
41kGiúp agent của bạn quyết định một quy tắc nên nằm trong file AGENTS.md hay CLAUDE.md, và viết sao cho quy tắc được tuân thủ mà file không bị phình to.
Skill tương tự
gitcrawl
394kCho phép agent của bạn tìm trong kho lưu trữ issue và pull request GitHub, gom các mục trùng lặp và kiểm tra trạng thái hiện tại trên GitHub.
slacrawl
394kCho phép agent của bạn tìm và đếm tin nhắn trong kho lưu trữ Slack cục bộ, kiểm tra kho đó mới đến mức nào và làm mới khi cần.
goplaces
394kGiúp agent của bạn tìm địa điểm, lấy chi tiết và đánh giá, và xác định tên địa điểm bằng Google Places, với đầu ra JSON cho script.