Design a customer churn prediction system
I was asked this
No reports yet. Sign in to say where you were asked it.
An AI/ML design interview question asked at Stripe. It tests classification, tabular ml and retention.
Design a system that predicts which business customers will stop using the product in the next 30 days, so account teams can step in while there is still time. The output is a ranked list of at-risk accounts with reasons, refreshed regularly.
Requirements
- Functional: a churn risk score for every active business customer for the next 30 days; the main reasons behind each score; a ranked list for account managers; measurement of whether acting on the list keeps customers.
- Non-functional: daily scores are enough; scores are calibrated enough to plan team capacity; explanations a non-technical account manager can act on.
Clarifying questions
- What counts as churn: cancelling the contract, usage dropping to zero, or volume falling by some percentage?
- How many customers, and how many can account teams contact each week?
- Are contracts annual (churn only at renewal) or month to month?
- What data exists: usage and transaction volume, support tickets, billing, product events, sales notes?
- What actions can the team take, and do they cost money (discounts)?
What a strong answer covers
- A precise label: for a snapshot date, did the customer churn in the following 30 days; building training rows from many past snapshots, with features computed only from data before each snapshot.
- Features: usage trends (level, slope, recent drop), breadth of product use, support tickets and their sentiment, payment failures, contract terms and renewal date, account age and size, seasonality.
- Model: gradient-boosted trees as a strong baseline, with calibration, and per-customer explanations from feature attributions turned into readable reasons.
- Evaluation: precision and recall at the team's capacity (the top N accounts), calibration, and time-based splits; segment results by customer size.
- Measuring impact: the score finds who will churn, not who can be saved; an experiment (or holdout) where some at-risk accounts get no outreach, and later uplift modeling to target persuadable customers.
- Pipeline: a daily batch job, a feature store, monitoring of feature drift and of score distribution, and retraining on a schedule.
Follow-ups
- Account managers ignore the list. How would you find out why, and what would you change?
- Large customers churn rarely but cost the most. How do you weight them?
- How would you model a customer who shrinks by 80% but does not cancel?
Where it's asked
What it tests
classification · tabular ml · retention
Sign in to see the worked answer
The full answer, chapter by chapter, with what interviewers expect at each level. New accounts get 5 credits: each one unlocks a question for good.
What the labs asked this week
A weekly email of what OpenAI, Anthropic and the other top AI labs asked engineers, round by round.
