Multi-Armed Bandit A/B Testing for DMs and Cold Emails
Multi-armed bandit A/B testing beats a 50/50 split when you want more replies during the test, not a clean lift number. When to use each, with the math.
Use a multi-armed bandit when you want more replies while the test runs and you will keep rotating new message variants; use a fixed 50/50 A/B split when you need a trustworthy lift number for one decision. That verdict applies to anyone sending DMs or cold emails at low volume, tens to low hundreds of messages a day, where every send burns a lead you cannot get back. The main caveat of multi armed bandit ab testing: bandits give up statistical power and report per-variant reply rates that are biased low, as shown by Nie et al. (2018) and by a clinical-trial simulation in Villar, Bowden and Wason (2015).
Most guides on this topic are written for website traffic: checkout pages, landing pages, product funnels. Outreach is a different animal. Volume is tiny, the reward (a reply) arrives hours or days later, and with an LLM writing variants, the set of messages you test changes every week. Below: the decision, the algorithms, sample sizes, an illustrative simulation and the LLM loop.
Multi-armed bandit vs A/B testing: which should you use for outreach?
A fixed split exists for a reason. As Koji puts it, "A fixed 50/50 split is not an accident of laziness. It is the allocation that maximises statistical power for a two-arm comparison." A bandit deliberately gives up some of that power to send more messages to whatever is winning right now.
So the question is not which method is "better" but what you want out of the test: a number you can defend, or more replies this month. Use this matrix.
| Situation | Pick | Why |
|---|---|---|
| You test 3 or more openers and keep adding new ones | Bandit | Bandits scale to many arms with little prior information (Koji) |
| Goal is replies during the campaign, not a report | Bandit | Traffic shifts to the leader while the test runs (Bytepawn) |
| Short campaign or one that runs indefinitely | Bandit | Fits short windows and always-on optimization (Crazy Egg) |
| One strategic decision (new offer, new positioning) | A/B | Equal exploration of all variants supports long-term decisions (Amplitude) |
| You need an effect size for a report or a client | A/B | Even split maximizes power; bandit estimates are biased low (Nie et al.) |
| Long reply lag or long sales cycle | A/B | Bandits struggle when outcomes arrive late (Crazy Egg) |
| Reply rates change over the campaign | A/B, or bandit with decay | Bandits assume a stable conversion rate per variant (Amplitude) |
How Thompson sampling and epsilon-greedy allocate sends
Thompson sampling is old: it "was first proposed in 1933," according to the tutorial by Russo, Van Roy and colleagues. For a reply/no-reply outcome it works like this:
- Give every variant a Beta distribution with two counts: replies + 1 and non-replies + 1. Starting at Beta(1, 1) means "no idea, any rate is equally likely". The tutorial calls these counts pseudo-counts that increase "by one with each observed success or failure".
- Before each send, draw one random number from each variant's distribution.
- Send the variant with the highest draw.
- When the outcome is known, add 1 to that variant's reply count or non-reply count.
The randomness is the point. A variant with 4 replies out of 100 has a narrow distribution around 4-5%. A variant with 1 reply out of 10 has a wide one, so it sometimes draws a high number and gets another chance. As evidence piles up, losers stop winning draws on their own. The greedy approach uses the average; Thompson sampling "draws a random sample" from the distribution instead (Russo et al.).
Epsilon-greedy is simpler: with probability 1 minus epsilon (say 90%) send the current best, otherwise pick a variant at random. The tutorial's criticism is direct: it "wastes resources by failing to 'write off' actions regardless of how unlikely they are to be optimal." A dead variant keeps its share of the random 10% forever.
How many DMs or emails do you need per variant? (A/B sample size)
This is where outreach differs most from website testing. The standard two-proportion sample-size formula works like this in words: take the two reply rates you want to tell apart, square the gap between them, and divide the combined noise of both rates by that squared gap, scaled by constants for your confidence level (two-sided alpha 0.05) and power (80%). Small gaps between low rates need huge samples.
We ran that formula at reply rates typical of the range people discuss for outreach. The rates below are assumptions for the calculation, not benchmarks.
| Variant A reply rate | Variant B reply rate | Sends needed per variant | Total for a 2-way test |
|---|---|---|---|
| 4% | 6% | 1,863 | 3,726 |
| 6% | 8% | 2,554 | 5,108 |
| 4% | 8% | 553 | 1,106 |
| 5% | 10% | 435 | 870 |
| 10% | 15% | 686 | 1,372 |
Own calculation: two-sided alpha 0.05, power 80%, standard two-proportion formula. Rates are assumptions.
Read the table against your volume. At 50 sends a day, detecting a 4% vs 6% difference takes 3,726 sends, which is about 75 working days for a single pair of messages. Only big differences (a doubling, like 4% to 8%) are measurable inside a month. Most real copy changes produce smaller lifts than that, so a classic test at this volume will often end "inconclusive" after burning half your list on the weaker message.
That is where a bandit helps: you cannot afford to measure small lifts, but you can earn from them.
Worked example: 1,500 sends, three openers (illustrative)
To make the trade-off concrete, we simulated it. Everything here is an illustrative assumption, not data from any campaign: three openers with true reply rates of 4%, 6% and 8%, 50 sends a day for 30 days (1,500 sends), allocation updated once a day, uniform Beta(1, 1) priors, 2,000 simulated runs per method.
The fixed split is plain arithmetic: 500 x 0.04 + 500 x 0.06 + 500 x 0.08 = 20 + 30 + 40 = 90 replies (the simulation averaged 90.2). An oracle that knew the answer on day one would send all 1,500 to the 8% opener: 1,500 x 0.08 = 120 replies.
| Method (illustrative) | Avg sends to A / B / C | Avg replies | Best opener got most sends |
|---|---|---|---|
| Fixed equal split | 500 / 500 / 500 | 90.2 | n/a |
| Thompson sampling | 168 / 372 / 959 | 105.8 | 84.9% of runs |
| Epsilon-greedy (0.1) | 155 / 398 / 947 | 105.9 | 72.3% of runs |
| Oracle | 0 / 0 / 1,500 | 120 | always |
Thompson sampling earned 105.8 minus 90.2 = 15.6 extra replies, about 17% more than the fixed split, and recovered roughly half of the 29.8-reply gap between the fixed split and perfect knowledge. Epsilon-greedy averaged the same reply count here, but it was less reliable: in 27.7% of runs it did not end up favoring the best opener, against 15.1% for Thompson sampling.
This matches the pattern in Bytepawn's simulation of a 5% vs 6% funnel over 10,000 users, where Thompson sampling put "on average, 80% of users" in the better funnel and epsilon-greedy about 70%.
Why bandit reply rates look worse than they are
Here is the catch most dashboards hide. The reply rate a bandit reports for each variant is biased low. Nie, Tian, Taylor and Zou (2018) prove that when data collection adapts to earlier results, "sample means of the data have systematic negative biases." The mechanism: a variant that has an unlucky early run gets fewer sends, so its bad luck never gets averaged out.
Our illustrative simulation shows the same thing:
| Opener | True rate (assumed) | Thompson estimate | Epsilon-greedy estimate |
|---|---|---|---|
| A | 4% | 3.23% | 3.43% |
| B | 6% | 5.22% | 5.11% |
| C | 8% | 7.74% | 7.25% |
Power suffers too. In Bytepawn's runs, Thompson sampling reached a statistically significant result only "40% of the time, less than fixed A/B testing", which reached 59% (Bytepawn). The author's explanation: "Statistical significance is a function of the funnel with the lowest number of samples." In clinical trials, a simulation reported by Villar et al. (2015) found index-based bandit rules produced about 11 more successes than fixed randomization, but with power "roughly 3.5 times smaller", allocating about 16 participants to control against about 132 to treatment (as summarized by Koji).
Note: If you need a number you can quote, keep a fixed holdout. Route 10-20% of sends through an even split across live variants and compute reply rates only from that slice, or run a short confirmation A/B on the final two variants. The bandit handles the other 80-90% and earns the replies.
Delayed replies, drifting lists and other outreach traps
Website bandits get feedback in seconds. Outreach replies come in over days, and that breaks naive implementations in four ways.
Delayed rewards. If you update counts in real time, a message sent an hour ago looks like a non-reply. Fix it with a reply window: count a reply only if it arrives within a fixed window (72 hours is a reasonable method choice, not a rule), score only sends older than the window, and update the bandit in daily batches. Our simulation used daily updates for this reason. If your sequence has follow-ups, decide whether a reply to follow-up 2 credits the opener; our guide on how many follow-ups to send and when helps set that window.
Drift. Amplitude notes that bandits assume each variant's conversion rate stays consistent through the test. The Thompson sampling tutorial covers this under nonstationary systems (Section 6.3): as the algorithm converges, "the frequency of exploratory actions converges to zero" (Russo et al.), so it stops noticing change. Lists, seasons and deliverability all shift. Discount old counts (multiply them by something like 0.95 each day) or reset the bandit per campaign.
Segments. A winner for agency owners may lose with e-commerce founders. Pooling them hides both effects. Run one bandit per segment, or feed segment into the model, as you would when scoring leads by reply probability.
Reward definition. "Any reply" rewards curiosity and angry unsubscribes equally. Use positive replies as the reward, which means classifying replies as positive, neutral or negative before updating counts.
How to wire an LLM to generate and prune message variants
The reason bandits suddenly matter for outreach is that variants are now cheap. An LLM can write ten openers in a minute; you cannot afford to test ten openers with a classic split (see the sample-size table). A bandit plus a pruning rule turns that surplus into a working loop. Here is the full loop as steps:
- Brief. Write one brief per segment: audience, offer, proof you can legally state, banned claims, length limit.
- Generate. Ask the LLM for 3-5 variants that change exactly one thing (the hook, the CTA, or the length) and keep everything else fixed, so a winner tells you something. Our AI prompts for writing cold DM variants work as a starting point.
- Approve. A human reads every new variant before it goes live: claims, tone, compliance. No auto-publishing.
- Allocate. Each send asks the Thompson sampler which live variant to use. Keep 10-20% on an even holdout split if you want clean numbers.
- Send. Through a channel where automation is allowed (see the risk note below).
- Classify. An LLM classifier labels each reply positive, neutral or negative once it arrives.
- Update. Once a day, add positive replies and non-replies for sends older than the reply window; apply decay.
- Prune. Weekly, estimate each variant's probability of being best (draw 10,000 samples from each Beta and count wins). Retire any variant under about 5%. That threshold is a method choice; tighten it if you have more volume.
- Refill. Ask the LLM for new challengers seeded with the current winner, changing one element. Cap live variants at 3-5: at 50 sends a day, more arms means each gets too few sends to learn.
- Log. Keep every variant, its sends, replies and retirement date, so you can rerun a confirmation A/B on the final pair.
Steps 4 to 8 are a few hundred lines of code around your sending tool and a database. This is the kind of AI automation for outreach operations that pays off once the steps are stable, and steps 2, 6 and 9 are natural jobs for AI agents that generate and retire variants under human approval.
Warning: Do not run this loop on scripted Instagram cold DMs. Instagram's Terms of Use say you can't access or collect information "in an automated way without our express permission," and Meta's Account Integrity standard prohibits using accounts "through automated means, such as scripting" outside authorized routes. Automating cold DMs breaks those terms and risks the account, as the 2026 Instagram ban wave showed. Run bandits on your own email domains or on opted-in DM flows through an official API.
The algorithm is the easy part. The hard parts are the reply window, the reward definition and the human review step, and those decide whether the bandit learns anything useful. When you need that loop built into an app your team or your audience actually uses, that is the kind of custom app work Coldabry does.
FAQ
Is a multi-armed bandit better than A/B testing?
Neither is better in general; they answer different questions. A bandit maximizes results during the test by moving sends toward the leading variant, which is ideal when you have several variants, low volume and keep adding new ones. A fixed 50/50 A/B split maximizes statistical power for comparing two variants, so it is the right choice when you need a defensible lift number for one strategic decision. In a Bytepawn simulation, Thompson sampling sent about 80% of users to the better funnel but reached significance in 40% of runs, against 59% for a fixed split. Pick based on whether you value replies now or a clean answer.
When should you not use a multi-armed bandit?
Skip the bandit when you need an accurate effect size, for example to report a result or justify a big change in offer or positioning. Avoid it when replies arrive weeks later, because the algorithm keeps allocating on stale information, and when reply rates drift strongly during the campaign unless you add decay to old counts. It is also a poor fit when you care about several metrics at once, such as replies and booked calls, since a standard bandit optimizes one reward.
What is the difference between Thompson sampling and epsilon-greedy?
Thompson sampling keeps a probability distribution of each variant's reply rate, draws one random value from each before every send, and sends the variant with the highest draw. Uncertain variants get explored naturally, and clear losers stop getting sends. Epsilon-greedy sends the current best variant most of the time, for example 90%, and a random variant otherwise. It is simpler to build, but the Thompson sampling tutorial by Russo et al. notes it wastes resources because it never writes off variants that are very unlikely to be optimal. In our illustrative simulation, Thompson sampling favored the best opener in 84.9% of runs against 72.3% for epsilon-greedy.
How many sends per variant do you need for a cold email A/B test?
It depends on the reply rates you are comparing. With the standard two-proportion formula at 80% power and two-sided alpha 0.05, telling 4% from 6% takes about 1,863 sends per variant, and 6% from 8% takes about 2,554. Bigger gaps need far less: 4% vs 8% takes about 553 per variant, and 5% vs 10% about 435. At 50 sends a day, the 4% vs 6% test needs roughly 75 working days for just two variants. Small copy tweaks are usually unmeasurable at outreach volume.
Are the reply rates a bandit reports accurate?
No, they are biased low. Nie et al. (2018) proved that when data collection adapts to earlier results, sample means carry systematic negative bias. A variant with an unlucky start gets fewer sends, so its low early rate is never corrected. In our illustrative simulation with assumed true rates of 4%, 6% and 8%, Thompson sampling reported 3.23%, 5.22% and 7.74%. The ranking is usually right, but the numbers are not a clean measurement. If you need accurate rates, keep a 10-20% holdout on an even split and compute rates from that slice only, or run a confirmation A/B test on the final two variants.
Can I use a bandit to test Instagram cold DMs?
The algorithm works on any message channel, but automating cold DMs on Instagram breaks the platform's rules. Instagram's Terms of Use prohibit accessing or collecting information in an automated way without express permission, and Meta's Account Integrity standard bans using accounts through automated means such as scripting outside authorized routes. A bandit that picks which DM to send through a scripted account is exactly that kind of automation, and it puts the account at risk. Use bandit allocation on your own cold email domains, or on opted-in DM conversations through an official API, where automated sending is permitted, and keep manual Instagram outreach manual.