AI Hints
Home›MLOps Tutorial›Case Studies
MLOps · Lesson 49 of 80

Case Study: Recommendations

Millions of choices, in milliseconds.

⏱ 2 min read▶ Video at 2:02:37🎓 Free
Watch this lesson in the MLOps courseWatch on YouTube ↗Full MLOps course

When you open a video app, or an online shop, a recommendation system decides what you see. It runs for millions of users, answers in milliseconds, and learns from every click. It is a perfect case study, because it needs almost everything in this course. Let's see how its operations fit together.

Case Study: Recommendations
From the video: Case Study: Recommendations
  • Millions of users
  • Answers in milliseconds
  • Learns from every click

A two-stage recommender

Recommenders usually work in two stages, because scoring millions of items for every user is too slow. First, candidate generation. A fast method, often based on embeddings, picks a few hundred items, that might interest the user. Second, ranking. A richer model scores those few hundred, using many features, and sorts them. Then rules adjust the list, to add variety, hide items already seen, and respect business needs. Each stage is its own model, with its own data, serving, and monitoring.

  1. Candidate generationmillions down to hundreds
  2. Ranking modelscores with rich features
  3. Business rulesvariety, freshness, safety
  4. Show the listand log what happened
Two stages, two models to operate
A two-stage recommender
From the video: A two-stage recommender

The operational challenges

Recommenders raise classic operational challenges. Freshness. New items, and new interests, appear constantly, so features and indexes must update within minutes. Scale. Feature lookups must happen in a few milliseconds, which is why online feature stores matter. Feedback loops. The system only learns from what it shows, so exploration is essential. Evaluation. Offline scores are poor predictors of real engagement, so A B tests are the final judge. And monitoring. Watch click through rates, diversity, and the share of new items shown.

Freshnessupdate in minutes
Online featuresmillisecond lookups
Explorationavoid feedback loops
A/B teststhe real judge
Diversity metricsbeyond clicks

Mapping to what you learned

Let's map the case to the course. Data pipelines collect clicks, and views, with strict point in time joins. A feature store serves user and item features. Experiment tracking and a registry manage candidate and ranking models. Pipelines retrain them daily, or hourly. Serving uses batching, and tight latency budgets. Canary releases, and A B tests, decide every change. Monitoring watches drift, quality, and business metrics. Nothing in this system is exotic. It is the same loop, run with discipline, at scale.

Course topicIn a recommender
Data pipelinesclicks and views, point-in-time joins
Feature storeuser and item features, online and offline
Registry and pipelinestwo models, retrained often
Servingbatching, tight latency
Experimentscanaries and A/B tests
Monitoringdrift, diversity, engagement

Summary

Good. A recommender has two stages, candidate generation and ranking, and needs fresh features, millisecond serving, exploration, and A B tests. It is the whole M L Ops loop at scale. Next, a different challenge, fraud detection, where the interesting cases are extremely rare.

Key takeaways
  • Two stages: candidates, ranking
  • Fresh, fast features
  • A/B tests decide
Next up: Case Study: Fraud — finding the needle