Guide: Compare a challenger rule set
You have a new version of a decision tree and you believe it is better. This guide takes you from
that belief to evidence, and only then to live traffic.
Labs gives you exactly three ways to compare a challenger version against the champion —
the version production runs today. They differ in one thing: who bears the risk while you learn.
| Test | What it does | Who is affected |
|---|---|---|
| Backtest | Replays the challenger against applications that were already decided. | Nobody. Nothing live is touched. |
| Shadow test | Runs the challenger beside the live decision on new traffic and records what it would have decided. | Nobody. The applicant still gets the live decision. |
| A/B test | Splits live traffic between champion and challenger. | Real applicants. The challenger's decision is the one they get. |
There is no fourth kind. Work down the table: backtest first, shadow next, A/B only when the first
two agree that the challenger is better.
Before you start
- A published decision tree with a default version. Both the champion and the challenger
must be published versions of a tree that has a default — Labs will refuse anything else. If you
have only a draft, publish it withdecision_trees_submit_versionand
decision_trees_set_default_versionfirst. - The tree's session UUID, from
decision_trees_list. - For an A/B test: a Live connection, and a decision from whoever owns the risk.
The prompts below are what you type. The tool noted underneath each is what your assistant runs.
Step 1 — Know what you are comparing
List the versions of decision tree
<tree-uuid>.
Tool: decision_trees_list_versions
You need two version numbers: the default (your champion) and the one you want to prove (your
challenger). Everything downstream is stated in those terms.
Step 2 — Replay history first
Create a backtest called "Q1 income rule" and replay version 4 of
<tree-uuid>over the last
90 days, sampling 500 applications.
Tools: labs_create, labs_configure_backtest
A backtest is free evidence: it decides nothing, it only re-runs the challenger over applications
whose outcome you already know. Pick a window that actually contains traffic this tree decided —
if it does not, starting the test fails with No matching AppDecisions found.
Start it.
Tool: labs_start
The sample is drawn and the replay is queued. Nothing live changes.
Step 3 — Read the comparison
How does the backtest look?
Tool: labs_get
results.champion and results.challenger are outcome distributions over the same applications —
Approve, Decline, Review, Request Docs — one count per application. A challenger that approves 8%
more of the same applications is telling you something concrete.
Show me the applications where the two disagreed.
Tools: labs_list_application_results, labs_get_application_result
The rows carry both sides' decisions per application; the detail call adds the full decision and
offer payloads and a summary reducing each side to tree, version, action, and outcome. All of it
is PII-filtered — you are comparing rule behaviour, not people.
If the challenger is worse here, stop. Fix the tree and publish a new version.
Step 4 — Watch it on real traffic, safely
Create a shadow test for version 4 of
<tree-uuid>, running for the next two weeks.
Tools: labs_create, labs_configure_shadow, labs_start
A shadow test answers the question a backtest cannot: how does the challenger behave on traffic
it has never seen? Every application is still decided by the live version — the shadow version
runs alongside and only its result is recorded. default_trees defaults to each tree's current
default version, which is what you want unless you are deliberately comparing against something
other than production.
Read it the same way as Step 3.
Step 5 — Only now, split live traffic
Set up an A/B test: champion version 3, challenger version 4 of
<tree-uuid>, 90/10, for two
weeks starting Monday.
Tools: labs_create, labs_configure_ab
Two rules the tool enforces before anything is sent: the split must sum to 100, and both sides must
be versions of the same decision tree — an A/B test routes each application to one version of
one tree, it does not compare two different trees.
Start small. 90/10 exposes a tenth of your applicants to the challenger while still producing a
usable comparison.
Start it.
Tool: labs_start
This one is real. From this moment, applications routed to the challenger get the challenger's
decision. Your assistant will say so and ask you to confirm; that is deliberate. Confirm only if
you own that risk.
Step 6 — Finish, or stop early
How is the A/B test doing?
Tool: labs_get
Check it early and often. If the challenger is behaving badly:
Cancel it — the challenger is declining far too much.
Tool: labs_cancel
Cancelling stops the split immediately and records your reason, which is the only note of why the
test was abandoned. If instead it has simply seen enough:
End the test.
Tool: labs_end
Ending marks it completed and returns all traffic to the champion. Results stay readable either
way. Neither can be undone — a finished lab cannot be restarted, so a corrected test means a new
one.
Step 7 — Promote the winner
If the challenger won, make it the champion:
Set version 4 as the default for
<tree-uuid>.
Tool: decision_trees_set_default_version
Ground rules worth remembering
- Champion and challenger are always published decision trees with a default version. Nothing
else can be tested. - A running test cannot be reconfigured. End or cancel it first, or create a new lab.
- An A/B split always sums to 100, across two versions of one tree.
- A backtest window must contain applications the tree actually decided.
- A shadow test never changes a live decision. That is the entire point of it.
See also
Updated about 14 hours ago

