Preparing your design workspace

Loading the problem and your latest saved attempt…

Design an Account Health Scoring Platform

Build a point-in-time ML platform that converts transaction history into a calibrated 0–100 cash-flow health score.

Problem statement

For this exercise, assume a financial-wellness product receives only five fields per posted transaction: customer ID, transaction ID, event datetime, signed amount, and free-text description.

It must publish one account-health score from 0 to 100 for each eligible customer and as-of time; this is a continuous score, not a class label.

Define the supervised target as whether the customer's next 30 days show cash-flow stress: total signed cash flow is negative by at least 20% of trailing 30-day positive inflow. Training labels and features must be derived only from the same transaction stream.

The served score is round(100 × (1 - calibrated stress probability)); higher is healthier. Design ingestion, deduplication, point-in-time features, label construction, training and calibration, daily scoring, low-latency serving, explanations, monitoring, promotion, and rollback.

Every score must name its as-of time, feature snapshot, model and calibration versions, and confidence or eligibility state. Customers with insufficient history, late or conflicting transactions, or failed features must remain explicitly pending or unavailable rather than receiving a neutral score.

The result is a wellness signal, not a credit decision, fraud verdict, balance estimate, or recommendation, and no external demographic, account-balance, merchant, bureau, or device data may be introduced.

What to build

  1. Ingest posted transactions idempotently, preserve corrections and late arrivals, and expose reproducible customer transaction windows from the allowed fields only.
  2. Build point-in-time feature and label datasets, train and calibrate a continuous cash-flow-stress model, and evaluate it without temporal leakage.
  3. Produce and serve versioned 0–100 scores with as-of time, confidence or eligibility state, and bounded reason codes derived from the same transaction evidence.
  4. Monitor data quality, drift, calibration, coverage, latency, and score stability, then promote or roll back immutable model releases while preserving historical scores.

At scale

  • For this exercise, assume 25 million active customers, 300 million posted transactions per day, and a peak arrival rate of 50,000 transactions per second.
  • For this exercise, publish scores for 99% of eligible customers by 06:00 UTC each day and serve the latest completed score within 150 milliseconds at p95.
  • For this exercise, transactions may arrive up to 48 hours late or be replayed; keep immutable transaction versions, feature snapshots, datasets, scores, and release evidence for 13 months.
  • For this exercise, target 99.9% monthly ingestion and score-read availability, but expose incomplete coverage and stale scores rather than silently substituting a default.