Sub topic 14
Measuring whether an AI feature helps
This chapter assumes you know what a campaign, a contact record, and a dashboard are, and that you have a rough idea of what a model does. It covers how to test whether an AI feature (subject-line generation, lead scoring, send-time choice) improves a business result. A feature that looks clever is not the same as a feature that helps.
Start with a baseline
A baseline is what you would have done without the AI feature. It might be your usual subject lines, a rule such as "call leads who requested a demo", or last quarter's manual forecast. Without a baseline, a number like "12% open rate" tells you nothing.
Pick the baseline before you start. A weak baseline makes any feature look good. A fair baseline is the best simple method your team already uses.
Use a holdout group
A holdout group is a random share of your audience that does not get the AI feature. It receives the baseline treatment during the same period as everyone else. Comparing the two groups shows the effect of the feature itself, apart from seasons, promotions, or list changes.
Random assignment matters. If sales reps choose which leads get AI scores, they will pick leads they already like, and the comparison will be biased.
Choose business metrics, not only model metrics
Model metrics describe the model. Business metrics describe the outcome you care about.
| Feature | Model metric | Business metric |
|---|---|---|
| Subject-line generation | Predicted open rate | Clicks and purchases per send |
| Lead scoring | Accuracy, AUC | Conversion rate of worked leads, rep time saved |
| Anomaly alerts | Precision of alerts | Time to detect real problems |
| Reply suggestions | Acceptance rate | Response time, customer satisfaction |
Open rates are a weak metric for email. Mail clients that preload images can count opens that no person made. Prefer clicks, replies, or revenue.
Check that the difference is real
Small groups produce random swings. Before you conclude the feature works, check whether the gap is larger than chance. The code below compares conversion counts in two groups with a two-proportion z-test.
from math import sqrt
def two_proportion_z(conv_a, n_a, conv_b, n_b):
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))
return p_a, p_b, (p_a - p_b) / se
# AI group: 260 conversions out of 4000. Holdout: 200 out of 4000.
p_ai, p_hold, z = two_proportion_z(260, 4000, 200, 4000)
print(f"AI: {p_ai:.3f} Holdout: {p_hold:.3f} z = {z:.2f}")
if abs(z) > 1.96:
print("Difference is unlikely to be chance (about 95% confidence)")
else:
print("Not enough evidence yet")A z value beyond about 1.96 in either direction suggests the difference is not chance. Here z is about 2.9, so the AI group's lift is credible.
Common errors
- No holdout. Comparing "before" and "after" mixes the feature's effect with everything else that changed.
- Stopping early. Checking daily and stopping when the result looks good inflates false wins. Set the sample size or duration in advance.
- Measuring the wrong thing. A subject line that raises opens but lowers purchases is a loss.
- Ignoring costs and harms. Count review time, unsubscribe rates, and complaints, not only gains.
- Never re-measuring. Data and customer behavior drift, so a model that worked last year may not now. Keep a small permanent holdout.
Exercise
A team turns on AI send-time optimization for all subscribers in March. Click rates in April are 15% higher than in February. The team says the feature works. Give two reasons this conclusion is weak and one change that would fix it.
Show answer
Other factors changed between February and April, such as seasonality, promotions, and list composition, and there was no comparison group, so the lift cannot be attributed to the feature. Clicks are also only one metric, and the team did not check unsubscribes or revenue. Fix: randomly hold out a share of subscribers who keep the normal send time during the same weeks, then compare click rate and revenue between the groups.
Exercise
A lead-scoring model reports 90% accuracy. Why is that not enough to say it helps the sales team, and what would you measure instead?
Show answer
Accuracy is a model metric, and it can be high even if the model adds nothing, for example when 90% of leads never convert and the model predicts "no" for all of them. Measure a business outcome against a baseline, such as the conversion rate and revenue of leads worked in score order versus a random or rule-based holdout group.