← Questions

Design a customer churn prediction system

0
StripeAI/ML design

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

Your canvas
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing