# ml systems
// [50] real interview questions. Answers and sources live in the practice app.
practice this topic- For any user on Twitter, how would you suggest who they should follow? What do you do when that user is new, and what are the limitations of data-driven recommender systems?(senior)
- You run an e-commerce website. Sometimes users want to buy an item that is no longer available. Build a recommendation system to suggest replacement items.(mid)
- How do you build a system to display the top 10 results when a user searches for rental listings in a certain location on Airbnb?(senior)
- When you enter a search query on Google, you're shown a list of related searches. How would you generate a list of related searches for each query?(mid)
- Each question on Quora often gets many different answers. How do you create a model that ranks all these answers? How computationally intensive is this model?(mid)
- When you type a question on StackOverflow, you're shown a list of similar questions to make sure your question hasn't been asked before. How do you build such a system?(mid)
- Autocompletion: how would you build an algorithm to finish your sentence when you text?(mid)
- Given a dataset of credit card purchases where each record is labelled fraudulent or safe, how would you build a fraud detection system?(junior)
- If you were building a Netflix clone, how would you build a system that predicts when a user stops watching a TV show — whether they are tired of the show or just taking a break?(senior)
- On social networks like Facebook, users can list their high schools. Can you estimate what percentage of listed high schools are real? How do you find, and deploy at scale, a way of detecting invalid schools?(senior)
- Imagine you work on iPhone. Every time users open their phone, you want to suggest the one app they are most likely to open first, with 90% accuracy. How would you approach it?(senior)
- An e-commerce company wants to minimize the time it takes customers to purchase their selected items. As a machine learning engineer, what can you do to help?(senior)
- How would you design a question answering system that extracts an answer from a large collection of documents given a user query?(mid)
- Duolingo wants to recommend increasingly difficult stories to language learners. How would you measure the difficulty level of a story, and how would you edit a story to make it easier or harder?(mid)
- Design a newsfeed ranking system for a social network.(senior)
- Design a video recommendation system for a platform like YouTube or Netflix.(senior)
- Design an ads click prediction (CTR) system.(senior)
- Design a harmful content detection system for a social platform.(senior)
- Before designing an ML system, how do you decide whether the problem needs ML at all? When does a heuristic beat a model?(mid)
- Your new ranking model improves offline metrics (AUC, nDCG) significantly, but the online A/B test shows flat or negative business metrics. How do you investigate, and why does this happen?(senior)
- What is training-serving skew, what causes it, and how do you prevent and detect it in a production ML system?(senior)
- Your model's production performance is degrading over weeks. How do you detect and handle data distribution shift?(senior)
- What is a feature store, when does a team actually need one, and what problems does it solve?(senior)
- Batch prediction vs online prediction: how do you choose, and what does a hybrid look like?(junior)
- How do you safely deploy a new model version to production? Compare shadow deployment, canary release, and A/B testing.(mid)
- In recommendation and feed systems trained on implicit feedback, why is 'the user didn't click' not a negative label, and how do you construct training labels correctly?(mid)
- How should you split time-correlated data into train/validation/test sets, and what data leakage traps come up in practice?(junior)
- For an LLM-powered product, how do you decide between RAG, fine-tuning, and long-context prompting for injecting knowledge?(senior)
- Your LLM-backed feature is too slow and too expensive. How do you optimize serving latency and cost?(senior)
- How would you build an evaluation system for an LLM product before and after shipping?(senior)
- You're deploying an LLM customer-support chatbot that can access user account data and internal docs. What guardrails and failure handling do you design?(senior)
- Design an agentic AI assistant that plans and executes multi-step tasks with tools. What are the failure modes and how do you contain them?(senior)
- A feature store sounds clean in theory but teams hit real problems adopting one. What goes wrong in practice, and what do you actually get from it?(senior)
- What is a model registry, what does it store beyond the model file, and how does it enable safe rollback and reproducibility?(mid)
- You want to test a new model's real-world behavior with zero user risk before serving it. Design a shadow deployment and explain exactly what it can and cannot tell you.(senior)
- How do you A/B test a model change correctly? Cover randomization unit, metrics, power, and the traps specific to ML experiments.(senior)
- Monitoring fires: your production model's inputs have drifted. Walk through a drift-response playbook — how you triage and what you actually do.(senior)
- You need to serve embeddings for hundreds of millions of items with low-latency nearest-neighbor retrieval. What are the hard parts of embeddings at scale?(senior)
- Users complain your search/ranking results 'feel worse' but nDCG on your offline eval looks fine. How do you debug ranking metrics and connect them to real quality?(senior)
- When labels arrive late or barely at all, how do you monitor and evaluate a production model? Contrast natural labels with delayed/absent ones.(mid)
- When should a model retrain — on a schedule, on a trigger, or continually? What decides the cadence, and what can go wrong with retraining too often?(mid)
- A recommender optimizing engagement is measurably 'working' but slowly narrowing what users see and amplifying popular items. How do you diagnose and break the feedback loop?(senior)
- Why is a two-stage retrieval-then-ranking architecture almost universal in large recommendation and search systems, and what breaks if you skip a stage?(senior)
- Your classifier outputs probabilities that feed a downstream decision (thresholding, ranking, an auction bid). It ranks well but the probabilities are wrong. Why does calibration matter and how do you fix it?(mid)
- You have a new user or a brand-new item with no interaction history. How do you handle cold-start in a recommendation system, on both the user side and the item side?(senior)
- You inherit an ML pipeline and can't reproduce a model that's running in production. What reproducibility practices should have been in place, and how do you retrofit them?(mid)
- Compare multi-armed bandits with classic A/B testing for rolling out model or content variants. When is a bandit the better tool and when is it the wrong one?(mid)
- How do you decide what to log from a production ML system so that today's traffic becomes tomorrow's training and evaluation data — without poisoning it?(senior)
- Shazam recognizes a song in a few seconds in a noisy café, even with people talking over it. How would you design a system that identifies a song from a short, noisy audio clip?(mid)
- Your photos app quietly groups every picture of the same person into one album, even people you never tagged. How would you build a system that clusters photos by identity without labels?(senior)