Sub topic 1
What personalisation at scale means
Prerequisites
This chapter assumes you can do the following:
- Use basic marketing or product terms such as campaign, channel, and conversion.
- Read tabular data and simple statistics, such as averages and rates.
- Read short Python snippets. The code here is small and uses only the standard library.
The chapter sets up the vocabulary and the working model for the rest of the tutorial. Later chapters cover data, segmentation methods, content, decisioning, and testing in detail.
From one message to many
Personalisation means changing what a person sees based on what you know about them or their situation. The change might be the subject line of an email, the products on a home page, or the offer in an app notification.
Doing this for ten customers is a writing task. Doing it for ten million customers is a systems task. "At scale" means three things:
- Automatic. No person decides what each customer sees. Rules, models, and templates decide.
- Repeatable. The same logic runs on every send or page view and gives the same result for the same inputs.
- Measurable. You can show that the personalised experience did better than a generic one.
Personalisation is not the same as segmentation, though the two are often confused. Segmentation groups customers who should be treated alike. Personalisation is the wider job of choosing and delivering the experience. Segments are one input to that choice. Others include real-time context, such as the time of day or the item in the basket.
Hand-built lists versus AI segments
Most teams begin with hand-built audience lists. A marketer writes a rule, such as "bought in the last 30 days and spent over 100", and exports the matching customers. This works, but it has limits.
| Aspect | Hand-built lists | Data-driven segments |
|---|---|---|
| Who defines the groups | A person, from experience | Rules, clustering, or predictive models |
| How many groups are practical | A handful | Dozens to hundreds |
| Update frequency | When someone remembers | On a schedule or as data changes |
| Risk | Stale or biased assumptions | Opaque groups, drift, hidden bias |
| Content workload | One message per list | Needs templates and modules to stay manageable |
The last row matters. If segments multiply and each needs hand-written copy, the writing work grows faster than the team. Scale therefore depends on the content side as much as on the segments. Dynamic content, covered in later chapters, lets one template serve many segments.
The personalisation loop
Every personalisation programme follows the same loop, whatever the tools. The tutorial's chapters map onto its stages.
- Customer data and consent. You collect behaviour, purchases, and profile fields, and you record what each person allowed you to use.
- Segments and features. You turn raw events into numbers, such as days since last purchase, and group customers by rules, clusters, or predictions.
- Decisioning. For each customer and moment, you choose which content to show. The choice might come from a fixed rule, a ranking of next best actions, or an adaptive method such as a bandit.
- Dynamic content. Templates and modules assemble the message, with safe fallbacks when data is missing.
- Measurement. You compare personalised customers with a held-out group to see the real effect, then feed what you learn back into the data and the segments.
The arrow from measurement back to data is what separates a programme from a one-off campaign. Without it, segments go stale and nobody notices.
A minimal example
The smallest useful version of the loop has a segment label, a lookup from segment to content, and a default. The following code runs as written.
DEFAULT_CONTENT = "Browse what is new this week."
CONTENT_BY_SEGMENT = {
"lapsed": "We saved your basket.",
"loyal": "Early access to the new range.",
}
def choose_content(customer):
"""Return content for a customer dict, falling back to a default."""
segment = customer.get("segment")
return CONTENT_BY_SEGMENT.get(segment, DEFAULT_CONTENT)
customers = [
{"id": 1, "segment": "loyal"},
{"id": 2, "segment": "lapsed"},
{"id": 3, "segment": None}, # not yet segmented
{"id": 4, "segment": "new_signup"}, # segment with no content yet
]
for customer in customers:
print(customer["id"], "->", choose_content(customer))Customers 3 and 4 are the important cases. One has no segment and the other has a segment that nobody has written content for. Both receive the default. This is the first rule of personalising at scale: every path must end in something acceptable to show. Real systems have many more such gaps than this toy does, so the default is what keeps a missing value from becoming a broken message.
Levels of personalisation
Personalisation is not a single technique. It ranges from coarse to fine, and each step costs more in data, engineering, and risk.
- Broadcast. Everyone gets the same message. This is the baseline you measure against.
- Rule-based segments. A few groups are defined by explicit conditions, such as country or purchase count.
- Model-based segments. Groups come from clustering, or from predicted scores such as likelihood to buy or to leave.
- Individual-level selection. Content is chosen per person and per moment, often from a pool of modules, using ranking or bandits.
- Generated content. A model writes or varies the content itself, within controls. This is the newest and least settled level.
Moving down this list is not always an improvement. A rule that says "show winter coats to customers in cold regions" may beat a complex model, because it is cheap, understood, and easy to fix. Pick the simplest level that gives a measurable gain.
Where personalisation goes wrong
The failure modes are worth knowing at the start, because later chapters build their controls around them.
- Thin or dirty data. If two records belong to one person, or a field is wrong, the personalisation is wrong and sometimes embarrassing. Identity is covered in the data chapter.
- No consent. Using data a person did not agree to use can break the law and damage trust. Consent is a design constraint, not a late check.
- Missing values. An empty first name that renders as "Hi ," is a template bug. Fallbacks prevent it.
- Unproven benefit. Personalised customers often convert more because they were likely to convert anyway. Only a comparison with a holdout group shows whether the personalisation caused the lift.
- Stale segments. Customers change. A segment built six months ago may describe people who no longer behave that way.
- Over-personalisation. Content that is too specific feels intrusive. Showing a customer evidence of tracking they did not expect can lose their goodwill even when the content is accurate.
Choosing what to personalise first
You cannot personalise everything at once, and you should not try. A practical way to pick a starting point is to ask four questions about each candidate.
- Is there a decision? There must be at least two plausible versions of the experience. If there is only one right answer, nothing needs personalising.
- Is there signal? You need data that plausibly predicts which version suits which customer.
- Is it measurable? There must be an outcome, such as a click, purchase, or renewal, that you can observe and attribute within a reasonable time.
- Is it safe to fail? A wrong guess in a promotional email costs little. A wrong guess in a credit decision or a health message costs a lot, and it falls under stricter rules.
A welcome email or a "we saved your basket" reminder usually passes all four. That is why many programmes start there.
What the rest of the tutorial covers
The following chapters follow the loop. They cover the customer data foundation and identity, then consent and privacy. After that come the three segmentation approaches, feature engineering, clustering, and predictive segments. The content half covers templates, modular content with fallbacks, and decisioning. The final chapters cover experimentation, measuring incremental lift, generative content, segment operations, and governance. The Python examples use pandas, scikit-learn, and Jinja2 where a library is useful.
Exercise
A retailer emails a "win-back" offer to customers who have not purchased in 90 days. Those customers convert at 4%, against 1% for the rest of the list. A colleague says this proves the personalised offer works. Name the flaw in this reasoning and describe what you would do to test the claim.
Show answer
The comparison is between two different groups of people, not between treated and untreated versions of the same group. Lapsed customers may differ from active ones in many ways, and some may have returned without the offer. To test the claim, take the lapsed segment and randomly hold out a share, for example 10%, who receive no win-back offer. Compare conversion between the treated and held-out lapsed customers. The difference between those two rates is the incremental lift.
Exercise
In the choosecontent example, customer 4 has the segment "newsignup", which has no entry in CONTENTBYSEGMENT. What does the function return, and why is that behaviour desirable at scale?
Show answer
It returns DEFAULT_CONTENT, because dict.get falls back to the second argument when the key is missing. This is desirable because segments and content are created at different times by different people. A new segment will often exist before its content does, and the default keeps every customer's experience valid in the meantime.