Learning path: Prepare for ML Engineer Interviews · Step 3 of 13
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.
What you will learn
- Answer a pattern question in four steps: symptom, cost, metric and failure test, ship first
- Match common production symptoms to the first move worth trying, and the move that is usually wrong
- Name the price of a cache, a queue, a retry and a gateway
- Explain why a prompt instruction is not a security control
Before you start
- The Answer Framework for Technical Interviews
- Some experience running an AI or backend service
One question comes up in almost every AI or ML engineering interview: which pattern would you use? There's a very simple rule for answering it: start from the symptom, not from the pattern.
The breaking moment
Take one situation: cost doubled after launch. What do you do?
Many people jump straight in: "use a cheaper model everywhere". It sounds smart. So how would you know it worked? Did quality drop? Nobody measured it. A fix with no measurement is only a guess.
Think of a good mechanic. First they listen to the engine. Then they diagnose which part is failing. Only then do they pick up a tool, and only the one it needs. Nobody changes the gearbox for a flat tyre.
Four steps, every time
- Name the symptom you can see.
- Say what the pattern costs you.
- Name the metric that proves it worked, and the failure test you would run.
- Say what you ship first. Usually that's the cheapest thing that moves the metric.
Symptoms and first moves
Here's how it looks in practice. Read this table from the left column, not the right:
| Symptom | Reach for | Usually wrong |
|---|---|---|
| 429s at peak (the provider's "slow down" error) | Token rate limits, backoff | Retrying in a tight loop |
| Retrieval misses error codes | Hybrid search, a reranker | A bigger embedding model |
| An agent dies halfway through a long job | Durable execution, idempotency keys | Restarting from step one |
| p95 latency high, but GPUs idle | Streaming, better balancing | Buying more GPUs |
Don't worry if some of these names are new. Notice that every row begins with the symptom. Related reading: Retries and Backoff, The RAG Pipeline Explained and Latency Math: p50, p95, p99.
One symptom, start to finish
Let's run one full answer for 429s at peak:
| Step | What you say |
|---|---|
| Symptom | 429s at peak. First ask: is it the number of requests, or the number of tokens? |
| Cost | A shared counter to maintain, and some users will have to wait |
| Metric | Token headroom, and 429s split by cause |
| Failure test | One tenant sends huge prompts right at peak; watch what happens to everyone else |
| Ship first | Backoff with jitter, the cheapest step |
Jitter just means a small random wait, so clients don't all retry at the same moment. That answer takes under a minute to say, and it covers everything they score.
Every pattern has a price
Step two is the one people skip, so here are four prices to know:
- A cache: its answers can go stale.
- A queue: the jobs sit and wait.
- A retry: pays for the tokens again.
- A gateway: can become the outage itself.
It's always latency, state, money or a new way to fail. Say it before they ask, and you sound like somebody who has run this in production.
The trap: a prompt is not a lock
Symptom: tenant A sees tenant B's data. That's a serious one.
The follow-ups
They're almost always the same three, for every pattern:
- "What does that pattern cost you?" Latency, state, money or a new failure.
- "Which metric proves it worked?" One number, measured before and after.
- "What would you ship first?" The cheapest step that moves that number.
Recap
| Step | Say |
|---|---|
| Symptom | What you actually see |
| Cost | What the pattern costs |
| Metric | What proves it worked, and how you'd break it |
| Ship first | The cheapest step |
Every pattern solves a problem, so start with the problem. To shape the whole answer, combine this with the five-move answer framework.
Try it yourself
Take the opening symptom, "cost doubled after launch", and answer it in the four steps. What would you measure before and after?
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.
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.
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.