Menu
Meta Engineering·November 10, 2026

Designing a Personalized AI-Powered Recommendation System at Scale

This article details Meta's "Your algorithm" system, an end-to-end AI-powered recommendation platform for Facebook Feed and Reels. It outlines the architecture for integrating natural language preferences with implicit signals, leveraging LLMs for preference management, and optimizing content delivery for responsiveness and balance. The system design addresses challenges in adapting to user intent quickly and filtering unwanted content effectively across a vast content ecosystem.

Read original on Meta Engineering

Overview of "Your Algorithm" System Architecture

Meta's "Your algorithm" is an advanced recommendation system designed to give users more control over their Facebook Feed and Reels. It shifts from purely implicit engagement signals to incorporate explicit natural language preferences. The system integrates various AI-powered tools, primarily Large Language Models (LLMs), to understand, store, and apply user-stated interests and dislikes, aiming for greater transparency, steerability, and responsiveness in recommendations.

Core Components and Their Functions

The system features several critical components that manage the full lifecycle of a user preference:

  • Profile Generation: Builds an initial interest profile and a "Lately Summary" using LLMs to infer interests from past activity, providing a recognizable starting point for users.
  • Preference Management: Validates user-added interests using smaller, efficient LLMs, enriches them with signals for ranking, and saves them to a shared store accessible by both Feed and Reels.
  • Ranking: Applies "Interested In" and "Not Interested In" lists throughout the content funnel, ensuring relevant content promotion and unwanted content demotion.
  • Delivery Optimization: Ensures responsiveness by using mechanisms like supplementary tail loads for new interests and cache invalidation for removed interests, to quickly reflect preference changes in the displayed content.

Addressing Recommendation Challenges with LLMs

The article highlights three distinct problems in turning stated preferences into responsive recommendations, and how "Your algorithm" addresses them:

  1. Surfacing new interests without flooding: For "Interested In" topics, the system uses multiple dedicated retrieval sources (search, topic clusters, content graph, item-to-item similarity) to ensure a sufficient pool of candidates. A control layer in reranking then balances prominence with variety, spacing out recommendations and capping daily contributions per interest. New interests receive temporary boosted weight.
  2. Reliably enforcing "Not Interested In" topics: Dislikes are enforced through layered filtering across multiple stages. This includes embedding-based comparisons during ranking, demotion rules, LLM rerankers for a final check, and client-side cache invalidation. It also differentiates between topic-based dislikes and quality/creator-based requests.
  3. Achieving responsiveness for preference changes: To ensure changes take effect quickly, the system employs an "extra fetch request" (supplementary tail load) for new interests and "cache invalidation" on the client-side to remove content matching newly disliked topics from the display queue.
💡

LLM Tailoring for System Efficiency

A crucial system design insight is the strategic use of different LLM models tailored for specific tasks. For instance, a smaller, efficient model handles preference validation at scale, while a fine-tuned LLM focusing only on identifying items to remove performs the final "Not Interested In" check faster and more reliably than a general-purpose model.

recommendation systemsLLMpersonalizationcontent rankingsystem architecturescalabilityreal-timedata pipelines

Comments

Loading comments...