How Netflix Taught an LLM to Recommend Movies So That You Keep Watching
A recommendation system must primarily determine which items appear first in a user's recommendation list to prevent them from leaving the platform. This ordering process is driven by a ranker component, which assigns relevance scores using user interaction history, item metadata, and contextual information. At Netflix, this is performed by systems like GenRec, which can rank the full catalog or candidate subsets using top-K ranking. Ultimately, the goal extends beyond immediate clicks or plays to delivering genuinely satisfying content that ensures long-term user retention. Netflix relies on sophisticated recommendation systems powered by thousands of specialized features and model components. Over time, extending these systems to new content formats or product surfaces creates immense architectural and feature-engineering complexity. To mitigate this burden, the Netflix engineering team is investigating whether large language models can directly interpret plain-text descriptions of user behavior and content instead of relying on manually engineered signals. Large language models (LLMs) bring strong foundational understanding of relationships between themes, descriptions, and user interactions, which benefits recommendation tasks. Netflix terms the representation of such information in textual form as verbalization. However, off-the-shelf general-purpose LLMs struggle with catalog restrictions, lack of personalization, and bias toward globally popular content. To overcome these limitations, Netflix developed GenRec, a system that blends LLM language understanding with custom training tailored specifically to their catalog.
Read the original ↗Contents
- 01The Basic Question with Recommendations
- 02Why Netflix Wanted a New Approach
- 03Why a Language Model Can Help
- 04The Two Training Phases of GenRec
- 05Phase 1: Develop a Netflix-aware foundation
- 06Phase 2: Train the Model to Rank
- 07How User Behaviour Helps Create Training Examples
- 08Context Engineering: Choosing What the Model Gets to Read
- 09What GenRec Learns During Training
- 10Learning Which Items Should Rank Highly
- 11Preserving Language Understanding
- 12Giving More Influence to Important Outcomes
- 13How the Model Produces a Ranked List
- 14How GenRec Makes Recommendations
- 15How Netflix Evaluates GenRec
- 16Conclusion
The Basic Question with Recommendations
A recommendation system must primarily determine which items appear first in a user's recommendation list to prevent them from leaving the platform. This ordering process is driven by a ranker component, which assigns relevance scores using user interaction history, item metadata, and contextual information. At Netflix, this is performed by systems like GenRec, which can rank the full catalog or candidate subsets using top-K ranking. Ultimately, the goal extends beyond immediate clicks or plays to delivering genuinely satisfying content that ensures long-term user retention.
- Item ordering is crucial because users have limited attention spans and will leave if relevant content is not surfaced immediately.
- A ranker scores items based on a user's interaction history, item metadata, device specifications, time of day, and location.
- Netflix uses GenRec to rank either the entire catalog or smaller candidate subsets using top-K ranking.
- A user playing recommended content indicates interest, but high engagement alone does not guarantee the recommendation provided long-term satisfaction.
Why Netflix Wanted a New Approach
Netflix relies on sophisticated recommendation systems powered by thousands of specialized features and model components. Over time, extending these systems to new content formats or product surfaces creates immense architectural and feature-engineering complexity. To mitigate this burden, the Netflix engineering team is investigating whether large language models can directly interpret plain-text descriptions of user behavior and content instead of relying on manually engineered signals.
- Netflix production recommendation systems use thousands of features, representations, and specialized components.
- Adding new content types or product surfaces requires manual feature engineering, architecture updates, and infrastructural changes.
- Feature engineering and modeling sequential user interactions contribute heavily to system complexity over time.
- Netflix is exploring using broadly capable LLMs to interpret user behavior and content represented in plain text.
Why a Language Model Can Help
Large language models (LLMs) bring strong foundational understanding of relationships between themes, descriptions, and user interactions, which benefits recommendation tasks. Netflix terms the representation of such information in textual form as verbalization. However, off-the-shelf general-purpose LLMs struggle with catalog restrictions, lack of personalization, and bias toward globally popular content. To overcome these limitations, Netflix developed GenRec, a system that blends LLM language understanding with custom training tailored specifically to their catalog.
- LLMs inherently understand nuanced conceptual and thematic connections across media descriptions and user action histories.
- Netflix refers to the process of converting contextual information and user interactions into text as 'verbalization'.
- Off-the-shelf LLMs make poor recommenders because they lack personalization, favor globally popular titles, and can recommend items outside the catalog.
- Netflix built GenRec to combine LLM-based language understanding with specialized training on the Netflix catalog.
- Custom training allows Netflix to define good recommendations and constrain suggestions strictly to catalog items.
The Two Training Phases of GenRec
This section introduces the training process of Netflix's recommendation model, GenRec. Netflix designed the training strategy around two distinct phases, each serving a different objective. The excerpt sets up an in-depth exploration into the mechanics and purposes of these two specific phases.
- Netflix developed and trained the GenRec model.
- The training process of GenRec is partitioned into two distinct phases.
- Each training phase serves a different purpose in the overall training strategy.
Phase 1: Develop a Netflix-aware foundation
In the first phase of developing GenRec, Netflix adapts an open-source foundation large language model using its own proprietary data. This step embeds domain knowledge regarding Netflix content and user behavior into the model before it is trained for recommendation ranking. The resulting domain-aware foundation model provides a stable starting point across multiple initiatives and is updated only periodically.
- GenRec begins by adapting an open-source foundation LLM to Netflix's specific domain.
- Proprietary Netflix data on content and user behavior is used to train the base model before task-specific ranking training.
- The domain-adapted foundation model functions as a shared foundation for multiple lines of work.
- Netflix maintains the model as a stable asset that is updated periodically rather than frequently.
Phase 2: Train the Model to Rank
The second phase focuses on converting a foundational LLM into GenRec through post-training. During this phase, the model is trained on specific examples and objectives to rank items according to reward signals while adhering to cost targets. Netflix conducts this post-training frequently to continuously adapt to new releases and shifting viewer preferences. Even foundational models with strong general knowledge require regular updates to reflect changing trends.
- Phase 2 utilizes post-training to transform a foundational LLM into GenRec.
- Training focuses on ranking items based on reward signals while meeting strict cost targets.
- Post-training involves additional training on specific examples to specialize an existing model for a designated task.
- Netflix executes post-training frequently to keep pace with new movie releases, TV shows, and evolving viewer preferences.
How User Behaviour Helps Create Training Examples
Netflix converts various recorded user interactions into conversational training data for recommendation models. Within this dataset, the simulated user message encapsulates member history, context, and metadata, while the assistant message reflects the subsequent actions taken by the user. This conversational structure serves purely as an effective training format rather than an end-user chat interface. In production, GenRec processes user context to score and rank movies and television shows directly.
- Netflix logs interaction data such as viewing time, ratings, and watchlist additions to generate training datasets.
- Training examples are structured as dialogues where the user prompt provides prior history and the assistant response indicates what happened next.
- The conversational format is exclusively a training technique and does not represent an actual conversational interface for viewers.
- During deployment, the GenRec model receives user context to score and rank titles using a ranking component.
Context Engineering: Choosing What the Model Gets to Read
Context engineering addresses the challenge of balancing token cost and prompt context budgets when providing user activity history to LLMs. Netflix defines context engineering as the process of selectively deciding which events to include and how concisely to describe them. They prioritize high-evidence actions, summarize repetitive behaviors, add selective details for cold-start items, and evaluate context length trade-offs. Through methods like cleaning, compression, and word adjustments, Netflix successfully reduced prompt token usage to approximately one-third of the initial volume.
- Sending exhaustive user activity histories to LLMs is cost-prohibitive and exhausts context window budgets.
- Netflix terms the optimization of deciding what information to supply in prompts as 'context engineering'.
- Actions with strong evidence of preferences are described in detail, while weak signals like short views or hovers are omitted.
- Repetitive user behaviors are compressed into summary events rather than listed individually.
- Cold-start or new items require richer metadata descriptions than frequently interacted items.
- Initial historical events significantly boost ranking quality, but marginal gains diminish as context length expands.
- Techniques like text cleaning, compression, and wording changes enabled Netflix to reduce token counts to approximately one-third.
What GenRec Learns During Training
GenRec integrates multiple training objectives to meet diverse learning requirements. Each objective defines an aspect of performance for the model to improve via a numerical loss value. Parameter adjustments during the training phase directly work toward minimizing this loss value.
- GenRec combines several distinct training objectives to address different needs.
- Training objectives define what the model should improve during training.
- Model improvement is guided by minimizing a numerical loss value.
- Parameters are iteratively adjusted to reduce the loss value.
Learning Which Items Should Rank Highly
The primary objective of training GenRec is learning how to score and rank relevant movies and shows higher in the catalog. To create reliable training labels, Netflix selects positive examples using meaningful engagement metrics like extended playtime and explicit feedback. They apply thresholds and filtering to eliminate noisy interactions, recognizing that brief views do not necessarily reflect genuine preference. The training objective also penalizes the model when it under-allocates probability to relevant items compared to alternatives.
- The core objective is training GenRec to assign higher ranking scores to relevant catalog items.
- Positive interaction signals are derived from high-engagement indicators such as long playtime and strong feedback.
- Netflix uses filtering and thresholds to clean training labels because brief plays are not dependable indicators of user preference.
- The training loss penalizes the model for placing low probability on relevant items relative to competing alternatives.
Preserving Language Understanding
Netflix maintains a language-modeling objective over the text data used during model training. This strategy enables the model to interpret user history, better understand movie and television show content, and follow natural language instructions. By preserving these core foundation model capabilities during recommendation training, Netflix also keeps the door open for future text-based features, such as explaining recommendations.
- Netflix retains a language-modeling objective over training text alongside recommendation training.
- Preserving language modeling helps the model process user history and details about shows and movies.
- The approach enables the model to follow instructions formulated in natural language.
- Recommendation training is designed to retain general foundation model capabilities rather than degrade them.
- Preserving text understanding prepares the system for future capabilities such as recommendation explanations.
Giving More Influence to Important Outcomes
To prevent recommendation systems from over-focusing on specific content types, models must avoid assigning excessive weight to high-frequency actions such as binge-watching. Netflix addresses this challenge by implementing reward-weighted training. The approach relies on separate reward models that generate signals reflecting the value of various user engagements. These signals prioritize longer-term outcomes like user retention, exploration, and balanced exposure across diverse content categories.
- Over-weighting frequent actions like binge-watching risks skewing recommendations toward a narrow set of content.
- Netflix mitigates over-concentration of content by adopting reward-weighted training.
- Separate reward models evaluate the value of specific engagement types.
- Signals are optimized for long-term user outcomes, including return behavior, continuous engagement, and exploration.
- The reward mechanism helps balance recommendations across different content types, trending titles, and new releases.
How the Model Produces a Ranked List
Netflix's GenRec model produces ranked recommendation lists by converting user history, context, and metadata into text using a verbalizer component. The underlying LLM processes this text into a pooled hidden state that encapsulates the user's recommendation context. A ranking head then evaluates this context against learned catalog item embeddings using functions like dot products or neural networks. Finally, GenRec normalizes these scores into a distribution via softmax to rank items, with the LLM, ranking head, and embeddings trained jointly.
- GenRec uses a verbalizer to aggregate user watch history, current context, and metadata into a text sequence for the LLM.
- A pooled hidden state provides a compact numerical representation of the user context derived from the LLM's processing.
- A scoring head pairs the user context representation with learned catalog embeddings using a dot product or small neural network to output item scores.
- Scores are normalized with softmax into a probability distribution summing to one to produce the final ranked recommendations.
- Netflix jointly trains the LLM, ranking head, and item embeddings, ensuring the model only recommends items present in the catalog.
How GenRec Makes Recommendations
GenRec operates differently from typical text-generating LLMs by avoiding autoregressive decoding to output recommendations token by token. Instead, Netflix employs prefill-only inference, scoring candidates in a single forward pass via a ranking head after processing the context prompt. The system is served using vLLM alongside distilled models to minimize computational costs. Additionally, Netflix designs prompts with shared prefixes to enable prefix caching, which significantly cuts serving costs as context length decreases.
- GenRec avoids token-by-token autoregressive generation and instead scores recommendations in a single forward pass.
- Netflix defines this method as prefill-only inference, leveraging a ranking head on top of the prefill stage.
- GenRec is served in production using the vLLM inference framework.
- Smaller or distilled models are used alongside GenRec to reduce computational expenses while preserving output quality.
- Prompts are structured with shared prefixes to optimize prefix caching, with a context length reduction to one-third achieving a proportional reduction in serving costs.
How Netflix Evaluates GenRec
The Netflix engineering team evaluates GenRec using both offline evaluation and live A/B testing to ensure comprehensive assessment. Offline evaluation uses historical recorded data and metrics like Mean Reciprocal Rank (MRR) to measure ranking performance before production deployment. In a four-week live A/B test covering roughly 10% of user traffic, GenRec achieved statistically significant improvements of 0.115% in short-term homepage engagement and 0.006% in a core long-term metric.
- Netflix evaluates GenRec using both offline analysis and online live A/B testing.
- Offline evaluation utilizes recorded historical data to assess ranking quality prior to live experiments.
- Mean Reciprocal Rank (MRR) is used offline to reward models for placing relevant items at the top of recommendations.
- A live A/B test was conducted on approximately 10% of traffic over a 4-week period.
- The A/B test achieved statistically significant improvements: 0.115% in a short-term homepage engagement metric and 0.006% in a long-term core metric.
Conclusion
The case study on GenRec highlights a fundamental paradigm shift in the architecture of modern recommendation systems. At companies like Netflix, input design increasingly relies on context engineering to select, format, and efficiently represent relevant historical user data and metadata. Systems can share underlying foundation models across multiple applications by tailoring post-training objectives, reward signals, and output generation. Furthermore, GenRec addresses enterprise-scale infrastructure challenges through optimizations like prefill-only serving to control inference costs.
- Modern recommendation systems are shifting toward LLM-native approaches built around foundation models and context engineering.
- Netflix focuses significant input design efforts on context engineering, including deciding historical data depth, relevant interactions, and metadata representations.
- Multiple recommendation applications can share a single foundation model while varying data, post-training objectives, and reward signals.
- Infrastructure considerations like GPU serving, batching, and caching become critical when operating foundation models at scale.
- Prefill-only serving is leveraged in GenRec to mitigate substantial inference costs.