ML System Design

The questions to ask before drawing boxes, then recommendation, fraud, churn and search ranking designed end to end — and the boundary with Agentic Engineering.

ML System Design Architecture
▶ lab

Sources → data platform → features → training → registry → serving → application → monitoring. Eight boxes, five owning teams, and four interfaces that decide whether the system can be reasoned about at all.

Q · What are the boxes in an ML system, who owns each one, and what has to cross the boundaries between them for the whole thing to stay debuggable?
The Questions Before the Boxes
▶ lab

Ten questions — target, latency, batch or online, freshness, volume, label delay, model size, fallback, retraining, cost — each of which decides a part of the architecture before any model is chosen.

Q · Which questions have to be answered before an ML system can be designed, and what does each answer decide?
Designing a Recommendation System
▶ lab

Events → candidate generation → features and embeddings → ranking → serving → feedback. A two-stage latency budget, a loop in which the model writes its own training data, and an offline metric that measures agreement with the previous policy.

Q · How is a recommendation system designed end to end, and why can its offline ranking metric improve every quarter while the product gets worse?
Designing a Fraud Detection System
▶ lab

Rare positives, a strict online latency budget, asymmetric costs, an adversary who adapts to the model, and labels that arrive ninety days late. Every constraint in the domain at once.

Q · How is a fraud detection system designed when the positives are rare, the decision must be made in milliseconds, the labels arrive months later, and the people generating the positives are trying not to be caught?
Designing a Churn Prediction System
▶ lab

A weekly call list for a team of fixed capacity. Batch scoring, a threshold that is a queue size, labels a month late, explanations the callers can use — and a demonstration of why the online endpoint someone will propose is unnecessary.

Q · How is a churn prediction system designed around the decision it serves, and why is online inference the wrong default for it?
Designing Search Ranking
▶ lab

Query → candidate retrieval → ranking model → results. Lexical and embedding retrieval, learning-to-rank from click labels that carry position bias, NDCG-style evaluation at concept level, a latency budget per stage, and interleaving for the online test.

Q · How is a search ranking system designed so that click data trains a ranker without teaching it that whatever is at the top is what people want?
The Boundary With Agentic Engineering
▶ lab

ML Engineering owns the model: training, fine-tuning, evaluation, embeddings, inference, serving, drift, MLOps. Agentic Engineering owns what is built on top: prompting, RAG, tools, memory, agent architecture, agent evals. The line is where the depth lives, not where the LLM is.

Q · Where does Machine Learning Engineering end and Agentic Engineering begin, and which of the boundary cases — fine-tuning, prompt-tuning, embedding drift in a RAG system, retrieval evals — falls on which side?