Standard A/B testing is built for statistical certainty. You split traffic evenly, hold your breath through weeks of variance, and protect the integrity of a null hypothesis until a p-value clears 0.05. It is disciplined, cautious, and sometimes commercially reckless. When you are running a 72-hour flash sale, launching a limited-time promotional banner, or testing ten creative variations ahead of Black Friday, bleeding 50% of your visitors into an obviously inferior variant is an unnecessary tax on revenue.
That is why Multi-Armed Bandit (MAB) testing exists. Instead of freezing traffic splits in concrete, Optimizely dynamically shifts visitors toward the winning variation in real time. At 365Finds, we see product and growth teams make a recurring error: they treat MAB as a faster, magical version of an A/B test. It is not. An A/B test is a research tool built to answer why and confirm causality. A multi-armed bandit is an exploitation engine built to maximize yield. Once you accept that fundamental difference—and the fact that Optimizely strips out standard statistical significance from the bandit dashboard—configuring it takes only minutes.
Here is how to configure a multi-armed bandit rule inside Optimizely, how the underlying mathematics treat your metrics, and where 365Finds recommends drawing the line between bandit optimization and classical experimentation.
1. Prerequisites Before You Configure
Before toggling an experiment rule from standard A/B to a bandit, confirm three technical prerequisites in your Optimizely project:
- Feature Flag Created: A defined feature flag in Optimizely Feature Experimentation (or Web Experimentation) with the variations and variables you intend to expose to users.
- SDK Decision Point Implemented: Your application code must already evaluate the flag using
optimizelyClient.decide()(or the equivalent SDK client method) and send back downstream conversion events viaoptimizelyClient.track(). - User Profile Service (UPS) for Server-Side Implementations: This is non-negotiable for server-side architectures. Because bandit algorithms continuously adjust traffic allocation percentages based on hourly performance, a returning user might be routed to Variation A at 10:00 AM and Variation B at 2:00 PM if bucketing is calculated freshly on each request. A persistent User Profile Service guarantees sticky bucketing across sessions.
2. Step-by-Step Configuration in Optimizely UI
To set up dynamic allocation instead of a static 50/50 split, configure an MAB rule directly on your target environment.
Step 1: Access Your Feature Flag
Log in to Optimizely, navigate to Flags, and select the flag you want to optimize. Pick your target environment (such as Production or a staging environment for validation).
Step 2: Add a Multi-Armed Bandit Rule
Under the Rules section:
- Click Add Rule.
- By default, Optimizely suggests an A/B Test rule. Do not select that.
- Choose Multi-Armed Bandit (or Contextual Multi-Armed Bandit if you are feeding structured user context into Optimizely's machine learning personalization layer).
- Enter a descriptive Rule Name and Rule Key.
Step 3: Configure Variations
Select the variations you want to test (a minimum of two). Assign the corresponding variable values for each arm. Unlike standard A/B tests where you manually set traffic distribution percentages (e.g., 50% / 50% or 33% / 33% / 33%), the bandit rule assigns equal distribution only at initialization. The algorithm assumes control of these shares as soon as conversions begin tracking.
Step 4: Define the Primary Metric
The bandit algorithm requires a single compass. In the Metrics section, select your Primary Metric.
Optimizely routes traffic differently depending on the data type of this primary metric:
- Binary Metrics (e.g., Conversion Rate, Click-Through Rate): Optimizely applies Thompson Sampling. The algorithm models each variation's performance using a Beta distribution ($\alpha$ conversions vs. $\beta$ non-conversions). It repeatedly samples these distributions to compute each variation's probability of being the best performer, dynamically allocating traffic shares proportional to those win probabilities.
- Numeric Metrics (e.g., Revenue per Visitor, Order Value): Optimizely applies an Epsilon-Greedy policy. A set percentage of traffic (the exploration slice, $\epsilon$) is distributed equally among all variations to discover shifts, while the dominant majority (the exploitation slice, $1-\epsilon$) is routed directly to the variation with the highest observed empirical mean.
Crucial Constraint: You cannot change the primary metric after launching an MAB rule. If you select the wrong event or decide midway that revenue matters more than clicks, you must terminate the rule and create a new one.
Step 5: Set Total Traffic Exposure and Audiences
Define the percentage of overall flag traffic exposed to this rule. If you want 100% of eligible visitors to hit the bandit, set the slider to 100%. If you only want this optimization applied to specific segments (such as mobile visitors or paid traffic), attach an Audience definition.
Step 6: Save and Enable
Save the rule. We always recommend enabling the rule in a staging environment first, triggering test events, and confirming that decisions resolve without latency before flipping the rule to active in production.
3. Alternative: Configuring MAB via Optimizely REST API
For engineering teams automating rollouts via CI/CD pipelines, MAB rules can be configured directly through Optimizely's REST API.
Send a PATCH request to update the ruleset for your flag environment:
PATCH https://api.optimizely.com/flags/v1/projects/{project_id}/flags/{flag_key}/environments/{environment_key}/ruleset
Authorization: Bearer <YOUR_API_TOKEN>
Content-Type: application/json
Payload structure:
{
"rules": [
{
"key": "promo_bandit_banner",
"name": "Promotional Banner Bandit",
"type": "multi_armed_bandit",
"variations": [
{ "key": "control", "percentage_included": 5000 },
{ "key": "variant_a", "percentage_included": 5000 }
],
"primary_metric": {
"event_key": "completed_order"
}
}
]
}
Note from 365Finds: Always execute a GET request on the ruleset endpoint before issuing a PATCH. Optimizely's ruleset endpoint updates whole arrays; failing to merge against existing rules can inadvertently wipe out targeting rules or existing experiments on that flag.
4. Reading the Results: How to Interpret MAB Dashboards
When you open an active MAB results page in Optimizely, the interface looks starkly different from a standard A/B test report:
- No p-values or confidence intervals: Optimizely intentionally omits traditional statistical significance. Because traffic allocation changes continuously based on observed results, standard hypothesis tests (like Optimizely Stats Engine's sequential likelihood ratio tests) are statistically invalid.
- No fixed control baseline: Rather than evaluating whether Variant B beat Variant A by $X%$ at a $95%$ significance threshold, the report tracks Improvement Over Original (or cumulative regret reduction). It estimates how much total conversion lift the dynamic algorithm captured compared to routing all traffic to the default variation.
- Real-time Traffic Share graph: The dashboard displays how traffic allocation evolved over hours and days. A widening gap indicates the algorithm found an early statistical edge and began starving inferior variants of visitors.
5. 365Finds Comparison: Standard A/B vs. Multi-Armed Bandit
To choose the right mechanism, compare their commercial and operational trade-offs:
| Evaluation Dimension | Standard A/B Testing | Multi-Armed Bandit (MAB) |
|---|---|---|
| Core Objective | Knowledge acquisition (identifying true causal winners) | Immediate yield optimization (minimizing lost conversions) |
| Traffic Allocation | Static split (e.g., 50/50) maintained throughout the test | Dynamic split updated in real time by reinforcement learning |
| Statistical Output | Statistical significance, p-values, confidence intervals | Win ratios, dynamic traffic weights, cumulative lift over baseline |
| Opportunity Cost | High: 50% of traffic remains on losing variants until completion | Low: losing variants are progressively starved of incoming visitors |
| Handling Many Variants | Expensive: requires massive sample sizes to test 5+ variations | Efficient: quickly prunes clear underperformers without manual pauses |
| Vulnerability to Novelty Effects | Low: steady baseline absorbs short-term novelty spikes | Moderate to High: early novelty spikes can prematurely pull traffic |
| Secondary Guardrails | Robust: tracks multiple guardrail metrics simultaneously | Fragile: optimizes strictly for the single primary metric |
6. The 365Finds Verdict: When to Use and When to Avoid
At 365Finds, our stance is direct: Multi-Armed Bandit testing is an exceptional financial tool, but an unreliable strategic advisor.
We strongly recommend configuring MAB for:
- Time-sensitive promotions: Cyber Week deals, seasonal clearance banners, and event ticket sales where the test will end before a standard A/B test can collect sufficient power.
- Content and headline optimization: Digital publishing, newsletter hooks, and temporary home page hero banners where content decays in value within days.
- Multi-variant screening: Testing 6 to 10 visual variants where exposing thousands of users to bad design choices incurs severe revenue loss.
We advise sticking with standard A/B testing for:
- Core product and UX architecture: Redesigning a multi-step checkout funnel, altering account management, or overhauling search interfaces. You need to know with statistical certainty why a flow performs better across user cohorts.
- Complex trade-off decisions: Situations where conversion rate must be balanced against refund rates, long-term retention, or server load. Because Optimizely's MAB optimizes for a single primary metric, an algorithm aggressively chasing short-term sign-ups could silently destroy high-margin checkout baskets.
When configured on short-lived, high-velocity assets with a single indisputable conversion goal, Optimizely's multi-armed bandit eliminates the regret inherent in static testing. For enduring product decisions, keep the 50/50 split and wait for the p-value.