Hands-on Production Systems at Scale
Bryan Bischof, Hector Yee

#Python
#JAX
#RecSys
#MLOps
#PySpark
#SparkSQL
#FastAPI
Implementing and designing systems that make suggestions to users are among the most popular and essential machine learning applications available. Whether you want customers to find the most appealing items at your online store, videos to enrich and entertain them, or news they need to know, recommendation systems (RecSys) provide the way.
In this practical book, authors Bryan Bischof and Hector Yee illustrate the core concepts and examples to help you create a RecSys for any industry or scale. You'll learn the math, ideas, and implementation details you need to succeed. This book includes the RecSys platform components, relevant MLOps tools in your stack, plus code examples and helpful suggestions in PySpark, SparkSQL, FastAPI, Weights & Biases, and Kafka.
You'll learn:
Table of Contents
Part I. Warming Up
Chapter 1. Introduction
Chapter 2. User-Item Ratings and Framing the Problem
Chapter 3. Mathematical Considerations
Chapter 4. System Design for Recommending
Chapter 5. Putting It All Together: Content-Based Recommender
Part II. Retrieval
Chapter 6. Data Processing
Chapter 7. Serving Models and Architectures
Chapter 8. Putting It All Together: Data Processing and Counting Recommender
Part III. Ranking
Chapter 9. Feature-Based and Counting-Based Recommendations
Chapter 10. Low-Rank Methods
Chapter 11. Personalized Recommendation Metrics
Chapter 12. Training for Ranking
Chapter 13. Putting It All Together: Experimenting and Ranking
Part IV. Serving
Chapter 14. Business Logic
Chapter 15. Bias in Recommendation Systems
Chapter 16. Acceleration Structures
Part V. The Future of Recs
Chapter 17. Sequential Recommenders
Chapter 18. What's Next for Recs?
How did you come to find this book? Did you see an ad for it on a website? Maybe a friend or mentor suggested it; or perhaps you saw a post on social media that referenced it. Could it be that you found it sitting on a shelf in a bookstore—a bookstore that your trusty maps app led you to? However you came to find it, you’ve almost certainly come to this book via a recommendation system.
Implementing and designing systems that provide suggestions to users is among the most popular and most essential applications of machine learning (ML) to any business. Whether you want to help your users find the best clothing to match their tastes, the most appealing items to buy from an online store, videos to enrich and entertain them, maximally engaging content to surface from their networks, or the news highlights they need to know on that day, recommendation systems provide the way.
Modern recommendation system designs are as diverse as the domains they serve. These systems consist of the computer software architectures to implement and execute product goals, in addition to the algorithmic components of ranking. Methods for ranking recommendations can come from traditional statistical learning algorithms, linear-algebraic inspirations, geometric considerations, and, of course, gradient-based methods. Just as the algorithmic methods are diverse, so too are the modeling and evaluation considerations for recommending: personalized ranking, search recommendations, sequence modeling, and the scoring for all of these are now need-to-know for the ML engineer working with recommendation systems.
If you’re an ML practitioner, you are probably aware of recommendation systems, and you may know one or two of the simplest modeling approaches and be able to speak intelligently about the relevant data structures and model architectures; however, RecSys frequently falls outside the core curriculum of data science and ML. Many senior data scientists with years of experience in the industry know little about actually building a recommendation system and may feel intimidated when the topic comes up. Despite drawing on similar foundations and skills as other ML problems, RecSys has a vibrant community with a fast-moving focus that can make it easy to relegate building recommendation systems to other data scientists who have already invested the time, or are willing to stay on top of the latest information.
The reason this book exists, is to break through those perceived barriers. Understanding recommendation systems at a practical level is not only useful for business cases requiring content to be served to users, but the underlying ideas of RecSys often bridge gaps between an incredibly diverse set of other types of ML. Take, for example, an article recommendation system that may utilize natural language processing (NLP) to find representations of the articles, sequential modeling to promote longer engagement, and contextual components to allow user queries to guide results. If you’re approaching the field from a purely academic interest, no matter what aspects of mathematics you’re interested in, sooner or later, there appears a link or application in RecSys!
Finally, if connections to other fields, applications of nearly all of mathematics, or the obvious business utility aren’t enough to get you interested in RecSys, the stunning cutting-edge technology might: RecSys is at and beyond the forefront of ML at all times. One benefit of having obvious revenue impact is that companies and practitioners need to always be pushing the boundaries of what is possible and how they go about it. The most advanced deep learning architectures and best code infrastructures are brought to bear on this field. That’s hardly a surprise when you consider that at the heart of four of the five letters in FAANG—which stands for Meta (formerly Facebook), Apple, Amazon, Netflix, and Google—lies one or many recommendation systems.
As a practitioner, you’ll need to understand how to do the following:
This book illustrates the core concepts and examples necessary to complete these steps, whatever the industry or scale. We’ll guide you through the math, ideas, and implementation details for building recommendation systems—whether it’s your first or your fiftieth. We’ll show you how to build these systems with Python and JAX.
If you’re not yet familiar, JAX is a Python framework from Google that seeks to make autodifferentiation and functional programming paradigms first-class objects. Additionally, it uses a NumPy API style especially convenient for ML practitioners from a variety of backgrounds.
We will show code examples and architecture models that capture the essential concepts necessary and provide the way to scale these systems to production applications.
"Bryan and Hector have distilled decades of recommendation system advancements into a concise, yet practical guide. Bridging the gap between theory and application, their book is packed with easy-to-understand Python and JAX examples. This is an indispensable guide for RecSys practitioners at all levels, from novices to experts."
- Eugene Yan, Applied Scientist, Amazon
"Bryan and Hector have created something special here, introducing concepts that take most people years to learn within the RecSys domain and then providing clear code examples that put them into practice. I wish I'd had this book when I started out on my RecSys journey."
- Even Oldridge, Director of Recommendation Systems, Nvidia
"This book takes a holistic approach to building recommender systems, synthesizing math, code, systems design, and business application. It covers all the nuances that practitioners need to consider to implement real world solutions. The intuitive examples using publicly available datasets enables the reader to turn abstract concepts into concrete learnings."
- Eric Colson, AI Advisor, Former Chief Algorithms Officer at Stitch Fix, Former VP of Data Science & Engineering at Netflix.
"Recommender systems are among the most impactful ML systems ever deployed: this book brilliantly navigates the balance between principled modeling, clear code examples and architectural best practices. A must read for practitioners aspiring to build real-world systems, not just train models."
- Jacopo Tagliabue, co-founder of Bauplan and Adj. Prof of ML Systems at NYU , Co-creator of RecList and evalRS
This is the RecSys book that I've wished to find for years. Building Production Recommendation Systems in Python and JAX cleared up many questions I had about real world recommendation systems that had remained frustrating itches I couldn't quite scratch."
- Will Kurt, Author: Bayesian Statistics the Fun Way
Bryan Bischof leads AI at Hex, and is an adjunct professor in the Rutgers Masters of Business and Analytics program where he teaches Data Science. Previously, he was the Head of Data Science at Weights and Biases, where he built the DS, ML, and Data Engineering teams.
He has built recommendation systems for clothing (at Stitch Fix), recommendation systems for technical blog posts (at Weights and Biases), built the world's first recommendation system for coffee (at Blue Bottle Coffee), and now is building recommendation systems for AI agents. His data visualization work appeared in the popular book The Day it Finally Happens by Mike Pearl. His Ph.D. is in pure mathematics.









