Pricing Academy Blog

AI A/B testing with your funnel stats

Let an AI agent read the split-test results and your funnel numbers, then propose the next test. The app computes the statistics, you pick the winner, and the agent reads, writes and builds.

Illustration: two page variants under a bar chart, and the monitor mascot holding a magnifying glass up to the chart
The short answer

AI A/B testing means using an AI model for the work around a split test: reading results, explaining them, proposing the next hypothesis and building the variant. It should not mean letting the model do its own statistics.

With ElasticFunnels, an agent such as Claude Code or Codex reads the test with ef stats split, which reports the significance result the app computed, and the funnel with ef stats. It proposes one next test, you approve it, and it builds it under the same URL.

I like AI agents for the work around a split test, and I keep them well away from the maths. A model asked to judge six sessions can talk itself into a winner, and it will explain that winner very convincingly. The app already computes significance the same way every time. So the agent reads, explains and builds, and a person decides what ships.

Who does what

Split the job so each part is done by the thing that is good at it. Get this table right and most of the rest is plumbing.

JobWho
Assign visitors to variantsThe ElasticFunnels server
Count sessions, sales and revenue per variantThe server
Compute significanceThe server: a fixed-horizon z-test, Bonferroni with 3+ variants, flagged below the minimum sample
Read the result and explain itThe agent
Look for the next idea in the breakdownsThe agent
Pick the winner and approve the next testYou
Illustration: four pills in a loop, a bar chart, a lightbulb, a new page and a branching arrow
Read the result, form one hypothesis, build one variant, split the traffic, then read again.

Step 1: give the agent the why

The server knows the numbers of each test, not what it was for. Keep a split-tests.md in the project with the test id, the hypothesis, which variant is the control and what a win means. The Claude Code walkthrough writes the first entry. The ef-stats skill that ef init installs tells the agent to read that file before it reports on a test. It's the most boring file in the project, and the one I'd least want to lose, because a test result without its hypothesis is just a number.

Step 2: read the result

List the tests, then read one:

ef stats splits
ID   NAME                                    TYPE        STATUS   TARGET                  VIEWS
526  Sleep advertorial: 3 a.m. vs 30 nights  split_test  running  Demo Sleep Advertorial  0

ef stats split 526 --metrics sessions,conversion_rate,revenue --range 30d

The output is a table per variant plus a result line. This one had only our test visits:

VARIANT              SESSIONS  CONVERSION_RATE  REVENUE
A: 3 a.m. (control)  3         0.00%            $0.00
B: 30 nights         3         0.00%            $0.00

p-value  —   power —
No winner yet — not enough data to score this test.

There are three possible results, and the agent should report each one differently:

  • A variant is significant and every arm has its sample. Report it with the p-value and the lift over the control, as a candidate for you to decide on.
  • Not significant yet, but the p-value looks low. The test is trending, not conclusive: the sample floor isn't met yet. A low p-value on a small sample is what stopping too early looks like. Report how many more sessions each arm needs.
  • Not enough data. Say so and keep the test running.

The second case is the one I'd teach an agent to be most careful with. A low p-value on a small sample reads like good news, and it's exactly the moment a tired person ships a false winner.

If a variant shows up as j:null or blank, the graph's nodes have no codes and the visitors were never really split. That test has no result; re-push it through the CLI, which adds the codes, and start again.

Step 3: read the funnel around the test

The next idea usually comes from the breakdowns. The agent can see which metrics your brand tracks with ef stats metrics and which dimensions it can group by with ef stats fields, then ask:

ef stats --range 30d
ef stats by utm_source -m revenue,sessions,conversion_rate
ef stats by device -m sessions,conversion_rate
ef stats by page -m revenue,sessions --limit 10
Terminal running ef stats by utm_source with revenue, sessions and conversion rate for the last 7 days: facebook, google, youtube, newsletter and tiktok
A real ef stats by utm_source run on our demo brand (demo data).

Four rules keep the agent's reading honest. The ef-stats skill teaches all four:

  1. State the range and the timezone. Days are counted in a timezone; pass --tz or set it once with ef config set analyticsTz America/New_York.
  2. Unavailable is not zero. A metric your brand doesn't track is listed as unavailable.
  3. "Change" is against the previous period of the same length, not last year.
  4. Check the row count. --limit cuts the table and says so, and the blank utm_source row is direct or untagged traffic.

Rule two matters more than it looks. An agent that reads "unavailable" as zero will write you a confident paragraph about a metric that was never tracked.

Step 4: ask for one next test

Give the agent a clear brief and ask for a proposal, not a change:

Read split-tests.md and the result of split test 526 for the last
30 days, in America/New_York. Then look at conversion rate by device
and by utm_source. Propose ONE next test: the hypothesis, the single
change, the control, and what would count as a win. Don't build it yet,
and don't call a winner: report the result and leave that to me.

A useful proposal is short and testable: one change, tied to something in the numbers, with a win condition you can check with the same command later. If the agent suggests five changes at once, ask for one. A test that changes everything can't tell you what worked. I'd rather get one testable idea a week than five clever ones on a Monday.

Step 5: build it, record it, ship the winner

Once you approve, the agent builds the variant and wires the test exactly as in the advertorial walkthrough: a new page, a Split Test node under the same URL, validate, push. Then it appends the new test to split-tests.md.

When each arm has reached the planned sample and a variant is significant, the decision is yours. Mark it in the app: open the page's events and use Mark as Winner on that arm (or run ef splits winner from the CLI). Every visitor then gets the winning page at the same URL, and the ads never change. In ElasticFunnels the winner is a button a person presses, and I think that's exactly where it belongs.

The ElasticFunnels Page Events canvas: a Split Test node with two Traffic Distribution nodes at 70 and 30 percent, each with a Mark as Winner button
The split test in the app's Page Events canvas (demo data). Mark as Winner sends all traffic to that arm.

More on how to size and judge a test in split testing landing pages under one URL, and everything an agent can do with your funnel on the AI marketing agents page.

My take
  • I'd never paste raw numbers into a chat and ask a model "is B winning?". It will answer, and the answer will sound right.
  • Don't give an agent the power to end a test. Reading and building are cheap to undo; shipping a false winner to all your traffic isn't.
  • Push back on a proposal that arrives with five changes. Ask what in the numbers points to each one.
  • If a result surprises you, check the date range and timezone before you check the page.

The agent is fast, patient and happy to read a breakdown table at midnight. Let it do the reading and the building. Keep the judgment for yourself, and you get more tests out of the same week without fooling yourself any faster.

FAQ

AI A/B testing FAQ

What is AI A/B testing?

Using an AI model to do the work around a split test: reading the results, explaining them, proposing the next hypothesis and building the variant. The significance statistics should still come from the testing platform, not from the model, and picking the winner stays your call.

Can the AI declare the winner?

No. The app computes the statistics: a fixed-horizon two-proportion z-test on conversion rate, with a Bonferroni correction when you run 3 or more variants, and results flagged until each variant reaches its minimum sample. ef stats split reports that result, and the ef-stats skill tells the agent never to compute its own. Choosing the winner stays with you: Mark as Winner in the app.

How long should a split test run?

Until each variant reaches the sample size you planned before launch (the A/B test sample size calculator gives it), and for at least one full week so weekdays and weekends are both in it. Stopping on an early low p-value is the most common way to ship a false winner.

What data can the agent read?

Whatever ef stats metrics lists for your brand: revenue, sessions, conversion rate, AOV, refunds and more, broken down by page, product, country, device, UTM parameters or day. A metric the brand doesn't track is reported as unavailable, not as zero.

Does the agent change my ads based on the result?

No. It works on pages and tests. Because the test runs under the URL your ads already use, the ads don't need to change when you ship the winner.

Let an agent read your next test

Same-URL split tests with the significance result in your terminal. Start a 14-day free trial.