Keyboard shortcuts

Press โ† or โ†’ to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

๐Ÿš€ Part 11: Generative Recommender Systems in Practice

Build a runnable, industrial-grade movie recommender from scratch, covering offline training, online inference, frontend interaction, and containerized deployment end to end.

๐Ÿ“š 6 sections ยท โฑ๏ธ Estimated 3โ€“4 weeks ยท ๐ŸŽฏ Target: turn discrete algorithms into an end-to-end servable recommender

The preceding chapters covered the core algorithm modules โ€” retrieval, ranking, and re-ranking. But a model that runs in a paper is not the same as a model you can deploy in a real setting โ€” a gap nearly every recommender-system learner runs into. This part uses an end-to-end movie recommender project to string the scattered algorithms into a complete system that runs, serves, and deploys, answering the engineering question: how do you build a production-grade recommender from scratch?


Chapters

ChapterTopicThe Big Idea
11.1Project Introduction and GoalsClarify the gap between offline evaluation and online deployment; settle the technology choices and the learning path
11.2System Architecture DesignDecouple offline from online; the classic funnel of retrieval โ†’ ranking โ†’ re-ranking
11.3Offline PipelineFeature engineering, YoutubeDNN/DeepFM training, embedding generation, feature ingestion, and model deployment
11.4Online PipelineCold start (UCB), multi-route retrieval (Snake Merge), DeepFM ranking, diversity re-ranking
11.5Frontend and InteractionFive Vue 3 pages, Pinia state, search debouncing, a rating-driven data feedback loop
11.6Deployment and OperationsOrchestrate five services with one Docker Compose command; health checks and troubleshooting

What You Will Be Able to Do After This Part

  • ๐ŸŸข Describe the responsibility boundary between the offline and online systems, and how the storage layer decouples them
  • ๐ŸŸข Explain why the funnel architecture is necessary: light models filter candidates in retrieval, heavy models score precisely in ranking
  • ๐ŸŸก Implement the training loop for YoutubeDNN retrieval and DeepFM ranking, and understand why item embeddings are precomputed
  • ๐ŸŸก Design a cold-start strategy (UCB exploration + preferred genres + popular fallback) and multi-route retrieval fusion (Snake Merge)
  • ๐Ÿ”ด Deploy a multi-container system with PostgreSQL/Redis/Elasticsearch/backend/frontend, and troubleshoot common problems
  • ๐ŸŸข Complete the tiered practice problems in each section to consolidate the engineering essentials

Key Concepts

ConceptSectionRelevance
Offline vs. online11.2The fundamental boundary of recommender engineering; the quality-vs-latency trade-off
Funnel architecture (retrieval โ†’ ranking โ†’ re-ranking)11.2The backbone of industrial recommendation
Item embedding precomputation11.3The prerequisite for millisecond-level online vector search
Cold start / UCB11.4The exploration-exploitation balance for new users with no behavior
Multi-route retrieval + Snake Merge11.4Fusion compensates for the coverage gaps of any single strategy
Data feedback loop11.5Frontend behavior feedback drives feature updates and recommendation improvements

Prerequisites

  • The three-stage pipeline mental model from 1.1, and an understanding of how retrieval/ranking/re-ranking divide the work
  • The basics of the two-tower model in 2.3 (YoutubeDNN) and the ranking models in 3.x (DeepFM)
  • Working knowledge of Python, basic neural networks, and SQL; familiarity with Docker basics is a plus

The code for this project lives in the web_project/ directory of the datawhalechina/fun-rec repository โ€” you can run it as you read.


Tips for This Part

  1. Get it running before nitpicking the details. Launch the full project with one Docker Compose command and build overall intuition first.
  2. Grasp the offline/online boundary. This is the core mental framework for engineered systems.
  3. Pay attention to the steps papers never mention: how features move across systems, how models update without downtime, and how cold start degrades gracefully.

Let's build it! ๐Ÿ› ๏ธ