Sitemap
Welcome Offer
Access to everything. Now 30% off.
Upgrade now
Upgrade now

Netflix TechBlog

Learn about Netflix’s world class engineering efforts, company culture, product developments and more.

Featured精选

LLM
Recommendation System推荐系统
Genai生成式 AI
NetflixNetflix
Large Language Models大型语言模型

GenRec: Towards LLM-Native Recommendation at NetflixGenRec:迈向 Netflix 的 LLM 原生推荐系统

Netflix Technology Blog
Netflix Technology BlogNetflix 技术博客
12 min read阅读需 12 分钟5 days ago

285

Authors: Ying Li, Arjun Rao, Shradha Sehgal作者:Ying Li, Arjun Rao, Shradha Sehgal

Introduction简介

Recommendations sit at the heart of the Netflix experience. Our current production models rely on thousands of hand‑crafted features over users, items, and interactions, along with specialized architectures for sequence modeling, feature interactions, and multi‑task objectives. This stack has evolved over many years to support diverse content types (movies, series, games, live, podcasts) and product surfaces, but its complexity makes it costly to onboard new use cases: adding a content type or surface can require significant feature engineering, architecture change, infrastructure work, and experimentation.推荐系统是 Netflix 用户体验的核心。我们目前的生产模型依赖于数以千计针对用户、内容和交互而手工设计的特征,并结合了用于序列建模、特征交互和多任务目标的专门架构。这套技术栈经过多年演进,以支持多种内容类型(电影、剧集、游戏、直播、播客)和产品界面。然而,其复杂性导致引入新用例的成本高昂:添加一种内容类型或界面往往需要进行大量的特征工程、架构调整、基础设施建设以及实验工作。

At the same time, large language models (LLMs) are changing how we think about recommendation, as shown by recent work such as PLUM, GLIDE, and OneRec-Think. Their broad world knowledge and strong language understanding make it possible to represent user histories and item metadata directly as text, capture rich relationships in a shared semantic space, and steer recommendations via natural‑language prompts. However, off‑the‑shelf LLMs are still far from production‑ready recommenders: they often over‑recommend globally popular content, hallucinate out‑of‑catalog items, ignore business constraints, and provide only limited personalization.与此同时,大型语言模型(LLM)正在改变我们对推荐系统的认知,正如 PLUM、GLIDE 和 OneRec-Think 等近期研究所示。LLM 广泛的世界知识和强大的语言理解能力,使得直接将用户历史记录和内容元数据表示为文本成为可能,从而在共享的语义空间中捕捉丰富的关系,并通过自然语言提示(Prompt)来引导推荐。然而,现成的 LLM 距离生产环境下的推荐系统还有很大差距:它们往往过度推荐全球热门内容,产生目录之外的“幻觉”内容,忽略业务约束,且个性化程度有限。

To address this, we built GenRec, an LLM‑backed recommendation ranker that post‑trains an internal foundation LLM on Netflix‑specific data and objectives. GenRec shows that an LLM‑based ranker can match or exceed a mature production system while relying on far fewer labeled examples and input signals.为了解决这一问题,我们构建了 GenRec。这是一个基于 LLM 的推荐排序器,通过在 Netflix 特有的数据和目标上对内部基础 LLM 进行后训练(Post-training)而成。GenRec 表明,基于 LLM 的排序器在依赖更少标注样本和输入信号的情况下,能够达到甚至超过成熟生产系统的水平。

Press enter or click to view image in full size按回车键或点击以查看全尺寸图片
Figure 1: GenRec pipeline. Raw logs of user history, item metadata, and context are transformed via context engineering into natural-language prompts and fed into the GenRec, which runs on vLLM in prefill-only mode and outputs scores for each catalog item, yielding a recommendation ranking.图 1:GenRec 流水线。用户历史、内容元数据和上下文的原始日志通过上下文工程转化为自然语言提示,输入到运行在 vLLM(仅预填充模式)上的 GenRec 中。模型输出每个目录内容的得分,从而生成推荐排序。

At a high level, GenRec:概括而言,GenRec 具有以下特点:

  • Verbalizes user histories, item metadata, and context as text.将用户历史、内容元数据和上下文转化为文本。
  • Post‑trains a Netflix‑adapted foundation LLM for ranking.对适配 Netflix 的基础 LLM 进行排序任务的后训练。
  • Adds a catalog‑aware scoring head over Netflix titles.在 Netflix 内容之上添加了一个感知目录的评分头(Scoring head)。
  • Uses reward signals to align with long‑term member value and business goals.利用奖励信号与长期会员价值及业务目标对齐。
  • Runs in prefill‑only mode on Netflix’s LLM serving stack for cost efficiency.在 Netflix 的 LLM 服务栈上以“仅预填充(prefill-only)”模式运行,以实现成本效益。

In a large‑scale A/B test against a well‑tuned production ranker, GenRec achieves statistically significant improvements in both short‑term and long‑term online metrics, while using only a small fraction of the Phase‑2 labeled data and input signals. It reduces our reliance on hand‑engineered features and shifts the focus from feature engineering to context engineering. In this blog post, we will describe how GenRec works, how it performs, and why we believe it points toward a more LLM‑centric future for recommendation at Netflix.在大规模 A/B 测试中,与经过深度调优的生产排序器相比,GenRec 在短期和长期在线指标上均取得了具有统计学意义的显著提升,且仅使用了极少量的第二阶段标注数据和输入信号。它减少了我们对手工特征工程的依赖,并将重心从特征工程转向了上下文工程。在本篇博客中,我们将介绍 GenRec 的工作原理、性能表现,以及为什么我们认为它预示着 Netflix 推荐系统将迈向更加以 LLM 为中心的未来。

Problem Setting问题设定

We focus on a full‑catalog ranking task (or top‑K ranking when a candidate set is provided).我们专注于全目录排序任务(或在提供候选集时的 Top-K 排序)。

Given a user 𝑢, their interaction history 𝐻, and the current context 𝜏 (device, surface, locale, time, etc.), GenRec scores each item and produces a personalized ranking that can directly power recommendations or serve as input for downstream personalization systems.给定用户 𝑢、其交互历史 𝐻 以及当前上下文 𝜏(设备、界面、地区、时间等),GenRec 为每个内容打分并生成个性化排序,这些排序可直接驱动推荐或作为下游个性化系统的输入。

Formally, we map a request (u,τ,t,H) — user, context, time, and history — to a ranking 𝜋 over the catalog C, where π(i) is the position assigned to item i. We optimize π for expected long‑term member utility (a proxy for satisfaction and retention), not just short‑term engagements.从形式上讲,我们将一个请求 (u,τ,t,H)(即用户、上下文、时间和历史)映射到目录 C 上的排序 𝜋,其中 π(i) 是赋予内容 i 的位置。我们优化的目标是 π 对长期会员效用(作为满意度和留存率的代理指标)的期望,而不仅仅是短期参与度。

From Foundation LLM to Recommendation Ranker从基础 LLM 到推荐排序器

GenRec follows a two‑phase training framework (Figure 2):GenRec 遵循两阶段训练框架(图 2):

Press enter or click to view image in full size
Figure 2: Two Phase Framework. Phase 1 trains a foundational LLM on Netflix data for user and content understanding, and Phase 2 post-trains on ranking-specific data and objectives.图 2:两阶段框架。第一阶段在 Netflix 数据上训练一个基础 LLM 以实现用户和内容理解;第二阶段在排序特定的数据和目标上进行后训练。

Phase 1 — Netflix-Adapted Foundation LLM.第一阶段 — 适配 Netflix 的基础 LLM。

We start from an open‑source LLM and adapt it on proprietary Netflix corpora, so it learns foundational capabilities such as我们从开源 LLM 开始,并在 Netflix 专有的语料库上进行适配,使其学习基础能力,例如:

  • Netflix content understandingNetflix 内容理解
  • Member behavior and preference patterns会员行为和偏好模式
  • General language understanding and generation.通用语言理解和生成。

Phase 1 is updated relatively infrequently and serves as a shared, Netflix‑aware backbone for many applications.第一阶段的更新频率相对较低,并作为许多应用共享的、具备 Netflix 认知的基座模型。

Phase 2GenRec.第二阶段 — GenRec。

We then turn this foundation model into a high‑quality ranking model by post‑training on ranking‑specific data and objectives. Phase 2:随后,我们通过在排序特定的数据和目标上进行后训练,将该基础模型转化为高质量的排序模型。第二阶段:

  • Focuses on ranking quality and steering专注于排序质量和引导
  • Incorporates multiple reward signals via reward‑weighted losses通过奖励加权损失函数整合多个奖励信号
  • Is refreshed more frequently to track new content and evolving tastes更频繁地刷新以追踪新内容和不断演变的品味
  • Is explicitly optimized under serving cost constraints.在服务成本约束下进行显式优化。

Training Data as Conversations将训练数据视为对话

Netflix members generate hundreds of billions of interaction events spanning many surfaces (views, plays, durations, thumbs up/down, add to list, abandons, etc.). We convert this log data into single‑turn or multi‑turn “conversations” between a user and a recommender. Each turn contains:Netflix 会员在多个界面上产生了数千亿次的交互事件(观看、播放、时长、点赞/点踩、添加到列表、中途放弃等)。我们将这些日志数据转换为用户与推荐系统之间的“单轮”或“多轮”对话。每一轮包含:

  • User message: verbalized context, profile, history, item metadata, and task (e.g., recommend what the user will watch or thumb next).用户消息:口语化的上下文、个人资料、历史记录、内容元数据和任务(例如,推荐用户接下来会观看或点赞的内容)。
  • Assistant message: the member’s actual engagement (e.g., which titles were played, for how long, what feedback they provided).助手消息:会员的实际参与情况(例如,播放了哪些内容、播放时长、提供的反馈)。

During Phase‑2 training, the LLM learns how assistant messages depend on user messages. This allows us to express rich recommendation signals as text, jointly supporting both the language-modeling (LM) and ranking objectives.在第二阶段训练期间,LLM 学习助手消息如何依赖于用户消息。这使我们能够将丰富的推荐信号表达为文本,共同支持语言建模(LM)和排序目标。

At inference time, we feed in the verbalized context and apply a catalog‑aware scoring head to rank items; we do not decode assistant messages. The conversational format is primarily used during training to support the LM objective and preserve strong language understanding over the verbalized text.在推理阶段,我们输入口语化的上下文并应用感知目录的评分头对内容进行排序;我们不解码助手消息。对话格式主要在训练期间使用,以支持 LM 目标并保持对口语化文本的强大语言理解能力。

Verbalization and Context Engineering口语化处理与上下文工程

Traditional recommenders operate on dense features and embeddings. GenRec takes a different approach: it verbalizes rich user histories and context as natural language, encoding raw interaction signals directly in the LLM’s semantic space. In doing so, it relies on the model to discover higher‑level patterns — such as item relationships and evolving user interests — rather than on manual feature engineering.传统的推荐系统基于稠密特征和嵌入(Embedding)运行。GenRec 采取了不同的方法:它将丰富的用户历史和上下文口语化为自然语言,直接将原始交互信号编码进 LLM 的语义空间。在此过程中,它依赖模型去发现更高级的模式——如内容关系和用户兴趣的演变——而不是依赖人工特征工程。

Naively verbalizing every interaction in a user’s history can quickly exceed the token budget and be too expensive at Netflix scale. The context window becomes our new “feature budget”, so we apply context engineering:天真地将用户历史中的每一次交互都口语化,很快就会超出 Token 预算,且在 Netflix 的规模下成本过高。上下文窗口成为了我们新的“特征预算”,因此我们应用了上下文工程:

  • Retain in full: high‑signal engagements (e.g., long plays, thumbs‑up) with richer details完整保留:高信号参与度(例如,长时长播放、点赞)及更丰富的细节
  • Omit: low‑signal events (e.g., very short plays or quick hovers)省略:低信号事件(例如,极短时间的播放或快速悬停)
  • Summarize or compress: repetitive behaviors (e.g., binge‑watching )总结或压缩:重复性行为(例如,刷剧)
  • Elaborate selectively: important or cold‑start items (e.g., new releases)有选择地详细说明:重要内容或冷启动内容(例如,新发布的内容)

Within a fixed token budget, we prioritize recent, high‑signal history and compress or drop older history. We also structure the prompt to maximize shared prefixes for better prefix caching. The goal is a compact, high‑information prompt that preserves ranking quality without prohibitive costs.在固定的 Token 预算内,我们优先考虑近期的高信号历史,并压缩或丢弃较旧的历史记录。我们还构建了提示词以最大化共享前缀,从而实现更好的前缀缓存。目标是生成一个紧凑、高信息量的提示词,在不产生过高成本的前提下保持排序质量。

Objectives: Ranking, Language, and Rewards目标:排序、语言与奖励

The overall GenRec model is trained with a multi‑objective loss that combines a recommendation ranking objective, language modeling objectives, and alignment via reward‑weighted training.GenRec 模型整体使用多目标损失函数进行训练,结合了推荐排序目标、语言建模目标,以及通过奖励加权训练实现的对齐。

1. Catalog‑Aware Ranking Objective1. 感知目录的排序目标

The primary task is a ranking objective that teaches the model to score items by engagement quality. We label positives using high‑value engagements (e.g., sufficiently long plays, strong explicit feedback), with thresholds and denoising logic, and train the model — via a cross‑entropy loss over the catalog or candidate set — to assign higher scores to these positives given a verbalized context.主要任务是一个排序目标,教会模型根据参与质量对内容进行评分。我们使用高价值参与(例如,足够长的播放时长、强显式反馈)来标记正样本,并配合阈值和去噪逻辑,通过目录或候选集上的交叉熵损失进行训练,使模型在给定口语化上下文的情况下,为这些正样本分配更高的分数。

2. Language Modeling Objective2. 语言建模目标

We also retain a language modeling (LM) objective over the verbalized inputs and outputs. This helps preserve the model’s general language understanding, improves its ability to interpret rich natural‑language histories and item metadata, and keeps the door open for text‑generation use cases such as recommendation explanations.我们还在口语化的输入和输出上保留了语言建模(LM)目标。这有助于保持模型的通用语言理解能力,提高其解释丰富自然语言历史和内容元数据的能力,并为推荐解释等文本生成用例留出了空间。

3. Reward‑Weighted Loss for Alignment3. 用于对齐的奖励加权损失函数

Beyond raw ranking accuracy, GenRec must (1) respect business requirements — for example, balancing movies, series, games, live, and podcasts — and (2) optimize long‑term member satisfaction rather than just immediate clicks or plays.除了原始的排序准确性,GenRec 还必须 (1) 遵守业务需求——例如,平衡电影、剧集、游戏、直播和播客之间的比例;(2) 优化长期会员满意度,而非仅仅是即时的点击或播放。

Become a Medium member

Training only on raw interaction sequences can lead to undesirable behaviors, such as over‑favoring binge‑watching or over‑focusing on a single content type. To address this, we weight the ranking loss using signals from separate reward models. Each training example receives a scalar weight derived from two types of signals:仅在原始交互序列上进行训练可能导致不良行为,例如过度偏向刷剧或过度关注单一内容类型。为了解决这个问题,我们使用来自独立奖励模型的信号对排序损失进行加权。每个训练样本都会根据两类信号获得一个标量权重:

  • Long‑term satisfaction proxies: estimate how much a short‑term engagement contributes to long‑term outcomes, such as return behavior, catalog exploration, or sustained engagement.长期满意度代理指标:评估短期参与度对长期结果(如回访行为、目录探索或持续参与)的贡献程度。
  • Behavior rebalancing: adjust behaviors across content types and launch stages (for example, games vs. movies, new releases vs. evergreen titles) to better align with business goals.行为再平衡:调整不同内容类型和发布阶段的行为(例如,游戏与电影,新发布与长青内容),以更好地与业务目标对齐。

The example’s ranking loss is then scaled by this weight: high‑value engagements receive larger weights, and low‑value ones are down‑weighted. This reward‑weighted approach is simpler and more cost-efficient than full reinforcement learning, yet provides effective alignment in practice. We have seen additional gains from RL‑style methods (e.g., GRPO), but leave them to future work due to their higher cost.样本的排序损失会根据此权重进行缩放:高价值参与获得更大的权重,低价值参与则被降低权重。这种奖励加权方法比完全的强化学习更简单且更具成本效益,但在实践中提供了有效的对齐。我们已经看到 RL 风格方法(如 GRPO)带来的额外收益,但由于其成本较高,我们将留待未来研究。

Model Architecture and Serving模型架构与服务

Backbone and Scoring Head基座与评分头

GenRec’s architecture closely follows our foundational LLM: a decoder‑only Transformer trained with next‑token‑prediction style objectives, augmented with a catalog‑aware ranking head that scores only Netflix in-catalog items. The scoring pipeline works as follows:GenRec 的架构紧随我们的基础 LLM:一个仅解码器(Decoder-only)的 Transformer,采用下一词预测(Next-token-prediction)风格的目标进行训练,并增加了感知目录的排序头,仅对 Netflix 目录内的内容进行评分。评分流水线如下:

  1. Verbalization: A verbalizer V serializes user history H, context 𝜏 , and relevant item metadata into a single text sequence x.口语化处理:口语化器 V 将用户历史 H、上下文 𝜏 和相关内容元数据序列化为单一文本序列 x。
  2. Pooled representation: The LLM processes x, and we extract a pooled hidden state h that summarizes the user’s current preferences and context.池化表示:LLM 处理 x,我们提取一个池化隐藏状态 h,总结用户的当前偏好和上下文。
  3. Catalog‑aware scoring: Each catalog item i has a learned embedding eᵢ. A scoring head ϕ combines h and eᵢ (e.g., via dot product or small MLP) to produce a score s. Applying a softmax over scores yields a probability distribution which we convert into a ranking π.感知目录评分:每个目录内容 i 都有一个学习到的嵌入 eᵢ。评分头 ϕ 将 h 和 eᵢ 结合(例如通过点积或小型 MLP)产生分数 sᵢ。对分数应用 Softmax 得到概率分布,我们将其转换为排序 π。

All parameters — the backbone, scoring head, and item embeddings — are trained jointly. For very large catalogs, we can use sampled softmax or candidate sets for efficient training and inference. This architecture constrains recommendations to the Netflix catalog while supporting efficient scoring over large candidate sets.所有参数——基座、评分头和内容嵌入——均联合训练。对于超大规模目录,我们可以使用采样 Softmax 或候选集以实现高效的训练和推理。这种架构将推荐限制在 Netflix 目录内,同时支持在大规模候选集上的高效评分。

Serving and Cost Optimization服务与成本优化

GenRec is served on Netflix’s internal LLM stack using vLLM. At Netflix scale, serving cost is driven primarily by 1) Model size; 2) Context length; 3) Inference mode (prefill vs. autoregressive decoding). We control cost through three strategies:GenRec 使用 vLLM 在 Netflix 内部 LLM 栈上提供服务。在 Netflix 的规模下,服务成本主要由以下因素驱动:1) 模型大小;2) 上下文长度;3) 推理模式(预填充 vs. 自回归解码)。我们通过三种策略控制成本:

  • Smaller / distilled models: We train GenRec on smaller or distilled foundation models, often with larger or more targeted datasets, to capture most of the quality of larger models at lower serving cost.更小/蒸馏模型:我们在更小或经过蒸馏的基础模型上训练 GenRec,通常配合更大或更具针对性的数据集,以较低的服务成本捕获大型模型的大部分性能。
  • Aggressive context compaction: Using the context engineering described earlier, we minimize tokens while preserving ranking quality.激进的上下文压缩:利用前述的上下文工程,我们在保持排序质量的同时最小化 Token 数量。
  • Prefill‑only inference: Autoregressive decoding over large candidate sets would be prohibitively expensive. Instead, we run in prefill‑only mode: the model consumes the prompt once and scores the entire candidate set in a single forward pass, with no token‑by‑token decoding.仅预填充推理:在大规模候选集上进行自回归解码成本极其高昂。相反,我们运行在“仅预填充”模式下:模型一次性消耗提示词,并在单次前向传播中对整个候选集进行评分,无需逐个 Token 解码。

Together, these choices make it feasible to serve GenRec on high‑volume workloads within compute budgets.综合这些选择,使得在计算预算范围内以高流量负载运行 GenRec 成为可能。

Offline and Online Experiments离线与在线实验

We evaluated GenRec against a mature production ranker that has been tuned over many years. The baseline model relies on thousands of engineered dense and embedding features, as well as custom architectures for modeling feature interactions and sequences. We assessed performance using both offline evaluation metrics and a large‑scale online A/B test.我们评估了 GenRec 与一个经过多年调优的成熟生产排序器的对比情况。基准模型依赖于数以千计的工程化稠密特征和嵌入特征,以及用于建模特征交互和序列的自定义架构。我们通过离线评估指标和大规模在线 A/B 测试评估了性能。

GenRec vs Production BaselineGenRec 与生产基准的对比

Offline, GenRec outperformed the production ranker on ranking metrics despite using far fewer input signals and labeled examples. With roughly 40× fewer Phase‑2 labeled training examples, GenRec achieved about +1.6% improvement in Mean Reciprocal Rank (MRR). As we increased Phase‑2 training data and enriched the input signals, GenRec’s offline metrics continued to improve.离线评估中,尽管使用的输入信号和标注样本少得多,GenRec 在排序指标上仍优于生产排序器。在第二阶段标注训练样本减少约 40 倍的情况下,GenRec 在平均倒数排名(MRR)上实现了约 +1.6% 的提升。随着我们增加第二阶段训练数据并丰富输入信号,GenRec 的离线指标持续改进。

Online, we ran a large A/B test on batch‑compute recommendation surfaces, covering ~10% of Netflix traffic over ~4 weeks. In this low‑data, low‑signal configuration, GenRec delivered statistically significant gains over the production baseline on both short‑term and long‑term online metrics (Figure 3).在线方面,我们对批处理推荐界面进行了大规模 A/B 测试,覆盖了约 4 周内约 10% 的 Netflix 流量。在这种低数据、低信号的配置下,GenRec 在短期和长期在线指标上均比生产基准实现了具有统计学意义的显著增长(图 3)。

These results indicate that a properly post‑trained and aligned LLM‑backed ranker can be a strong alternative to traditional recommendation models, with substantial headroom as we further scale data and input signals.这些结果表明,一个经过适当后训练和对齐的、基于 LLM 的排序器可以成为传统推荐模型的有力替代方案,并且随着我们进一步扩展数据和输入信号,仍有巨大的提升空间。

Press enter or click to view image in full size
Figure 3: Online metrics of GenRec vs. production model. GenRec achieves statistically significant improvements on both short-term and long-term online metrics.图 3:GenRec 与生产模型的在线指标对比。GenRec 在短期和长期在线指标上均取得了具有统计学意义的显著提升。

Data, Model, and Phase Contributions数据、模型与阶段贡献

We ran ablations to understand where GenRec’s gains come from.我们进行了消融实验,以了解 GenRec 的收益来源。

Data and Model Scaling数据与模型扩展

  • Data scaling: For both ~1B and ~10B parameter backbones, offline MRR improves as we increase Phase‑2 post‑training data. Larger models reach higher absolute MRR but follow a similar scaling curve (see Figure 4).数据扩展:对于约 1B 和约 10B 参数的基座模型,离线 MRR 均随着我们增加第二阶段后训练数据而提高。更大的模型达到更高的绝对 MRR,但遵循相似的扩展曲线(见图 4)。
  • Model scaling: Under a fixed training budget, we post‑trained GenRec variants from ~1B to ~10B parameters. Within this budget, larger backbones consistently achieved higher offline MRR than smaller ones.模型扩展:在固定训练预算下,我们对从约 1B 到约 10B 参数的 GenRec 变体进行了后训练。在此预算内,更大的基座模型始终比更小的模型获得更高的离线 MRR。
Press enter or click to view image in full size
Figure 4: GenRec Phase-2 data scaling for the∼10B model.图 4:约 10B 模型在 GenRec 第二阶段的数据扩展情况。

Phase-1 vs. OSS, Phase-2 vs. Phase-1第一阶段 vs. 开源模型,第二阶段 vs. 第一阶段

  • Phase-1 vs. OSS: Using the Phase‑1 Netflix‑adapted foundation LLM as the base model improves offline ranking metrics by roughly 10–20% compared to starting directly from an off‑the‑shelf LLM.第一阶段 vs. 开源模型:使用适配 Netflix 的第一阶段基础 LLM 作为基座模型,相比直接从现成的开源 LLM 开始,离线排序指标提高了约 10–20%。
  • Phase-2 vs. Phase-1: Phase‑2 post‑training adds another 35–50% gain in offline ranking metrics when evaluated near the Phase‑1 training cutoff (i.e. when Phase‑1 model is the freshest). As time passes and Phase‑1 becomes stale with new content and shifting tastes, the relative benefit of Phase 2 grows to about 80% after 2 weeks.第二阶段 vs. 第一阶段:当在第一阶段训练截止日期附近评估时(即第一阶段模型最新时),第二阶段后训练在离线排序指标上额外增加了 35–50% 的收益。随着时间推移,当第一阶段模型因新内容和用户品味变迁而变得陈旧时,第二阶段的相对收益在 2 周后增长至约 80%。
Press enter or click to view image in full size

Data efficiency vs. production ranker数据效率 vs. 生产排序器

  • Starting from a strong Phase‑1 model, GenRec matches or exceeds the production ranker using 10–40× fewer Phase‑2 labeled examples, depending on configuration. This marginal data efficiency is especially valuable because Phase 2 is refreshed far more frequently than Phase 1.从强大的第一阶段模型开始,GenRec 使用比生产排序器少 10–40 倍的第二阶段标注样本(取决于配置)即可匹配或超越其性能。这种边际数据效率尤为宝贵,因为第二阶段的刷新频率远高于第一阶段。

Context Length Optimization上下文长度优化

Context length drives both quality and cost: longer verbalizations expose more behavior and context but increase training and serving cost. To study this trade‑off, we varied context length and verbosity and optimized them in three steps:上下文长度同时驱动质量和成本:更长的口语化文本揭示了更多行为和上下文,但也增加了训练和服务成本。为了研究这种权衡,我们改变了上下文长度和冗余度,并通过三个步骤进行了优化:

  1. Clean and compress events: drop low‑signal engagements and compress repetitive behavior to form a cleaned sequence of events.清理并压缩事件:丢弃低信号参与度事件并压缩重复行为,形成清理后的事件序列。
  2. Find the “elbow point”: vary how many historical events we include and plot MRR vs. number of events to identify an elbow beyond which additional context yields diminishing returns (see Figure 5).寻找“肘点”:改变包含的历史事件数量,绘制 MRR 与事件数量的关系图,以识别一个肘点,超过该点后增加上下文带来的收益递减(见图 5)。
  3. Optimize verbosity: for the retained events, test different levels of details and simplified wordings, measuring MRR each time.优化冗余度:对于保留的事件,测试不同级别的细节和简化措辞,并每次测量 MRR。

In our experiments, we can reduce the context tokens to roughly one-third of the original budget with negligible degradation in offline ranking metrics. Since serving cost is approximately proportional to context length, we observed a similar reduction in serving cost.在我们的实验中,可以将上下文 Token 减少到原始预算的三分之一左右,而离线排序指标几乎没有下降。由于服务成本大致与上下文长度成正比,我们观察到服务成本也出现了类似的降低。

Press enter or click to view image in full size
Figure 5: Offline ranking metric (MRR) vs. number of user engagement events included in the prompt. The dashed line marks the elbow point: increasing the number of events beyond this yields diminishing returns.图 5:离线排序指标 (MRR) 与提示词中包含的用户参与事件数量的关系。虚线标记了肘点:超过此点增加事件数量带来的收益递减。

Towards LLM‑Native Recommendation迈向 LLM 原生推荐

GenRec is more than “swapping in a Transformer” for an existing ranker. It hints at a broader shift toward LLM‑native recommendation at Netflix. A few notable changes:GenRec 不仅仅是为现有排序器“换上一个 Transformer”。它预示着 Netflix 迈向 LLM 原生推荐的更广泛转变。一些显著的变化包括:

From Feature Engineering to Context Engineering从特征工程到上下文工程

Traditional RecSys stacks revolve around large feature sets and heavy feature infrastructure. LLM‑centric systems instead revolve around constructing rich textual contexts from raw logs, metadata, and tools. The “prompt” becomes the new feature vector.传统的推荐系统栈围绕着庞大的特征集和沉重的特征基础设施。而以 LLM 为中心的系统则围绕着从原始日志、元数据和工具中构建丰富的文本上下文。提示词(Prompt)成为了新的特征向量。

Modeling effort shifts from designing features to deciding which signals to include, how far back in time to go, how to compress or summarize history within a token budget. Our experiments on verbalization compaction illustrate this shift: careful context design can preserve quality while dramatically reducing serving cost.建模工作从设计特征转向决定包含哪些信号、回溯多远的时间、如何在 Token 预算内压缩或总结历史。我们在口语化压缩方面的实验说明了这种转变:精心的上下文设计可以在大幅降低服务成本的同时保持质量。

From Customized Architectures to Foundation Backbones从定制架构到基础基座

Historically, each recommendation task often had its own custom architecture (two‑tower models, DLRM‑style networks, bespoke attention blocks). In an LLM‑centric world, many tasks share a common foundation backbone, with differentiation coming from data and verbalization strategies, post‑training objectives and rewards, and inference optimization.历史上,每个推荐任务往往都有其自定义架构(双塔模型、DLRM 风格网络、专用注意力模块)。在 LLM 为中心的世界里,许多任务共享一个通用的基础基座,差异化来自于数据和口语化策略、后训练目标和奖励,以及推理优化。

GenRec leverages the same backbone as our foundation LLM rather than introducing a new architecture built from scratch. This makes it easier to share learnings across applications, and opens the door to natural‑language steering for future experiences.GenRec 利用与我们基础 LLM 相同的基座,而不是引入从头构建的新架构。这使得跨应用分享经验变得更容易,并为未来体验中的自然语言引导打开了大门。

Scaling Laws as Design Guides扩展定律作为设计指南

Traditional RecSys can hit diminishing returns due to sparse IDs, heavy engineering objectives, and task‑specific architectures. With an LLM‑backed backbone, recommendation inherits clearer data and model scaling behavior: within cost limits, more data and larger models consistently improve quality. This brings RecSys design closer to the broader LLM paradigm, where scaling laws help guide model and data investment.传统的推荐系统由于稀疏 ID、繁重的工程目标和任务特定架构,可能会遇到收益递减的问题。有了基于 LLM 的基座,推荐系统继承了更清晰的数据和模型扩展行为:在成本限制内,更多的数据和更大的模型始终能提高质量。这使推荐系统设计更接近更广泛的 LLM 范式,即扩展定律有助于指导模型和数据投资。

From RecSys Infra to LLM Infra从推荐系统基础设施到 LLM 基础设施

LLM‑backed recommenders push us toward LLM‑style infrastructure: GPU‑accelerated, vLLM/Triton‑based, with careful batching and caching. Over time, recommendation serving infra starts to look more like general LLM infra than classic RecSys stacks built around MLPs or factorization models.基于 LLM 的推荐系统推动我们向 LLM 风格的基础设施发展:GPU 加速、基于 vLLM/Triton,并进行精细的批处理和缓存。随着时间的推移,推荐服务基础设施看起来更像通用的 LLM 基础设施,而不是围绕 MLP 或因子分解模型构建的经典推荐系统栈。

Conclusions结论

We have presented GenRec, an LLM‑backed recommendation ranker at Netflix that adapts an internal foundation LLM for large‑scale personalization. By verbalizing user histories, context, and item metadata, adding a catalog‑aware ranking head, using reward‑weighted objectives aligned to long‑term satisfaction and business goals, and serving efficiently on our LLM infrastructure, we obtain a model that improves on a strong production ranker while using far fewer Phase‑2 labels and input signals.我们介绍了 GenRec,这是一个 Netflix 的 LLM 辅助推荐排序器,它适配了内部基础 LLM 以实现大规模个性化。通过口语化用户历史、上下文和内容元数据,添加感知目录的排序头,使用与长期满意度和业务目标对齐的奖励加权目标,并在我们的 LLM 基础设施上高效服务,我们获得了一个模型,它在比生产排序器使用更少第二阶段标注和输入信号的情况下,实现了性能提升。

GenRec is an early but promising step toward a more LLM‑centric recommendation stack at Netflix. Our results suggest that, with careful attention to cost, infrastructure, and alignment, LLM‑backed recommenders can play a central role in large‑scale personalization.GenRec 是 Netflix 迈向更加以 LLM 为中心的推荐栈的早期但有希望的一步。我们的结果表明,通过对成本、基础设施和对齐的精心关注,基于 LLM 的推荐系统可以在大规模个性化中发挥核心作用。

Acknowledgments致谢

GenRec is the result of close collaboration among multiple teams and organizations across Netflix. The contributors to this work (in alphabetical order):GenRec 是 Netflix 多个团队和组织密切合作的结果。此项工作的贡献者(按字母顺序排列):

AI for members: Arjun Rao, Ashish Rastogi, Baolin Li, Fernando Amat Gil, Grace Huang, Justin Basilico, Kamelia Aryafar, Linas Baltrunas, Moumita Bhattacharya, Ogheneovo Dibie, Rein Houthooft, Shradha Sehgal, Sejoon Oh, Sergi Perez, Sourabh Medapati, Thea Wang, Yaochen Zhu, Yesu Feng, Ying Li, Yun Li, Yucheng Shi, Yunan Hu会员 AI 团队:Arjun Rao, Ashish Rastogi, Baolin Li, Fernando Amat Gil, Grace Huang, Justin Basilico, Kamelia Aryafar, Linas Baltrunas, Moumita Bhattacharya, Ogheneovo Dibie, Rein Houthooft, Shradha Sehgal, Sejoon Oh, Sergi Perez, Sourabh Medapati, Thea Wang, Yaochen Zhu, Yesu Feng, Ying Li, Yun Li, Yucheng Shi, Yunan Hu

AI platform and serving: Abhishek Agrawal, Adam Singer, Binh Tang, Daneo Zhang, Derek Olejnik, Ed Maddox, Erik Osheim, Lingyi Liu, Liping Peng, Meghana Chilukuri, Nicolas Hortiguera, Shaojing Li, ZQ ZhangAI 平台与服务团队:Abhishek Agrawal, Adam Singer, Binh Tang, Daneo Zhang, Derek Olejnik, Ed Maddox, Erik Osheim, Lingyi Liu, Liping Peng, Meghana Chilukuri, Nicolas Hortiguera, Shaojing Li, ZQ Zhang

Product: Ilke Kaya, Michelle Kislak, Scarlet Chen, Si Cheng产品团队:Ilke Kaya, Michelle Kislak, Scarlet Chen, Si Cheng

LLM
Recommendation System
Genai
Netflix
Large Language Models

Netflix TechBlog
Netflix TechBlog

Published in Netflix TechBlog

Learn about Netflix’s world class engineering efforts, company culture, product developments and more.

Netflix Technology Blog
Netflix Technology Blog

Written by Netflix Technology Blog

Learn more about how Netflix designs, builds, and operates our systems and engineering organizations