Skip to main content

Designing A/B Experiments for New AI Customer Service Features

· 4 min read
Jack Ning
Maintainer of Bytedesk

After the new bot version launched, resolution rate rose 2 percentage points and the team cheered—until someone noticed a promotion was running in the same period and the new-user share had doubled. Were the 2 points the new feature's credit, or noise from user-mix changes? Without a controlled experiment, no conclusion of "metrics improved after launch" holds up.

This post is part of an experience-sharing series on "AI customer service product and engineering practice", drawn from hands-on practice at a global fast-fashion cross-border e-commerce platform. In this post I want to share how to design a scientific A/B experiment that verifies the real effect of a new AI support feature: group assignment, sample size, duration, core metrics, and guardrail metrics, plus how to rule out interference from user mix, scenario mix, and business fluctuation.

Illustration: A/B experiment traffic splitting with guardrail metrics

Four Key Points in Experiment Design​

  • Start from fundamentals: random assignment, control concepts, and the randomization unit decide validity up front.
  • Respect the statistics: sample size calculation, significance, and duration determination are not optional.
  • Split core and guardrail metrics: effect and side effects are read separately.
  • Control interference: Simpson's paradox, scenario-mix changes, and promo-season volatility each need explicit handling.

The Overall Design​

I would design the experiment across five aspects: grouping, sample, duration, metrics, and interference control.

Step 1: Group assignment​

  • Hash by user ID, not by conversation—so the same user always lands in the same group with a consistent experience, avoiding cross-contamination.
  • Randomness verification: after assignment, check that the two groups match on country, language, user value, and historical consultation volume.
  • AA test: when possible, run a null experiment first to verify the splitting system is unbiased.
  • Scoped experiments: if the feature affects only specific scenarios (say logistics inquiries), experiment only on traffic hitting those scenarios to boost sensitivity.

Step 2: Sample size and duration​

  • Sample size: compute the minimum from the core metric's baseline, expected lift, significance level (α=0.05), and statistical power (80%)—never set traffic by gut feeling.
  • Duration: at least one full 7-day cycle to remove weekday effects; avoid promos and holidays, or ensure both groups run concurrently.
  • No early peeking: do not stop early just because mid-experiment significance appears—complete the planned cycle; repeated interim looks inflate false positives dramatically.

Step 3: Metrics—core plus guardrails​

  • Core metrics: directly tied to the feature goal, such as bot resolution rate, first-contact resolution, satisfaction.
  • Guardrail metrics: guard against side effects—transfer rate, average conversation length, response time, complaint rate. If core metrics improve but guardrails worsen, do not launch.
  • Process metrics for attribution: feature usage rate and funnel stages explain "why it worked or didn't".

Step 4: Ruling out interference​

  • User mix: randomization plus stratified analysis—read results by country and scenario separately to prevent Simpson's paradox (overall trend contradicting every subgroup).
  • Scenario mix changes: concurrent groups cancel market-wide fluctuation; control for scenario composition in analysis and compare within scenarios.
  • Novelty effect: watch whether the lift decays over time; extend observation if needed.
  • Network effects: if bot improvements change human-agent workload across groups, cluster by support team.

The final decision does not rest on the p-value alone but on the business value of the effect size and guardrail performance—statistical significance does not mean business-worthy.

Practice in Bytedesk​

In the open-source Bytedesk customer service system (GitHub, website https://www.weiyuai.cn ), the conversation statistics and quality inspection modules supply the core and guardrail metrics experiments need (resolution, satisfaction, transfer rate); bot configuration supports gradually adjusting reception scope, providing the engineering basis for small-traffic pilots; channel- and scenario-sliced data supports stratified analysis.

Key Takeaways​

  • Split by user ID hash, not conversation; verify balance with distribution checks or an AA test.
  • Compute sample size with α=0.05 and 80% power—never pick traffic by intuition.
  • Run at least 7 days to remove weekday effects, avoid promo volatility, and never peek mid-experiment.
  • Core metrics measure effect; guardrail metrics prevent harm—worsened guardrails block launch.
  • Read results stratified by country and scenario to avoid Simpson's paradox; decide on business value, not just p-values.