Engineering the next generation of LinkedIn’s Feed

Hristo Danchev12 Mar 2026

Problem

LinkedIn Feed serves 1.3 billion members and ranks millions of posts at any moment. Retrieval ran on several separate sources, each with its own infrastructure, so it could not be optimized as a whole. The ranker scored every impression on its own and missed how a member's interests move over time. New members have only a headline and a job title to start from.

Example from the article: a member interested in "electrical engineering" who engages with posts on "small modular reactors" is missed by keyword matching, while an LLM links the two topics from world knowledge.

Solution in brief

Replace the retrieval sources with one dual encoder built on a fine-tuned LLM. Put numbers into the prompt as percentile tokens, train with hard negatives and a positives-only history. Rank with a causal transformer over the interleaved sequence of posts and member actions, and serve it with shared-history batching on GPUs.

Questions this case answers
  • How to consolidate several heterogeneous candidate sources into one learned retriever without losing freshness
  • How to encode numeric popularity signals in text-based embeddings so that similarity tracks relevance
  • How to serve a long-sequence transformer ranker for many candidates per request under a tight latency budget
  • How to replace several separate feed retrieval sources with one embedding-based retriever

Tools and methods

  • LLM dual encoder — one LLM embeds member and post prompts
  • Prompt library with percentile tokens — features become text, counts become percentile tokens
  • InfoNCE with easy and hard negatives — contrastive objective
  • Generative Recommender (GR) — causal transformer over posts and actions
  • Late fusion and MMoE head — counts join after the transformer, per-task experts
  • GPU nearest-neighbor index — exhaustive search over fresh embeddings
  • Llama, PyTorch — base model (per the paper), serving
Continue reading — it's free

Google or a one-time email code. No password.