Open withBefore the model, I'd like to pin down what we predict, how the prediction gets used, and how fast it's needed.
The clock
16 min24 min310 min410 min58 min67 min
061020303845 min
1The problem and the target6 min
2Sketch the pipeline4 min
3Data and labels10 min
4Model and loss10 min
5Offline and online evaluation8 min
6Serving, monitoring and drift7 min
Stage by stage
Close each stage out loud, so they always know where you are.
1The problem and the target6 minThat's the target and how it's used. Here's the pipeline in one pass.
2Sketch the pipeline4 minThat's the whole loop, from event to prediction to label. Let me start with the data.
3Data and labels10 minThat's the data and its traps. Now the features and the model.
4Model and loss10 minThat's the model and the baseline it has to beat. Next, how we'd evaluate it.
5Offline and online evaluation8 minThat's how we'd know it's better, offline and live. Last, serving it and keeping it healthy.
6Serving, monitoring and drift7 minThat's the latency budget and what we'd watch. Happy to go further on any part.
How people lose this round
The model is 99.9 percent accurate.When positives are rare, always guessing the common class scores that too. Give precision and recall at the cut you'd use, or the money.
I'd shuffle the data and hold out 20 percent.Rows close in time share the same world, so a shuffled test leaks the future. Train on earlier data and test on later.
I'd use a deep network from the start.With no simple baseline, nobody can tell whether it learned anything. Beat the rules or a small model first.
My best feature is the customer's total spend that day.When you score, the day isn't over. Build every feature from what existed at that moment.
We retrain nightly and watch accuracy, so we'd catch drift.Labels often arrive weeks late, and retraining on broken inputs learns the break. Watch the inputs and the predictions as well.
A worked answer
The notes in the margin mark where the candidate asked, put a number on it, took a hint or caught a slip.
Interviewer
Design a system that scores card payments for fraud.
You
A few questions first. What happens to a high score: do we block the payment, or send it to people? How many payments a day, and how fast must we answer?
Asks how the score will be used.
The rest of this answer comes with Pro.
Pro opens every worked answer, margin notes and all.
Open withHere's one from my last job, and I'll keep the setup short.
The clock
115 sec260 sec330 sec415 sec
0:000:151:151:452:00
1The situation in one line15 sec
2What you did60 sec
3The result, with a number30 sec
4What you'd change15 sec
Stage by stage
Close each stage out loud, so they always know where you are.
1The situation in one line15 secThat's the situation. Here's what I did.
2What you did60 secThat was my part. Here's how it turned out.
3The result, with a number30 secThat's the result. And here's what I'd change.
4What you'd change15 secThat's what I'd do differently. Happy to go into any part.
How people lose this round
We decided, we built it, and we fixed it.They're hiring you. With "we" all the way through, they can't tell what you did.
I can't think of a real failure.Everyone has one. It sounds like you don't notice your mistakes, or won't own them.
In the end, they saw I was right.A story you win outright sounds one-sided. Show what you took from the other side.
So to give you some background, the company had three teams...Long setup uses up your time and their attention. One line of situation, then what you did.
It worked out, so it was the right call.A good result can come from luck. Say why the decision made sense with what you knew then.
A worked answer
The notes in the margin mark where the candidate asked, put a number on it, took a hint or caught a slip.
Interviewer
Tell me about a time data changed your mind.
You
Here's one from my last job, and I'll keep the setup short. Our product search was slow: the 95th percentile was 900 milliseconds. I was sure the fix was a cache for search results, and I'd half written the design.
One line of setup, with a number.
The rest of this answer comes with Pro.
Pro opens every worked answer, margin notes and all.
Open withI'll take the project where I made most of the decisions: the problem, my main choice, what broke, and where it ended up.
The clock
12 min23 min32 min42 min51 min
0257910 min
1The problem2 min
2Your choice and its alternative3 min
3What broke2 min
4The result2 min
5What's next1 min
Stage by stage
Close each stage out loud, so they always know where you are.
1The problem2 minThat's the problem and why it mattered. Here's the main choice I made.
2Your choice and its alternative3 minThat's what I chose and what I turned down. Now what broke.
3What broke2 minThat's what went wrong and how I found it. Here's where it ended up.
4The result2 minThat's the result, against where we started. Last, what I'd do next.
5What's next1 minThat's what I'd do next. Happy to go further on any part.
How people lose this round
The stack was Python, Postgres, Airflow and Docker.A list of tools isn't a decision. Say what you chose, what you turned down, and why.
Nothing really went wrong.Every real project breaks somewhere. It sounds like you didn't build much of it, or didn't watch it run.
We got 95 percent accuracy.Without the baseline or how rare the positives are, the number means nothing. Say what the simple approach scored.
I tried logistic regression, then trees, then a neural net.A list of tries isn't a story. Say what each one taught you and why you moved on.
The team built it, and I helped out.Too modest to score. Name the parts that were yours.
A worked answer
The notes in the margin mark where the candidate asked, put a number on it, took a hint or caught a slip.
Interviewer
Walk me through a project you're proud of.
You
A model that picks which unpaid invoices our finance team chases first. I'll cover the problem, my main choice, what broke, and where it ended up. We had about 12,000 open invoices a month, and the team could call about 1,500. They chose by a rule: customers who paid late last time. About one invoice in five ended up more than 30 days late.
Sizes the problem in the first breath.
The rest of this answer comes with Pro.
Pro opens every worked answer, margin notes and all.