跳到正文
Skillpedia
分析与电子表格41k · #6881

managing-experiment-lifecycle

它能做什么

本技能说明实验的每一种状态变化,例如启动、暂停、冻结或结束。适合运行 A/B 测试、并希望在做出改动前了解其影响的人。

适用场景

  • ✓当你准备启动一个草稿实验,并想了解接下来会发生什么时。
  • ✓当你想暂停、恢复或结束一个正在运行的实验的时候。
  • ✓当你需要阻止新用户进入测试,同时继续收集其指标的时候。

技能链接

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

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/PostHog/posthog/blob/master/products/experiments/skills/managing-experiment-lifecycle/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请暂时暂停我正在运行的实验,并告诉我已经在其中的用户会发生什么。”

每周 5 个新技能,1 分钟读完。

工作原理

它会说明每项操作的要求和效果,例如谁会看到哪个变体,以及分析会受到何种影响。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Managing experiment lifecycle

This skill covers experiment state transitions — what each action does, when to use it, and how it affects variant assignment and analysis.

State diagram

draft ──launch──▶ running ──end──▶ stopped ──archive──▶ archived
                  │ │   ▲              │
                  │ pause resume  ship_variant
                  │ │   │         (also ends if running)
                  │ ▼   │
                  │ paused (flag inactive, still "running" status)
                  │
                  ├─freeze_exposure──▶ exposure_frozen ──unfreeze_exposure──▶ running
                  │                    (enrollment closed, metrics keep flowing)

Any non-draft state ──reset──▶ draft

Actions and their implications

For each action, the two key questions:

  1. Who sees what variant? (user perspective)
  2. Who is in my analysis? (statistical perspective)

Launch (experiment-launch)

Transitions draft → running. Activates the feature flag and sets start_date.

  • Preconditions: must be in draft, flag needs 2-20 multivariate variants (no specific key required; the baseline defaults to "control" when present, else the first variant)
  • Pre-launch checklist: has at least one metric? Variants correct? Flag implemented in code?
  • Variants: users start being bucketed into variants based on the configured split
  • Analysis: data collection begins from start_date

No request body needed.

One optional item worth a single mention at launch, when the change is user-facing and substantial: a short survey, shown when users finish the experimented flow (e.g. triggered by the form's submit event), collects qualitative feedback (a rating, an optional comment) alongside the metrics, from day one. Offer it once as setup advice, drop it if declined, and never let it delay the launch. Do not raise it at end or ship-variant time — there it reads as a gate on rolling out. → See references/qualitative-feedback.md in [[diagnosing-experiment-health]]

Pause (experiment-pause)

Deactivates the feature flag. Users fall back to the default experience (typically control).

  • Preconditions: must be running and not already paused
  • Variants: flag is not returned by /decide — no new exposure events recorded
  • Analysis: no new data while paused, but existing data is preserved. Experiment stays "running".

No request body. Use experiment-resume to reactivate.

Resume (experiment-resume)

Reactivates the feature flag after a pause. Users are re-bucketed deterministically into the same variants.

  • Preconditions: must be paused
  • Variants: same assignment as before pause — deterministic bucketing
  • Analysis: exposure tracking resumes

No request body.

Freeze exposure (experiment-freeze-exposure)

Stops enrolling new users while everything else keeps going: already-enrolled users keep their variant, metrics keep flowing, and end_date stays null. Snapshots the already-exposed users into a static cohort and narrows every release condition on the feature flag to that cohort. Status becomes exposure_frozen.

Use for long-horizon metrics (revenue, LTV, retention, renewals) when the sample is big enough and you want to stop adding users without stopping measurement. Neither end nor pause fits that job: end stops measurement at end_date, and pause deactivates the flag for everyone.

  • Preconditions: must be running (not draft, stopped, paused, or already frozen), flag linked and not deleted, at least one release condition
  • Variants: enrolled users keep their variant (deterministic bucketing); new users no longer match the flag
  • Analysis: exposures stop growing (a flat exposure curve is expected), but metric data keeps accumulating for enrolled users

Timing: the exposure scan and cohort snapshot run synchronously inside the API call, and duration scales with the number of exposed persons — an experiment with tens of thousands of exposed users can take on the order of tens of seconds. Set expectations with the user, wait for the response, and don't treat a slow call as a failure or retry it.

Not applicable (400) for:

  • Group-aggregated experiments — the flag targets groups, not persons, and a person cohort can't freeze group-based matching
  • Experiments in a holdout — holdout assignment is evaluated before release conditions, so n
常见问题

冻结实验会做什么?

它会关闭入组,使新用户无法加入,同时已在测试中的用户所产生的指标仍会继续流入。

上线后可以退回草稿吗?

可以。将非草稿状态的实验重置,会使其回到草稿状态,本技能会先说明其影响。

发布变体会做什么?

本技能会说明,发布变体也可能结束一个正在运行的实验,以及这对功能开关意味着什么。

详情

作者的原始描述

Guides experiment state transitions: launching, pausing, resuming, freezing/unfreezing exposure, ending, shipping variants, archiving, resetting, duplicating, copying to another project, and migrating a legacy experiment to the new experiments engine. Covers preconditions, implications for variant assignment and analysis, and the decision framework for when to use each action. TRIGGER when: user asks to launch, pause, resume, end, ship, archive, reset, duplicate, or copy an experiment to another project, to freeze/unfreeze exposure (stop enrolling new users while metrics keep flowing, or reope

repo: PostHog/posthog

热度

GitHub 星标
41k
排名
#6881
许可证
—
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能