Real-Time Card Fraud Scoring With Fresh Behavioral Features
Last updated: November 29, 2026
Quick Overview
Design an ML system for a fintech that must approve or decline card transactions within 100 ms, using a model fed by account history, velocity features from the last few minutes, device signals, and third-party identity data.
Chalk
November 29, 20260
0
0 solved
Design an ML system for a fintech that must approve or decline card transactions within 100 ms, using a model fed by account history, velocity features from the last few minutes, device signals, and third-party identity data.
Many Chalk customers are lenders and payment companies, and machine learning engineers there pair with customers to build exactly these pipelines. The interviewer looks for which features need streaming freshness, how labels arrive late, how to train without leakage, and what happens when a dependency times out mid-authorization.
What the Interviewer Expects
- Groups features by freshness requirement: static, daily batch, streaming, request-time
- Handles delayed labels (chargebacks) in training and evaluation
- Chooses metrics tied to business cost, such as dollar-weighted recall at a fixed decline rate
- Defines timeout and default behavior for each external dependency
- Plans shadow deployment and monitoring for drift and feature null rates
Key Topics to Cover
How to Approach This
- Start by mapping the business objective to a concrete ML objective and metric.
- Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
- Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
- Address the serving latency budget and whether batch or real-time inference is needed.
- Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
- Chargebacks arrive up to 90 days later. How does that affect retraining cadence and evaluation?
- How would you detect a coordinated fraud ring that individual velocity features miss?
- The identity vendor costs money per call. When would you skip it?
- How would you set the decline threshold and who owns it?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice ML System Design ProblemsSample Answer
Requirements
Decision under 100 ms end to end, so features plus model inference need to fit in about 50 ms. Thousands of transactions per second at peak. Fraud rate around 0.1 to 0.5 percent. Costs are asymmetric:...
High-Level Design
Request-time inputs (amount, merchant category, device fingerprint) arrive with the auth request. The feature platform resolves: account profile from the online store (daily batch: account age, credit...