Skip to main content
How-To Guides 9 min read

How to A/B Test an AI Agent's Script

A 2026 study found a simulated-buyer AI test recovered only 39% of a real human effect. Here's how to A/B test an agent script that holds up.

Definition

A/B testing an AI agent's script means running two prompt versions on real leads and comparing one result, like booked calls. The agent can reword itself every run, which a human script never does.

Yes, you can A/B test an AI agent's script, the same way you would test a human SDR's call opener or a cold email subject line: write two versions, split real traffic between them, and compare which one produces more replies or booked calls. What changes is what can go wrong along the way. An agent regenerates its wording every time it runs, even from the identical prompt, which can quietly break the significance test you would otherwise trust without a second thought. A simulated buyer standing in for a real one, a shortcut many teams reach for because it is faster than waiting on live leads, does not reliably predict what a real person will do. And a small sales team running a new agent rarely has the lead volume to check the test daily without an early read fooling everyone watching the dashboard. None of that means skip the test. It means run it with the three differences below in view, and getting the speed-to-lead setup right matters more for an agent script than it ever did for a person, because the agent runs the winning version on every single lead starting the day you call the test.

What makes testing an AI agent's script different from testing a human one?

Testing an AI agent's script works the same way testing a human SDR's script does: write two versions, split real traffic between them, and compare one metric to see which wins. Three things are different about doing this with an agent instead of a person.

A person says roughly the same thing twice when not trying to vary it; an agent regenerates its wording every time, even word for word from the same prompt, which changes what a passing significance test actually proves. A human test only ever runs on real prospects; an agent test can be run against a simulated buyer first, which is fast and tempting but does not reliably predict what a real person does. And a human SDR's manager usually has a season of call volume to lean on; a sales team running its first agent script often has only a few weeks of real leads, which changes how long the test needs to run before a result means anything.

Each of those three gets its own section below, because each one has already produced a wrong call at a company running an agent for the first time: a "winning" script that only won because it happened to phrase the offer better on that particular run, a script that scored well against a simulated buyer and fell flat on real leads, and a test called a day too early because the early numbers looked too good to wait on.

Why can the same prompt produce a different script every time, and what does that do to a significance test?

Because an AI agent samples its next words from a distribution instead of reading a fixed line, the identical prompt on the identical lead can come back phrased two different ways. A human script never does that.

That variation is normally a feature: it is what lets the agent sound natural instead of robotic on every call. It becomes a problem the moment you run an A/B test, because the standard tests built for a human script, the sign test and the Wilcoxon signed-rank test among them, assume each version produces one consistent thing to compare, not a cloud of slightly different outputs every time it runs.

The fix: test for sensitivity to small wording changes, not just one run

A 2026 statistics paper on exactly this problem, Helm and Priebe, found that those two standard paired tests give invalid results once a prompt's output varies this way, and formally showed the conditions under which each one breaks. Their fix is a permutation test built to account for that variation directly, instead of ignoring it and hoping the noise cancels out. The practical version for a sales team without a statistics department: before trusting a "B beat A" result, run each version several times against the same lead profile and check how much the wording itself swings. A script whose core offer and call to action hold steady across runs, even while the small talk changes, is the kind of result a test can trust. A script whose substance shifts run to run is telling you the test needs more repetitions before it means anything, not that you found a winner.

Can a simulated buyer stand in for a real one in the test?

Only as a screen, not as the number that decides which script ships.

Running the test against a simulated buyer, another model playing the role of the prospect, is the fastest way to get an early read on a new script: no live leads burned on a weak variant, and a result in minutes instead of weeks. It is tempting for exactly that reason, but the real question is whether that result tells you anything about what an actual prospect will do.

Why a simulated buyer is not a stand-in for a real one

A 2026 paper by Persson, Schultzberg, and Ankargren examined exactly this question: when can an effect measured on an LLM's outputs stand in for the effect on real human outcomes? Their finding is that it can, but only under assumptions that have to be checked rather than assumed, and that a test run on real humans is valid by design, while one run on LLM-generated outcomes is valid only by assumption. In their own application, built on a large public archive of real headline experiments, the raw LLM-based version of the test recovered only 39% of the actual human effect; a calibration step that adjusts for the gap closed most of the difference, but the uncalibrated result alone would have badly understated what mattered to a real reader.

For a sales team, the translation is specific: a simulated-buyer test can tell you whether a script crashes outright, skips a required disclosure, or produces an obviously worse opening than the one it is replacing. It is a screen, not a verdict. The number that decides which script actually ships should come from the real leads the script will run on, even if that means a smaller, slower test than the simulated version promised.

How many real conversations do you need before you trust the result?

There is no fixed number. It depends on how big a difference you are trying to detect and how often the outcome you are measuring happens in the first place.

A script change that might move a 2% reply rate up to 3% needs far more traffic to prove than one that doubles a 20% reply rate, even though both are real, useful differences. A smaller team running its first agent script, with a few dozen or a few hundred leads a week, usually cannot detect a small improvement cleanly inside a month, and is better off picking a change big enough to show up at that volume, or accepting that the test will run longer than a single sprint.

The more common mistake than picking the wrong sample size is skipping the planning step entirely: deciding on the metric and the minimum improvement worth caring about before the test starts, not after looking at the numbers and deciding which difference feels big enough to matter. Measuring what an agent is actually doing before testing anything is the step that makes the rest of this worth doing; a script test run on top of a metric nobody agreed on in advance just produces an argument later, not a decision.

Why is stopping the test early riskier with an agent than with a person?

Because an agent can ship the "winning" script to every remaining lead the instant you call the test, with no gradual rollout to catch a mistake before it reaches everyone.

Checking a running test and stopping the moment it looks like a winner is a familiar temptation with any A/B test, human or agent, and it is already a well-documented problem. Johari, Pekelis, and Walsh showed that a standard significance test assumes the sample size was fixed in advance and the result checked only once; check it repeatedly and stop whenever it first crosses the significance line, and the test's real false-positive rate climbs well past the number on the dashboard, approaching near certainty if you are willing to keep checking indefinitely.

That makes the cost of calling a test a day too early immediate and total for an agent, where a human sales manager rolling out a script change gradually might still catch and correct a bad call before it reaches every lead. The researchers' own fix, a family of tests built to stay valid under continuous monitoring, is the technical answer; the practical version for a team without that tooling is simpler: set the sample size or the calendar date before the test starts, write it down, and treat any early "it's working" moment as a reason to keep collecting data, not a finish line.

Three questions to ask before you call a winner early

  • Did you decide the stopping point, by date or by sample size, before you saw any results?
  • Is the lead the result just showed up on part of the same segment and source mix as the rest of the test, or a lucky batch?
  • Would you trust this result if you had to explain the stopping decision to someone who was not watching the dashboard in real time?

What should you actually change between the A script and the B script?

One variable at a time, the same rule a human script test already follows.

Resist the temptation to ship two improvements in a single variant. If the combined version wins, you will not know which change actually did the work, and you will carry the wrong one into the next test. A script that differs in both its opening line and its objection handling is not one test. It is two tests wearing one name.

Four variables worth testing one at a time

  • The opening line, since the first sentence decides whether a lead keeps reading or hangs up before the agent reaches the actual offer.
  • How the agent responds to the first objection it hears, which usually matters more to the outcome than the opener once a lead is actually engaged.
  • The specific ask: booking a call directly versus offering a lower-commitment next step, such as a text reply or a short form.
  • The escalation rule: how long the agent keeps trying before handing the lead to a person, which changes how many borderline leads a human ever sees.

Pick the variable most likely to move the metric you decided on before the test started, not the one that is easiest to rewrite. A sales manager choosing between these four is doing the same job a sales manager has always done, deciding where attention goes before a quarter starts, just applied to a script instead of a territory list.

Who should own the decision to ship the winning script?

One named person, the same as any other sales decision that affects every lead going forward.

The US Bureau of Labor Statistics counted 637,080 sales managers employed nationally as of May 2025, earning a median hourly wage of $71.28, the role that already owns this kind of call at most companies small enough to be running a single AI sales agent rather than a dedicated experimentation team. Treating a script test as a technical artifact that ships itself once a dashboard turns green skips the step that actually matters: someone with sales judgment reading the winning script's real wording, not just its score, before every future lead gets it.

That review does not need to be heavy. Logging what the agent actually said on real leads during the test is what makes a five-minute review possible instead of a guess: read a handful of real transcripts from the winning variant, confirm the script still says what the business is actually willing to stand behind, and only then flip every lead over to it. If you want help setting up that kind of test around your own sales agent, your free Systems Plan covers what to measure before you change anything.

Methodology

This post on how to A/B test an AI agent's script draws on four sources. A 2026 statistics paper by Helm and Priebe (arXiv:2605.27463) shows that the sign test and the Wilcoxon signed-rank test give invalid results when an AI system's output varies across runs in a structured way, and proposes a permutation test as the fix. A 2026 paper by Persson, Schultzberg, and Ankargren (arXiv:2606.17165) supplies the finding that a test run on LLM outputs recovered only 39% of a real human effect in one application, and the broader argument that such a test is valid only under assumptions a human test does not need. Johari, Pekelis, and Walsh's "Always Valid Inference" (Operations Research, 2022; arXiv:1512.04922) supplies the peeking problem: checking a test repeatedly and stopping at the first significant result inflates the real false-positive rate well past the number the dashboard reports. The US Bureau of Labor Statistics' Occupational Employment and Wage Statistics for sales managers (May 2025) supplies the headcount and wage baseline for the role that already owns this kind of decision at most small businesses.

Questions and answers.

Can you A/B test an AI agent's script?

Yes. Write two versions of the script, split real leads between them, and compare one metric, such as replies or booked calls, the same way you would test a human script. The part that changes is how you read the result: the agent can reword the same script differently on every run, which can break a basic significance test unless you check how much the wording itself varies before trusting a winner.

Why does the same AI agent prompt produce different wording every time?

An agent samples its next words from a distribution rather than reading a fixed line, so the identical prompt on the identical lead can come back phrased two different ways. That is normally useful, since it keeps the agent sounding natural instead of robotic. A 2026 paper found this variation can invalidate the sign test and the Wilcoxon signed-rank test, two tests built for a script that stays the same wording every time, and proposed a permutation test built to handle the variation directly.

Can you trust a simulated buyer instead of real leads to test an agent script?

Only as a screen, not a verdict. A 2026 study found a test run against a simulated buyer recovered only 39% of the actual effect measured on real human outcomes, in one real application; a calibration step closed most of that gap, but the raw simulated result alone understated what mattered to an actual reader. A simulated-buyer test can catch an obviously broken script fast. The number that decides which script ships should come from real leads.

How many real conversations do you need before trusting an agent script test?

There is no fixed number. It depends on how big a difference you are trying to detect and how often the outcome happens: a change from a 2% to a 3% reply rate needs far more traffic to prove than one that doubles a 20% reply rate. A small team with a few hundred leads a week should pick a change big enough to show up at that volume, or accept the test will run for longer than one sprint, rather than guessing at a sample size.

Why is it riskier to stop an AI agent script test early than a human one?

Checking a test repeatedly and stopping the moment it looks like a winner inflates the real false-positive rate well past the number the dashboard shows, a problem documented for any A/B test. An agent makes an early stop more costly specifically because the winning script can go out to every remaining lead the moment you call the test, with no gradual rollout for a manager to catch and correct before it reaches everyone.

What should you change first when testing two AI agent scripts?

Change one variable at a time, the same rule a human script test already follows. The four most common choices are the opening line, how the agent responds to the first objection, the specific ask (a direct booking versus a lower-commitment next step), and the escalation rule for handing a lead to a person. Combining two changes into one variant means a win does not tell you which change actually did the work.

Sources.

  1. Helm, Priebe, When Prompt Perturbations Break Your A/B Test, arXiv:2605.27463, May 2026
  2. Persson, Schultzberg, Ankargren, A/B Testing with LLM-Generated Outcomes, arXiv:2606.17165, June 2026
  3. Johari, Pekelis, Walsh, Always Valid Inference, Operations Research 70(3), 2022, arXiv:1512.04922
  4. US Bureau of Labor Statistics, Occupational Employment and Wage Statistics, May 2025
Share this article:

The next step

Tell us the job this note is about.

If your team still does this work by hand, name the job and the tools it lives in. The first system we would build is in the email a few minutes later.

Keep reading

Related Articles

Download the AI Workflow Checklist

Get AI Systems Notes Delivered Weekly

Get practical notes on AI agents, workflow design, business memory, team routines, and the systems worth building.

No spam. Unsubscribe with one click.

For qualified teams
AI systems notes
Audit-first thinking