Recommendation System 00:00:01 Choose twenty titles before breakfast ends A viewer opens a streaming service with no idea what to watch. Design a recommendation system with a short response deadline, a large catalog and a changing viewing history. The displayed timings and scores belong to this exercise. It asks for the home page with device and time. an evening on a television is not a morning on a phone. Not this time. When they are, only this step is saved. caching the finished page would hide new behaviour. One number per title: the expected worth of showing it. The rest follow as the viewer scrolls. Retrieval decides what can be considered. Ranking decides the order of those candidates. A perfect ranker cannot recover a title that the retrieval stage never supplied. 00:00:43 Yesterday's favorites and the last minute of viewing A viewer finishes a title and immediately reopens the home page. Offline training has useful long-term preferences, but it cannot learn this newest event in time for the next request. The event identifies the viewed title, page and completion so the system can interpret that behavior in context. In this illustration an online feature store retains the viewer's recent genres. Its freshness target differs from the retraining schedule. A second later the app asks for the page. The title is gone and related ones have moved up. Keep appropriate short-term features and a stable event identity so repeated completion events do not overwhelm the profile. A completion can carry positive evidence without always meaning the person enjoyed a title. 00:01:27 Fill a missing preference cautiously In a small matrix, rows represent viewers and columns represent titles. Unseen interactions are missing evidence. A simplified alternating least-squares exercise learns user and item factors by updating one side with the other fixed. Rows are viewers, columns are titles. Question marks are unseen. They are not zeros. Hold the viewer factors fixed, solve for a title factor using the observed interactions and a regularization term, then update the other side on the next pass. Squared errors on known cells plus a penalty for large numbers. The learned vectors score unseen pairs by their dot products. In this small matrix Reef becomes a candidate for viewer B. A predicted score is a model output, not an observation. Evaluate future held-out interactions and account for exposure bias before treating an imputed preference as a good recommendation. 00:02:21 Find nearby vectors at serving time For a huge catalog, scoring every title for every page can exhaust the retrieval budget. A hierarchical neighbor graph can search approximately by starting high and refining through lower layers. The viewer vector, k equals 1,000. It becomes the entry to the next layer. Keep the ef best points seen and look at their neighbours until the list stops improving. For the example's smaller catalog, a well-optimized exact scan meets the target. Reconsider the graph index as size or demand changes. Benchmark approximate search against exact search on representative data. Compare recall, memory, build cost and latency at the actual catalog size; an index is worthwhile only when its trade-off helps. 00:03:10 Release a ranker without making every viewer the test Split evaluation by time to avoid letting future behavior leak into training. Use offline quality checks, shadow traffic and a measured experiment to compare the new ranker with the current one. Thirty days from the lake at a quiet hour. On the older days: vectors first, then the ranker. The new ranker gets a copy of real requests in the dark; its answers are compared and dropped. 25%, then 100%. The old version stays ready. Keep a fallback that produces eligible results even if ranking times out. Watch customer outcomes and diversity as well as clicks, and keep a tested route back to the previous version.