본문으로 건너뛰기
Skillpedia
분석 및 스프레드시트41k · #6830

exploring-llm-clusters

하는 일

이 스킬은 PostHog가 AI 트래픽에서 만든 클러스터를 살펴봅니다. 클러스터는 비슷한 트레이스, 생성 결과, 평가를 묶은 것입니다. AI가 처리하는 요청의 주요 유형을 이해하려는 팀을 위한 것입니다.

사용하는 경우

  • ✓AI가 가장 자주 처리하는 요청 종류를 보고 싶을 때.
  • ✓두 묶음의 AI 트래픽 동작을 비교하고 싶을 때.
  • ✓한 묶음의 대화에 대한 비용이나 속도를 보고 싶을 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/PostHog/posthog/blob/master/products/ai_observability/skills/exploring-llm-clusters/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“우리 AI가 처리하는 주요 요청 유형은 무엇이고, 어떤 묶음이 비용이 가장 많이 드나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

저장된 클러스터링 결과를 읽는데, 이는 각 트레이스를 얼마나 비슷한지에 따라 묶은 것입니다. 각 묶음의 비용과 속도를 계산합니다. 그다음 묶음 안의 개별 대화를 열어 예시를 보여 줄 수 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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,
  
자주 묻는 질문

PostHog는 트래픽을 어떻게 묶나요?

트레이스나 생성 결과의 내용을 비교해 비슷한 것을 찾고, 일정에 따라 또는 시작할 때 묶음 작업을 실행합니다.

한 묶음 안을 볼 수 있나요?

네. 클러스터에 속한 트레이스를 찾아 그중 하나의 세부 사항을 보여 줄 수 있습니다.

묶음이 무엇을 의미하는지는 누가 정하나요?

묶음은 자동으로 만들어지므로, 스킬은 결론을 내리기 전에 묶음을 읽고 예시를 확인하도록 돕습니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
41k
순위
#6830
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬