Skillpedia
التحليل وجداول البيانات41k · #6830

exploring-llm-clusters

ما الذي تفعله

تستكشف هذه المهارة العناقيد (clusters) التي يبنيها PostHog من حركة الذكاء الاصطناعي، إذ يجمع العناقيد التتبعات أو التوليدات أو التقييمات المتشابهة معاً. وهي مناسبة للفرق التي تريد فهم أنواع الطلبات الرئيسية التي يتعامل معها ذكاؤها الاصطناعي.

متى تستخدمها

  • ✓عندما تريد أن ترى أنواع الطلبات التي يتعامل معها الذكاء الاصطناعي لديك أكثر من غيرها.
  • ✓عندما تريد مقارنة سلوك مجموعتين من حركة الذكاء الاصطناعي.
  • ✓عندما تريد النظر في تكلفة مجموعة من المحادثات أو سرعتها.

رابط المهارة

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

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/PostHog/posthog/blob/master/products/ai_observability/skills/exploring-llm-clusters/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“ما أنواع الطلبات الرئيسية التي يتعامل معها الذكاء الاصطناعي لدينا، وأي مجموعة هي الأكثر تكلفة؟”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تقرأ المهارة نتائج التجميع المحفوظة، التي تجمع التتبعات حسب مدى تشابهها، وتحسب التكلفة والسرعة لكل مجموعة. ثم تستطيع أن تفتح محادثات فردية داخل المجموعة لعرض أمثلة.

المحتوى التقني (ملف 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
الترخيص
—
آخر تحديث
2‏/11‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة