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

configuring-experiment-rollout

Skill này làm gì

Skill này thiết lập tỷ lệ chia biến thể, chẳng hạn 50/50, và tỷ lệ người dùng tham gia thí nghiệm. Nó dành cho người muốn lưu lượng thử nghiệm được thiết lập an toàn và công bằng.

Khi nào nên dùng

  • ✓Khi bạn muốn chọn tỷ lệ chia giữa biến thể đối chứng và biến thể thử nghiệm.
  • ✓Khi ai đó yêu cầu một tỷ lệ triển khai và bạn cần biết nó có nghĩa là gì.
  • ✓Khi bạn đang cân nhắc một tỷ lệ chia không đều như 80/20 và muốn tránh thiên lệch.

Liên kết skill

https://github.com/PostHog/posthog/blob/master/products/experiments/skills/configuring-experiment-rollout/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/configuring-experiment-rollout/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

“Thiết lập thí nghiệm của tôi với tỷ lệ chia 50/50 và triển khai cho 25 phần trăm người dùng.”

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

Cách hoạt động

Skill đề xuất chia đều theo mặc định và điều chỉnh tỷ lệ triển khai tổng thể để kiểm soát lượng lưu lượng được tiếp xúc. Skill cũng cảnh báo về thiên lệch mà các tỷ lệ chia không đều có thể gây ra.

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.

Configuring experiment rollout

This skill answers: Who sees what variant?

Recommended approach: equal split + adjust rollout percentage

In most cases, experiments work best with an equal split. If you want to limit exposure to the test variant, adjust the rollout percentage instead.

Why equal splits are better:

  • Equal splits maximize statistical power — each variant has the same sample size
  • Equal splits balance traffic and thus reach significance faster
  • Increasing user exposure throughout the experiment through increasing rollout is clean (changing split mid-experiment can cause users to switch variants, which is bad for user experience and data quality)

Always default to an equal split unless the user explicitly requests otherwise.

When an uneven split is required

Uneven splits combined with the default "Exclude from analysis" handling can introduce bias. If the experiment observes multi-variant users (users exposed to more than one variant) then those are dropped asymmetrically — the smaller variant loses a larger fraction of its assignments. If those users behave differently from the rest, the smaller variant's metrics will be skewed.

The right mitigation depends on experiment state:

  1. Pre-launch, or live but with few exposures so far — use an equal split and reduce the overall rollout. Achieves the same test-variant exposure without the bias and preserves statistical power. See the disambiguation question below.
  2. Live experiment with significant exposures — switch multivariate handling to "First seen variant". Changing the split mid-run reassigns users across variants (anti-pattern; see "Changing rollout on a running experiment" below). Switching handling instead keeps everyone in their original variant and avoids the asymmetric exclusion. See configuring-experiment-analytics for how to set this. Note that "first seen" handling can introduce other biases, but it's preferable to mid-run reassignment.

The two rollout controls

There are two separate controls that determine who sees what. Both live on the linked feature flag, sent through the feature_flag object in the flag's own shape (not the deprecated parameters keys).

1. Variant split (feature_flag.filters.multivariate.variants)

How users inside the experiment are distributed across variants.

  • Array of {key, name, rollout_percentage}, where the rollout_percentage values must sum to 100
  • Minimum 2 variants, maximum 20
  • No specific variant key is required — the analysis baseline defaults to the variant keyed "control" when present, else the first variant
  • Default: control 50% / test 50%

If the user says "A/B/C test" without naming keys, key the baseline "control" (the convention) and create additional variants for the others; if they ask for specific keys, use them as-is with the baseline first.

2. Overall rollout (feature_flag.filters.groups[0].rollout_percentage)

What percentage of all users enter the experiment at all, sent as a single rollout group: groups: [{ "properties": [], "rollout_percentage": N }]. Default: 100%.

Users not included are excluded entirely: they don't see any variant and are not part of the analysis.

Where these are sent

Both controls live inside feature_flag.filters:

{
  "feature_flag": {
    "filters": {
      "multivariate": {
        "variants": [
          { "key": "control", "name": "Control", "rollout_percentage": 50 },
          { "key": "test", "name": "Test", "rollout_percentage": 50 }
        ]
      },
      "groups": [{ "properties": [], "rollout_percentage": 100 }]
    }
  }
}

filters may also carry aggregation_group_type_index (to run the experiment on a group type rather than individual users) and payloads (JSON-encoded strings keyed by variant key). On a running experiment, any flag-config change must also send update_feature_flag_params: true, otherwise the API rejects the update before it reaches the flag (see "Changing rollout on a running experiment").

How they interact

These two controls multiply:

Overall rollout Variant split % seeing test % in analysis
100% 50/50 50% 100%
100% 75/25 control/test 25% 100%
50% 50/50 25% 50%
25%
Câu hỏi thường gặp

Vì sao dùng chia đều?

Chia đều cho mỗi biến thể cùng cỡ mẫu, giúp bài kiểm thử đạt ý nghĩa thống kê nhanh hơn.

Tôi có thể đổi tỷ lệ chia trong lúc thử nghiệm không?

Tốt hơn là không. Người dùng có thể chuyển biến thể, điều này gây hại cho trải nghiệm của họ và chất lượng dữ liệu.

Vì sao chia không đều lại rủi ro?

Người dùng thấy nhiều biến thể bị loại bỏ không đều, điều này có thể làm sai lệch kết quả của biến thể nhỏ hơn.

Chi tiết

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

Configures the rollout shape of a PostHog experiment — the variant split (50/50, 80/20, A/B/C ratios), the overall rollout percentage that gates how many users enter the experiment, and the disambiguation when a percentage like "roll out to 25%" could mean either. Use when the user mentions a rollout percentage, variant split, or traffic distribution; gives a ratio like 60/40, 70/30, or 80/20; asks "who sees the test variant?"; wants to increase, decrease, or change the rollout or split on a draft or running experiment; weighs equal vs uneven splits; or proposes a mid-experiment split change (

repo: PostHog/posthog

Độ phổ biến

Sao GitHub
41k
Vị trí xếp hạng
#6876
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ự