Coming soon · Book Profile
Machine Learning Design Patterns
A catalog of thirty reusable design patterns that provide proven solutions to common challenges in data preparation, model building, and MLOps for machine learning practitioners.
A profile of this book is on the way.
What it’s about
For data scientists, data engineers, and ML engineers who already know the basics of machine learning, this book provides the crucial next step: learning the hard-earned best practices for building robust, scalable, and maintainable production ML systems. Moving beyond the 'what' and 'how' of algorithms, this book focuses on the 'why' behind the solutions that experienced practitioners use to solve recurring problems in data representation, problem framing, model training, resilient serving, and reproducibility. It offers a catalog of 30 practical design patterns, complete with code examples and trade-off analyses, giving you and your team a shared vocabulary and a toolkit of proven strategies to build high-quality ML systems that deliver real-world value.
The through-line
- Who it’s for
- The reader is a data scientist, ML engineer, or data engineer who knows the basics of ML but struggles to build robust, scalable, and maintainable production ML systems. They want to move beyond academic exercises and implement effective solutions for real-world business problems.
- The problem
- They repeatedly face challenges with data quality, training-serving skew, model degradation, reproducibility, and scalability when trying to move ML models from prototype to production. They feel frustrated and inefficient, constantly 'reinventing the wheel' for common problems. They lack the confidence and vocabulary to apply proven solutions and communicate their design choices effectively.
- The plan
- Learn to represent data effectively using patterns like Embeddings and Feature Crosses.
- Frame your ML problem correctly with patterns like Reframing and Rebalancing.
- Master the training process with patterns for Transfer Learning, Distribution Strategy, and Hyperparameter Tuning.
- Build resilient and reproducible systems using patterns for serving, workflow pipelines, and feature stores.
- Implement responsible AI by using patterns for explainability, fairness, and benchmarking.
- The payoff
- The reader can confidently design, build, and deploy robust, scalable, and maintainable ML systems. · They have a shared vocabulary to communicate design decisions with their team. · They build higher-quality models faster, avoiding common pitfalls and rework.
See our guide
Related profiles we’ve built
- Time Series Forecasting Using Foundation Models →
- Understanding Deep Learning →
- The AI Marketing Canvas: A Five-Step AI Plan for Marketers →
- Artificial Intelligence →
- Artificial Intelligence - A Very Short Introduction →
- Effective Data Science Infrastructure →
- Human + Machine →
- Big Data_ A Very Short Introduction (Very Short Introductions) →
Additional reading
- OpenAI Prompt Engineering Guide · OpenAI
Official documentation from the model provider on how to craft effective prompts, recommended by the author.
- Anthropic's Prompt Engineering Guide · Anthropic
Official guide from another major LLM provider, offering best practices for prompt design.
- dair-ai/Prompt-Engineering-Guide · DAIR.AI Community
A comprehensive, community-maintained GitHub repository covering a wide range of prompt engineering techniques.
- GPT Researcher · assafelovic
An open-source project that inspired the book's research summarization engine, recommended for further exploration of building production-grade LLM applications.
- Building Effective AI Agents · Anthropic
An article recommended by the author for a deeper understanding of the distinction between agentic workflows and autonomous agents.
- Model Context Protocol (MCP) Official Website · Anthropic and Community
The primary source for the MCP specification, tutorials, and ecosystem resources, essential for building or consuming MCP servers.
- FastMCP 2 Documentation · jlowin and community
The official documentation for the recommended Python SDK for building MCP servers, used in the book's example.
- Knowledge Graph Enhanced RAG · Tomaž Bratanič and Oskar Hane
Recommended by the author for readers interested in diving deeper into combining knowledge graphs with RAG.
- Database Management Systems · Gehrke and Ramakrishnan
Referenced in Chapter 2 as a resource for readers unfamiliar with the basics of SQL and Relational Database Management Systems (RDBMSs), which are foundational for the structured data analysis chapters.
- Survey of Hallucination in Natural Language Generation · Ji, Z., Lee, N., Frieske, R., et al.
Cited in Chapter 2 to explain the concept of 'hallucinations' in LLMs and to underscore the importance of verifying information provided by models.