Chuyển đến nội dung
Skillpedia
Phân tích và bảng tính41k · #6878

debugging-experiments

Skill này làm gì

Skill này hỗ trợ khi kết quả của một thí nghiệm có vẻ sai, phổ biến nhất là do người dùng không được đếm đồng đều. Nó dành cho khách hàng và nhân viên hỗ trợ cần hiểu kết quả của một thí nghiệm.

Khi nào nên dùng

  • ✓Khi một thí nghiệm cho thấy số lượt tiếp xúc của một biến thể ít hơn nhiều so với biến thể kia.
  • ✓Khi một thí nghiệm hiển thị cảnh báo thiên lệch và bạn không biết vì sao.
  • ✓Khi các con số trong PostHog không khớp với những gì bạn tính bằng SQL của riêng mình.

Liên kết skill

https://github.com/PostHog/posthog/blob/master/products/experiments/skills/debugging-experiments/SKILL.md

Sao 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

Hãy dùng skill này để giúp tôi: https://github.com/PostHog/posthog/blob/master/products/experiments/skills/debugging-experiments/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Vì sao một biến thể trong thí nghiệm của tôi gần như không nhận được lưu lượng, dù tỷ lệ chia là 50/50?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill đọc thiết lập của thí nghiệm và kiểm tra dữ liệu tiếp xúc để tìm điều gì làm lệch người dùng nào được đếm. Sau đó, skill giải thích nguyên nhân và cách sửa bằng ngôn ngữ đơn giản.

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.

Debugging experiments

PostHog Experiments are A/B tests: a feature flag randomizes users into variants, the SDK records an exposure when the flag is read, and PostHog computes per-variant metrics and significance. A customer looks at that results page and asks why it looks wrong.

Most experiment-results tickets are config or exposure-collection problems, not statistics bugs. The randomization is fine; something upstream is skewing which users get exposed, or stopping exposures from being recorded. The job is to find which, prove it with the customer's own data, and hand back a plain-language explanation plus the fix.

This skill is the customer-support front door. It carries the two most common complaints inline (uneven exposures, missing exposures) and loads diagnosing-experiment-health as a diagnostic library for the deeper long tail (interpretation traps, numbers-vs-SQL, mid-run surprises).

Debugging workflow

  1. Parse the ticket. Extract project ID, instance (US vs EU — the URLs and data live in different places), experiment ID or name, the lib/platform if relevant, the exact complaint in the customer's words, and what they already tried. Aged or multi-reply tickets are dirty: the config may have been edited mid-thread, so re-pull current state and treat earlier claims as stale.
  2. Resolve the experiment. If the ticket names it rather than giving an ID, load finding-experiments to resolve it, then call posthog:experiment-get.
  3. Pull the data read-only. Run the fixed data-pull sequence in references/pulling-the-data.md. This produces the "pertinent numbers" you will show the customer: per-variant exposed-person counts, $multiple share, the distinct_id/person fragmentation ratio, the SRM chi-squared result, the exposure trajectory, and the flag/experiment activity log. Verify from data before asking the customer anything.
  4. Match the complaint to the known-cause catalog below. Confirm the single leading cause with one targeted number from step 3 before writing. Treat the customer's own conclusion ("it's just noise", "a measurement bug") as a hypothesis to disconfirm, not confirm — pull the data independently rather than re-deriving their answer. Quantify a suspected cause before asserting its impact (count the contaminating cohort, don't eyeball it). One trap in particular: never run the SRM chi-square against an assumed even split — read the configured rollout_percentage first, since an intended 34/33/33 reads as a ~2% SRM under an equal-split assumption.
  5. Scope the fix to the experiment's state before recommending it. On a draft, config changes are free — recommend freely. On a running experiment every change has a mid-run tradeoff (changing the split is an anti-pattern — prefer reset or end+restart; see configuring-experiment-rollout and managing-experiment-lifecycle). On a stopped/shipped experiment the flag and results are the documented outcome, so recommend interpretation or a next experiment, not a mid-run edit. Don't propose reversing a state change unless the customer asks how to undo it.
  6. Write the reply using references/customer-reply.md: cause → fix → the numbers that prove it, in the customer's UI language.

Known-cause catalog — "exposures aren't even" / "one variant has no traffic"

Ordered by how often they're the answer. Full mechanism detail lives in diagnosing-experiment-health/references/bias-and-skew.md (group A) — load it when a case needs more depth than the summary here.

First, split a real SRM into its two possible homes. Assignment is a deterministic hash of a stable identifier (the distinct_id by default; the device ID or group key for those flag types — see references/pulling-the-data.md), so with an unchanged split every user has a fixed variant and any set of users must fall close to the configured percentages. A confirmed SRM (chi-squared p < 0.001 at healthy volume — not eyeballed) therefore lives in exactly one of two places:

  • Assignment-side — the recorded variant disag
Câu hỏi thường gặp

Việc phân nhóm ngẫu nhiên có thường bị hỏng không?

Thường là không. Hầu hết vấn đề về kết quả đến từ thiết lập hoặc cách thu thập tiếp xúc, không phải từ thống kê.

Vì sao các con số của PostHog khác với SQL của tôi?

Mỗi bên dùng quy tắc khác nhau để xác định ai được tính, nên skill so sánh hai bên để tìm ra khác biệt.

Điều gì xảy ra nếu thí nghiệm được chỉnh sửa trong lúc chạy?

Skill kiểm tra lại thiết lập hiện tại, vì các ghi chú trước đó có thể đã lỗi thời.

Chi tiết

Mô tả gốc của tác giả

Debug and support PostHog Experiments (A/B tests) for a customer looking at their own results. Use whenever an experiment support ticket is pasted or a customer asks a results question, most commonly "why aren't my exposures even?", "why is one variant getting no traffic?", "why am I missing / seeing too few exposures?", "why does the bias banner show?", or "why don't PostHog's numbers match my SQL?". Pulls the experiment's real data read-only, matches it to a known-cause catalog, and produces a customer-facing explanation, fix, and review of the pertinent numbers. Loads diagnosing-experiment-

repo: PostHog/posthog

Độ phổ biến

Sao GitHub
41k
Vị trí xếp hạng
#6878
Giấy phép
—
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự