A/B Testing the Business Value of Agents: Assignment, Guardrails, and Statistical Decisions
A new logistics agent ran for a month, resolution rose 4 percentage points, and the team was about to celebrate—until someone noticed the month coincided with a mega-sale: inquiry volume tripled, human agents faced severe queues, and the control group's resolution was dragged into chaos by the promotion. Were those 4 points the agent's achievement or the sale's disorder? Nobody could tell. The strong cyclicality of logistics business (mega-sales, holiday peaks, off-seasons) makes "before-and-after comparison" almost always untrustworthy—which is exactly why A/B experiments matter so much in logistics scenarios.
This post is part of the "AI Customer Service Product and Engineering Practices" experience-sharing series, drawn from a practice review of an AI customer service product at a leading logistics company. In this post I want to share how to design the experiment grouping, core metrics, guardrail metrics, and statistical tests for validating the business value of a new AI agent through A/B testing, while excluding interference from logistics peaks, user structure changes, and business scenario differences.

Five Key Design Points in A/B Experiment Design
- Experiment design: randomization units, sample size, experiment duration.
- Metric design: distinguishing core metrics from guardrail metrics.
- Interference control: peaks, user structure, scenario differences, cross-group contamination.
- Statistical literacy: significance, confidence intervals, multiple comparisons, sequential testing.
- Decision rules: statistical significance + business significance + guardrails intact.
The Overall Design
The overall approach in one sentence: define hypotheses and assignment first, then core and guardrail metrics, stratify out peak interference, and expand only when all three decision lines pass.
Step 1: Define what to validate
Before the A/B test, state the hypothesis clearly: does the new agent genuinely raise true resolution and cut per-service cost, without hurting experience. Without a clear hypothesis, the experiment degrades into "run it and find whichever metric looks good".
Step 2: Assignment design and duration
- Randomization unit by user or session, preventing the same user from crossing groups; apply stratified randomization by scenario, region, user type, and logistics peak to keep group structures identical.
- Compute sample size from the minimum detectable effect in advance—don't discover halfway that the test is underpowered.
- Duration should span at least one full natural week, ideally including one peak—not to ride the peak's traffic, but to rule out novelty effects and represent peak scenarios.
Step 3: Separate core metrics from guardrail metrics
- Core metrics: true resolution rate, cost per service, satisfaction.
- Guardrail metrics: complaint rate, erroneous execution rate, timeout rate, NPS—a deteriorating guardrail is a veto; never trade resolution for complaints.
Step 4: Interference control is the crux in logistics
Stratify peaks separately; adjust user-structure changes with CUPED or covariates; run stratified analysis for scenario differences; exclude anomalous samples by predefined rules. Never cherry-pick samples by outcomes—deciding exclusions after seeing results is the most common form of experiment cheating.
Step 5: Statistics and decision rules
Significance tests plus confidence intervals; apply multiple-comparison correction for multiple metrics; don't peek before the sample runs its course. The final decision checks three lines: statistically significant, business significant, guardrails intact—expand only when all three hold; otherwise, iterate.
Practice in Bytedesk
In the open-source Bytedesk customer service system (GitHub, website https://www.weiyuai.cn ), the conversation statistics module slices volume, satisfaction, and transfer rate by channel and scenario, providing the data basis for post-grouping metric observation; complete records of bot and human reception support user-level grouping and controlled analysis; the quality inspection module enables manual sampling to confirm guardrail metrics (complaints, erroneous executions). Experiment assignment systems, CUPED covariate adjustment, and statistical power calculation are experiment-platform capabilities to be built separately on the business side following this post.
Key Takeaways
- Pre-register hypotheses, metrics, sample size, and decision rules before the experiment; "finding a good-looking metric afterwards" means no experiment was done.
- Randomize by user or session with stratification by scenario, region, user type, and logistics peak; span a full natural week.
- Keep core metrics (resolution, cost, satisfaction) separate from guardrails (complaints, erroneous execution, timeouts, NPS)—a deteriorating guardrail vetoes.
- Stratify peaks separately, adjust user structure with CUPED, exclude anomalous samples by predefined rules—never cherry-pick by outcomes.
- Three conditions to expand: statistically significant, business significant, guardrails intact—missing any one means going back to iterate.
