Menu
Netflix Tech Blog·November 17, 2026

Netflix's AI Discover: Architecture of an LLM-Powered Recommendation System

This article details the architectural decisions and challenges Netflix faced in integrating Large Language Models (LLMs) into their recommendation system for the new AI Discover feature. It introduces an 'intelligence layer' or agent harness designed to combine LLMs with existing recommendation systems to deliver steerable discovery experiences while maintaining Netflix's high standards for speed, reliability, and safety at scale. The design focuses on robust planning, asynchronous execution, and rigorous safety enforcement to overcome LLM limitations.

Read original on Netflix Tech Blog

Introduction to AI Discover's Intelligence Layer

Netflix's AI Discover moves beyond passive recommendations to a 'steerable discovery' experience, allowing members to explore themes. Building this required a new intelligence layer (agent harness) to combine LLMs with existing recommendation systems. This layer is responsible for planning each request, executing it across various systems, serving results, and evaluating performance. The primary challenge was integrating probabilistic LLM outputs into a product demanding governed, reliable, and performant results at Netflix's scale.

Core Architectural Challenges and Solutions

  • Integrating LLMs with existing architecture: The intelligence layer acts as an agent harness, deciding when and how to call LLMs and manage their output, integrating them into a system not originally designed for generative AI.
  • Grounding recommendations: Ensuring LLM picks are real, available titles by combining LLMs with retrieval and ranking systems.
  • Handling slow and unpredictable LLMs: Using LLMs selectively, treating their output as untrusted, and emphasizing pre-shipping performance and quality tests.
  • Adapting to rapid changes: Designing a model and capability agnostic system, allowing easy swapping of models, tools, and prompts via server-side configurations.
  • Building for TV experience: Optimizing for remote navigation, immediate feedback, and slow app update cycles by making page generation asynchronous.
  • Maintaining safety and reliability: Enforcing content rules and standards in code rather than relying on probabilistic LLM output, ensuring a page is always served, even on LLM failure.
  • Learning from member input: Incorporating explicit member feedback (e.g., chosen themes) alongside implicit viewing behavior to shape future recommendations.

System Architecture Overview

When a member selects a theme, the TV app sends the request to the Page Server, which asynchronously hands it to the intelligence layer. This layer comprises two main components:

  • Controller: Gathers context (real-time signals, member details from Memory Hub), decides on a plan (either established or LLM-drafted), validates the plan (e.g., approved steps, no loops, single page output), and checks the final result.
  • Executor: Runs the validated plan. Steps (capabilities like retrieval, ranking, generation) pass typed outputs via declared contracts. Independent steps run in parallel with their own deadlines and fallbacks. Critical checks before and during execution ensure 'governed execution' within set limits.
💡

Key Design Philosophy: Plan-and-Execute Agent

Netflix opted for a 'plan-and-execute' agent model. An LLM can *propose* a plan, but custom code *validates* and *executes* it. This ensures safety, reliability, and predictable performance, contrasting with a flexible but unpredictable 'reason-call-tool-reason' loop. Established plans serve as fallbacks if a new LLM-drafted plan fails validation.

Asynchronous Page Generation for LLM Latency

Generative AI can introduce significant latency. To maintain a responsive TV experience, Netflix implemented an asynchronous page generation path. The initial user request returns immediately with an acknowledgment, and the TV app shows a 'thinking' state. The executor processes the LLM-involved plan in the background. Once results are ready, the server notifies the TV, which then fetches the completed page. This decouples user perceived latency from LLM inference time, ensuring a healthy serving path and immediate UI feedback.

Enforcing Safety and Reliability in Code

Instead of relying on LLM prompts for safety, critical rules are enforced in code. This includes content standards, maturity ratings, and access controls. Generated text undergoes cleanup, and the planner receives a stripped-down request, with member details only provided to validated plan steps. This also protects against prompt injection. Structured request records, detailing plans, step outcomes, and applied rules, enable post-mortem analysis and continuous system improvement.

NetflixLLMRecommendation SystemAgentic AIAsynchronous ProcessingSystem ArchitectureScalabilityGenerative AI

Comments

Loading comments...