Flags & experiments

Ship behind a flag, and let the AI tell you when to call it

Flags, rollouts and A/B tests live next to the analytics they are judged by. Exposures and conversions are events in the same store, the statistics are computed by the engine, and the model only words a verdict the rules can check.

Flags

Roll out to a share of the people who match

A flag is boolean or multivariate (variants with weights and an optional JSON payload). It is switched on or off, narrowed by targeting rules on person traits (user.plan), country, device, platform, app version, browser, OS or language, and rolled out to a fraction of the people who match. Raising the rollout only adds people; nobody flips back.

  • Deterministic: the bucket is a hash of the flag key and the person, so the same person gets the same answer on the web, in the app and on the server
  • Every SDK: browser snippet and npm, React Native, iOS and Android read flags from a local cache, synchronous from the next launch
  • Test a person: the flag page evaluates any id with traits and says why (disabled, targeting, rollout or match)
  • Exposures are a $flag_exposure event the first time a flag is read in a session
clickiq.example.com/flags
Flags & experiments list for Northwind Outfitters with four flags: checkout-redesign (On, 100%, control 50% · new 50%, experiment Running, goal Order completed), free-shipping-banner (Partial, 25%, 1 rule), guest-checkout (Off) and search-v2 (Partial, 100%, 1 rule).
Every flag shows its status, rollout and targeting at a glance. checkout-redesign is the running A/B test (50/50, goal ‘Order completed’); free-shipping-banner is on for 25% of visitors who match one targeting rule (US and GB).
Experiments

Results with intervals, and a verdict in words

An experiment is a flag with a goal event, up to five secondary metrics, a minimum sample per arm and an optional hypothesis. The results table gives each variant’s exposed people, conversions and rate with a 95% interval, the uplift with its interval, the p-value and the probability of beating control, plus a cumulative chart and a sample-ratio check.

The readout card turns those numbers into ship, keep running or stop, with the reasons and the risks. On the Northwind demo, the checkout-redesign test reads Ship new: 12.65% against 10.99% over 14 days and 8,001 people, +15.1% (interval +2.2% to +27.9%), p = 0.022, a 98.9% probability of beating control, and no sample-ratio mismatch (p = 0.584).

clickiq.example.com/flags/checkout-redesign
Experiment tab of the checkout-redesign flag: an AI readout card ‘Ship new’ with the headline ‘Checkout redesign lifts order completion rate by 15.1% (CI: 2.2%–27.9%), with 98.9% probability of beating control’, four reasons and two risks; a results table (control 3,976 exposed, 437 converted, 10.99%; new 4,025 exposed, 509 converted, 12.65%, +15.1%, p 0.022, P(beat control) 98.9%); a cumulative conversion chart over 14 days and a secondary metric, Checkout started, 30.0% vs 31.0% (p 0.319).
The readout card says Ship new and shows why: both arms are past the 500-person minimum, the sample ratio is fine (SRM p 0.584), and new converts at 12.65% against 10.99% (+15.1%, p 0.022, 98.9% probability of beating control). Note the risks it lists: the interval runs from +2.2% to +27.9%. The small print says the rules reached the same verdict.
The statistics

What the engine computes before the model says anything

NumberHow
Rate intervalWilson 95% interval per variant
Uplift and its interval(pvariant − pcontrol) / pcontrol, with the unpooled difference interval scaled by the control rate
p-valueTwo-sided, pooled two-proportion z-test
P(beat control)Beta posteriors, 20,000 Monte-Carlo draws with a fixed seed, so the answer does not wobble between page loads
Sample-ratio mismatchChi-square of the exposed counts against the weights; a mismatch at p < 0.001 stops the test
Who countsPeople (across devices), in the first variant they saw; converted means the goal after their first exposure, inside the window
How it works

An experiment readout: from a flag read to a verdict the rules agree with

An experiment readout: from a flag read to a verdict the rules agree with 1Flag readThe SDK asks theserver once, cachesthe answer and sends$flag_exposure.2EventsExposures and thegoal event land inthe same store asevery other event.3StatisticsOne grouped scan perexperiment;intervals, p, P(beat)and SRM in plainPython.4AIReadoutThe model sees onlythose numbers andanswers ship, keeprunning or stop, withwhy and risks.5CheckedA ship verdict on aratio mismatch orwithout a variant isreplaced by the rulesverdict.No model: the rules readout answers (SRM stops, under the minimum keeps running, P(beat) ≥ 0.95 and p < 0.05 ships).An experiment readout: from a flag read to a verdict the rules agree with 1Flag readThe SDK asks the server once,caches the answer and sends$flag_exposure.2EventsExposures and the goal event landin the same store as every otherevent.3StatisticsOne grouped scan per experiment;intervals, p, P(beat) and SRM inplain Python.4AIReadoutThe model sees only those numbersand answers ship, keep running orstop, with why and risks.5CheckedA ship verdict on a ratio mismatchor without a variant is replacedby the rules verdict.No model: the rules readout answers(SRM stops, under the minimum keepsrunning, P(beat) ≥ 0.95 and p < 0.05ships).
The rules verdict is always computed and shown beside the AI one; on the demo both say ship.
What you can ask

Questions this answers

Type them into Ask, give them to an agent as a goal, or send them through MCP from your own assistant.

Is checkout-redesign ready to call?The readout: ship, keep running or stop, with reasons
Which experiments are running?The flags list filtered to experiments, through the list_flags tool
Did the new checkout hurt Checkout started?The secondary metric with its uplift and p-value
Show me the conversion of each variant by dayThe cumulative chart, or a trend on $flag_exposure
Who is in the free-shipping-banner rollout?Test a person, or a segment on the exposure event
Compare the new variant on mobile and desktopA breakdown of the goal by device for exposed people
Outcomes

What teams do with it

Calls you can defend

A verdict with intervals, a ratio check and named risks, not a green arrow.

One place for the release

The flag, its rollout, its experiment and its impact on errors and journeys sit on one event stream.

The same answer everywhere

Web, app and server read the same deterministic bucket for a person.

Where it stops. Goals are conversions (did the person do the goal event after exposure); revenue per visitor is not an experiment metric. Flags are evaluated by the server and cached by the SDKs, so a change reaches a browser on its next fetch (start, identify, reset or reload). A test needs the minimum sample per arm before the readout will call it.

Run your first experiment with us

Pick one change you are about to ship; we put it behind a flag and read the result together.

Request a demo