Single logo
  • Courses
  • Blog
  • About
Join free on SkoolJoin free on Skool

Learning path · 13 steps

Prepare for ML Engineer Interviews
  1. 1
    The ML Engineer Interview Loop: Five Rounds, What Each One Looks For, and a Simple Rubric
  2. 2
    The Answer Framework for Technical Interviews: Five Moves, Scored Out of 24
  3. 3
    From Symptom to Pattern: How to Answer "Which Pattern Would You Use?" in an Interview
  4. 4
    The ML System Design Framework: Eight Steps, in Order, on a Spam Filter
  5. 5
    ML System Design Interview: Fraud Detection for Card Payments, in Eight Steps with Numbers
  6. 6
    ML System Design Interview: A Recommendation Feed, From a Score to Beat to Online Guardrails
  7. 7
    ML System Design Interview: Ad Click Prediction, Sparse Features, Calibration and Late Clicks
  8. 8
    Interview Answer: How Do You Roll Out a New Model Safely When True Labels Come Weeks Later?
  9. 9
    Mock ML Engineer Interview, Scored: A Rollout Question Where the Labels Arrive Weeks Late
  10. 10
    The ML Coding Round: K-Means, Logistic Regression and a Top-k Metric From Scratch
  11. 11
    The ML Depth Round: Five Questions That Always Come, in Thirty Seconds Each
  12. 12
    Presenting Your Portfolio: A Six-Section README That Shows Evidence, Not Buzzwords
  13. 13
    Reading a Job Ad and Shaping Your CV: A Gap List and CV Lines You Can Stand Behind
  1. Blog
  2. /
  3. Machine Learning
  4. /
  5. ML Engineer Interviews

Learning path: Prepare for ML Engineer Interviews · Step 5 of 13

ML System Design Interview: Fraud Detection for Card Payments, in Eight Steps with Numbers

A full interview answer to "design a fraud detection system for card payments": a do-nothing model at 98.8% accuracy that catches 0 of 71 frauds, a cost metric, a cut-off that moves cost from 7100 to 6610, a 50 ms budget and a rules fallback.

Chaand Sheikh

·27 November 2026ML Engineer Interviews

What you will learn

  • Answer "design a fraud detection system" through all eight design steps
  • Show why accuracy fails at 1.3% fraud and price the mistakes instead
  • Explain how the cut-off alone moves the cost, and say what the model still misses
  • Size serving against a 50 ms budget and show why a rules fallback removes errors but not risk

Before you start

  • The ML System Design Framework
  • Why Accuracy Lies: The Confusion Matrix

The question: design a fraud detection system for card payments. We'll take it through the same eight steps from the ML system design framework: goal, metric, data, features, model, serving, monitoring and failure.

If you've built the fraud scorer in the Fraud Scoring series, you have something most candidates don't: you can say "when I built this, here's what I found". One thing to be clear about: the numbers in this article come from a small simulation on synthetic data, and the costs are for illustration. In your interview, use the numbers from your own project.

Step 1: the goal

Think of airport security. Wave everyone through, and the danger walks in. Stop everyone, and nobody catches a flight. Both are terrible. So the goal is: stop fraud without holding up honest customers.

Step 2: the metric

Why not accuracy? In our synthetic data about 1.3 in every 100 payments is fraud. A model that allows every single payment scores 98.8% accuracy. There were 71 frauds in the test set, and it caught zero. So accuracy can't be our metric (see Why Accuracy Lies).

We put a price on each mistake instead. For illustration, one analyst review costs 10 and one missed fraud costs 100:

cost = reviews × 10 + misses × 100

Now the metric is total cost. The method is the same one as in The Cost of Being Wrong.

Step 3: the data

Two things make this data hard. First, fraud is rare: that 1.3 in 100. Second, labels come late. You often find out a payment was fraud only when the customer complains, which can be weeks later, so your freshest data isn't fully labelled yet (When Labels Arrive Weeks Late).

Step 4: the features

Think of a bank teller who remembers how many times this card was used in the last hour. A single payment looks normal; the pattern around it gives it away. So we use things like the amount, a new device, and how often this card has been used lately.

Every one of them has to be ready at the moment the payment comes in, and calculated the same way as in training. That's point-in-time correctness and avoiding training-serving skew.

Step 5: the model and the cut-off

Start simple. In our simulation it's a logistic regression: quick to score and easy to explain.

Here's the part people skip. The model only gives a score; we still have to pick a cut-off.

The cut-off alone moved the cost Total cost on the test set (lower is better) Flag nothing Cut-off 0.5 Cut-off 0.15 7100 6920 6610 Same model each time. Synthetic data, illustrative costs.
Flagging nothing pays for all 71 misses. The usual 0.5 barely moves the cost; 0.15, picked on separate data, does better.

If we flag nothing, we pay for all 71 misses: 7,100. With the usual cut-off of 0.5 it's 6,920, barely moved. So we pick a better cut-off on separate data, 0.15, and the cost on the test set comes to 6,610. Same model each time; the cut-off alone moved the cost.

Say what it still misses

Be honest about that result. At 0.15 the model flags 31 payments, and 8 of those are fraud. The other 23 are false alarms, honest customers who got held up. And 63 frauds still went straight through.

Worked by hand: 31 reviews × 10 + 63 misses × 100 = 6,610, so the saving is 7,100 − 6,610 = 490.

A saving of 490 out of 7,100 is a weak model, and I'd say so in the interview. Saying what your design still misses is part of the answer, and it's where your own project helps, because you can say what you measured.

Step 6: serving

Think of the checkout till: the answer has to come before the customer gets annoyed. These numbers are for illustration, so in an interview you'd state them as assumptions.

Worked by hand: 10,000,000 payments a day ÷ 86,400 seconds × 3 at peak = about 347 requests a second.

Latency budget for one payment features 12 model 18 3 17 to spare 50 ms limit 33 ms in all (rules = 3 ms). Illustrative numbers.
Features, model and rules fit inside the 50 ms budget with 17 ms to spare.

A high score doesn't block the card by itself. It goes to an analyst for review, so a person decides the unclear cases. Serving details are in Fraud Scoring, Part 3.

Steps 7 and 8: monitoring and failure

These two go together. In a small simulation we made about 5% of 5,000 calls fail. With no fallback, every failed call comes back as an error: 240 errors on payments.

Now add a fallback: if the model fails or takes too long, simple rules answer instead. Errors go to zero, and the rules answered 384 calls: the 240 that failed plus 144 that were slow.

But zero errors doesn't mean zero risk. Rules only look at a few simple things, so fraud checks are weaker on those calls. So we watch the share of calls on the rules and alert when it climbs. We also watch the score pattern and, when late labels arrive, the cost again.

Follow-ups and a rubric

  • "Fraud doubles next month. What changes?" Pick the cut-off again on fresh data, and check the cost.
  • "How would you release a new model safely?" Like a trainee beside a senior: it scores in the background, its calls get compared, and it decides nothing yet. See Shadow, Canary and Rollback.
  • "The model is down for an hour. What's your exposure?" Every call goes to the rules, so name what they can't see.

An example rubric, out of 8: four rows (goal and metric, data and features, model and cut-off, serving and failure), each 0 if skipped, 1 if only named, 2 if you put a number on it and said what it costs. Every company scores in its own way.

Recap

StepThe point to land
MetricAccuracy can't work at this fraud rate, so price the mistakes
Data and featuresLabels come late; features must be ready at decision time
ModelThe cut-off moves the cost; say what the model still misses
ServingState the load and the budget as assumptions; send high scores to a person
FailureA fallback removes errors, not risk, so watch its share

Try it yourself

Answer this same question out loud, all eight steps, using the numbers from your own fraud scoring project.

Tried the exercise? Share your answer or ask a question.

The StudyEasy AI Community is free to join, with the lesson files, notebooks and code.

Join free on Skool

Keep going in the learning path Prepare for ML Engineer Interviews · step 5 of 13

Previous
The ML System Design Framework: Eight Steps, in Order, on a Spam Filter
Next post
ML System Design Interview: A Recommendation Feed, From a Score to Beat to Online Guardrails

Related course on Udemy

Machine Learning Engineer: From First Model to ML Engineer

Learn machine learning in Python, then ship it: data analysis, regression, classification, tuning, deployment and MLOps.View on Udemy ↗: Machine Learning Engineer: From First Model to ML Engineer (paid course, opens in a new tab)

Related posts

The ML Engineer Interview Loop: Five Rounds, What Each One Looks For, and a Simple Rubric

The rounds you go through for one ML engineer job: recruiter screen, coding, ML depth, ML system design and behavioural. What each round looks for, the follow-up it brings, and a four-check rubric for your own answers.

The Answer Framework for Technical Interviews: Five Moves, Scored Out of 24

Good interview answers share one shape: a 30-second answer, the mechanism, the trade-off, the metric and the failure test. Worked on one question about a batch job starving everyone else, with a 24-point example rubric.

From Symptom to Pattern: How to Answer "Which Pattern Would You Use?" in an Interview

Start from what you can see, not from the pattern you know. A four-step rule (symptom, cost, metric and failure test, ship first), a symptom table, one worked answer for 429s at peak, and the trap of using a prompt as a lock.

The ML System Design Framework: Eight Steps, in Order, on a Spam Filter

One repeatable route through any ML system design question: goal, metric, data, features, model, serving, monitoring and failure. Worked on an email spam filter, with the follow-ups and a three-check rubric.

On this page

  • Step 1: the goal
  • Step 2: the metric
  • Step 3: the data
  • Step 4: the features
  • Step 5: the model and the cut-off
  • Say what it still misses
  • Step 6: serving
  • Steps 7 and 8: monitoring and failure
  • Follow-ups and a rubric
  • Recap
  • Try it yourself
Community · Free to join
Single logo

StudyEasy AI Community

Hosted onSkool

Learn AI engineering, share what you build, and connect with other learners.

  • Free resources: lesson files, notebooks and code

  • Ask questions and join engineering discussions

  • Meet real people learning and building with AI

Join free on Skool

Related course on Udemy

Machine Learning Engineer: From First Model to ML Engineer

Learn machine learning in Python, then ship it: data analysis, regression, classification, tuning, deployment and MLOps.View on Udemy ↗: Machine Learning Engineer: From First Model to ML Engineer (paid course, opens in a new tab)

Single logo

Empowering Education, One Course at a Time

About
About usContact usFAQs
Legal
Terms of ServicePrivacy Policy

© 2026 StudyEasy Organization. All rights reserved.