Sub topic 14
Measuring whether an AI feature helps
This chapter assumes you know what a campaign, a contact record, and a dashboard are. It also assumes you have a basic idea of what a machine learning model does. You do not need statistics beyond averages and percentages.
An AI feature can look impressive and still change nothing. A subject-line generator produces fluent text, a lead score produces a number between 0 and 1, and a draft assistant saves clicks. None of that shows that the business is better off. This chapter covers how to test that claim with a baseline, a holdout group, and the right metrics.
Why "it seems to work" is not evidence
Three effects make AI features look better than they are.
- Selection effects. If the AI picks the leads it likes best, those leads were probably going to convert anyway. A high-scoring lead who buys did not necessarily buy because of the score.
- Time effects. Sales rise in November and fall in August. A feature launched in October will appear to work regardless of what it does.
- Novelty effects. Recipients open an unusual subject line once. The lift fades as the style becomes familiar.
You need a comparison that removes these effects. That comparison has two parts: a baseline and a holdout.
Baseline: what would have happened without the feature
A baseline is the result you get without the AI feature. It can take several forms.
| Baseline type | Example | Use when |
|---|---|---|
| Previous process | Subject lines written by the marketing team | A human process already exists |
| Simple rule | Score leads by "requested a demo" only | You want to know if a model beats a simple rule |
| Historical average | Last quarter's reply rate | Nothing else is available (weakest option) |
| Random choice | Send at a random time of day | Testing send-time optimization |
Choose the strongest baseline that is realistic. A predictive score that beats random guessing is not impressive. A score that beats a one-line rule such as "demo requested" is worth paying for. If a simple rule performs almost as well, you have a cheaper and more explainable option.
Holdout: a group that does not get the feature
A holdout group is a random subset of contacts, accounts, or sessions that is deliberately kept from receiving the AI feature. You compare it with the group that did receive it. Because assignment is random, the two groups differ only by chance and by the feature.
Practical rules for holdouts:
- Randomize by the right unit. For email, randomize by contact. For a sales feature, randomize by rep or account, not by individual deal. Otherwise one rep's habits leak between groups.
- Decide the split before launch. A 90/10 or 80/20 split is common. A smaller holdout is cheaper but needs more time to detect a difference.
- Keep the holdout in place. Do not give holdout contacts the feature halfway through because the early results look good.
- Run groups at the same time. Concurrent groups share the same season, promotions, and news.
Some platforms provide A/B testing for subject lines and send times. Those tests are holdouts in miniature. Check that the platform's "winner" is chosen on your metric, not only on opens.
Choosing metrics at three levels
Measure a feature at several levels, because a good model metric can sit beside a bad business result.
| Level | What it tells you | Examples |
|---|---|---|
| Model quality | Is the prediction or output accurate? | Precision, recall, AUC for lead scores; error of a forecast |
| Workflow | Does it change how people work? | Minutes to write a draft, share of drafts edited, time to first reply |
| Business outcome | Does it change results that matter? | Revenue per contact, win rate, unsubscribe rate, qualified pipeline |
The business outcome is the deciding level. The other two explain why the outcome moved or failed to move.
Pick metrics that resist gaming
Open rate is the classic weak metric for email. Mail privacy features in some email clients load images automatically, which counts as an open without a human reading anything. Prefer clicks, replies, conversions, and revenue. Also track guardrail metrics, which are things that must not get worse. Examples are unsubscribe rate, spam complaints, and customer satisfaction. A subject-line model that raises opens by writing clickbait may also raise unsubscribes.
Evaluating a predictive model
Predictive features such as lead scoring need a model-level check before any holdout test. The key rule is to evaluate on data the model did not train on.
import numpy as np
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import precision_score, recall_score, roc_auc_score
from sklearn.model_selection import train_test_split
rng = np.random.default_rng(0)
n = 400
demo = rng.integers(0, 2, n)
free_email = rng.integers(0, 2, n)
views = rng.integers(0, 8, n)
X = np.column_stack([demo, free_email, views])
# Synthetic outcome: demo requests and page views raise conversion odds
logit = -2.5 + 1.8 * demo - 0.6 * free_email + 0.35 * views
y = (rng.random(n) < 1 / (1 + np.exp(-logit))).astype(int)
X_train, X_test, y_train, y_test = train_test_split(
X, y, test_size=0.3, random_state=0, stratify=y
)
model = LogisticRegression().fit(X_train, y_train)
probs = model.predict_proba(X_test)[:, 1]
preds = (probs >= 0.5).astype(int)
# Baseline: a one-line rule using only "requested a demo"
rule_preds = X_test[:, 0]
print(f"Model AUC: {roc_auc_score(y_test, probs):.2f}")
print(f"Rule AUC: {roc_auc_score(y_test, rule_preds):.2f}")
print(f"Model precision: {precision_score(y_test, preds):.2f}")
print(f"Model recall: {recall_score(y_test, preds):.2f}")Read the output this way:
- AUC measures how well the score ranks converters above non-converters. 0.5 is a coin flip and 1.0 is perfect.
- Precision is the share of leads flagged as likely to convert that actually converted.
- Recall is the share of all converters that the model flagged.
Compare the model's AUC with the rule's AUC. If the gap is small, the model adds little. Because the data here is synthetic, your absolute numbers say nothing about a real CRM. The pattern of comparing against a rule is what carries over.
Comparing the holdout result
Once the test has run, compare the groups and ask whether the gap could be chance. This code compares conversion rates with a two-proportion z-test.
from math import sqrt, erf
def two_proportion_test(conv_a, n_a, conv_b, n_b):
"""Return the lift of group A over group B and a two-sided p-value."""
p_a, p_b = conv_a / n_a, conv_b / n_b
pooled = (conv_a + conv_b) / (n_a + n_b)
se = sqrt(pooled * (1 - pooled) * (1 / n_a + 1 / n_b))
z = (p_a - p_b) / se
p_value = 2 * (1 - 0.5 * (1 + erf(abs(z) / sqrt(2))))
return p_a - p_b, p_value
# Treatment: AI send-time optimization. Holdout: fixed 9am send.
lift, p = two_proportion_test(conv_a=540, n_a=18000, conv_b=270, n_b=9000)
print(f"Lift: {lift:.4f} p-value: {p:.3f}")
lift, p = two_proportion_test(conv_a=620, n_a=18000, conv_b=270, n_b=9000)
print(f"Lift: {lift:.4f} p-value: {p:.3f}")The first call shows no difference: both groups convert at 3.0 percent. The second shows 3.44 percent against 3.0 percent, and a small p-value. A p-value is the probability of seeing a gap at least this large if the feature truly had no effect. A small value, commonly below 0.05, suggests the gap is not chance. It does not tell you the gap is big enough to matter. Report the lift and its cost-benefit alongside the p-value.
Edge cases and common errors
- Peeking. Checking results daily and stopping when the p-value dips below 0.05 inflates false positives. Set the duration or sample size in advance.
- Small samples. A holdout of 50 contacts cannot detect a one-point lift. Estimate the needed sample size before the test.
- Contaminated holdouts. If holdout contacts are also reached by a different AI-driven campaign, the comparison is muddied. Keep exclusion lists consistent across tools.
- Feedback loops. If a lead score decides who gets sales attention, high-scored leads receive more effort and convert more, which seems to confirm the score. A holdout where scores are hidden from reps breaks this loop.
- Data drift. Customer behavior changes, so a model that tested well last year may degrade. Re-run the evaluation on a schedule.
- Survivorship in generated content. Judging a drafting assistant only by drafts that were sent ignores drafts that were discarded. Track acceptance rate and edit distance too.
- Segment differences. An average lift can hide a harm to one group, such as a region or a language. Break results out by segment.
- Measuring generative output. There is no single accuracy number for a draft. Use human rating on a sample, checks for factual errors against the source data, and downstream replies.
A short checklist
- State the decision the feature supports and the business metric it should move.
- Pick the strongest realistic baseline.
- Evaluate any predictive model on held-out data against a simple rule.
- Randomize a holdout and fix its size and duration in advance.
- Track workflow metrics and guardrail metrics.
- Compare groups with a significance check, then weigh the lift against the cost.
- Break the result out by segment and repeat it on a schedule.
Exercise
A CRM vendor reports that reps who follow its AI "next-best-action" suggestions close 25 percent more deals than reps who ignore them. Why is this not good evidence that the feature works, and what test would you run instead?
Show answer
Reps who follow suggestions are a self-selected group. They may be more disciplined or have better territories, so the gap can come from who they are rather than from the suggestions (a selection effect). Instead, randomly assign reps or accounts to a treatment group that sees suggestions and a holdout that does not. Run both at the same time, compare win rate or revenue per rep, check the gap for significance, and track guardrails such as customer satisfaction.
Exercise
A subject-line generator raises open rate from 22 to 27 percent in an A/B test, but unsubscribes double. What should you conclude, and which metrics would you use to decide?
Show answer
Do not call it a win yet. Open rate is a weak metric because it can be inflated by automatic image loading and by curiosity-driven subject lines, and the doubled unsubscribe rate is a guardrail failure. Decide on clicks, conversions, or revenue per contact over a longer window, with unsubscribe and spam-complaint rates as guardrails. If revenue per contact does not rise or list health worsens, keep the baseline.
Exercise
In the AUC example, the model scores 0.78 and the one-line "requested a demo" rule scores 0.74. Is the model worth adopting?
Show answer
Probably only if the 0.04 gain converts into measurable value. The gap is small, so the simple rule is cheaper and easier to explain. Test the difference on held-out data with more than one split, then run a holdout test on a business metric such as win rate to see whether better ranking changes outcomes.