Algorithm powering the For You feed on X
┌──────────────────────────────────────────────────────────────────────────────────────────┐
│ FOR YOU FEED REQUEST │
└──────────────────────────────────────────────────────────────────────────────────────────┘
▼
┌──────────────────────────────── HOME MIXER home-mixer/ ────────────────────────────────┐
│ │
├─────────────────────── POST PIPELINE PhoenixCandidatePipeline ───────────────────────┤
│ │
│ ┌────────────────────────────────────────────────────────────────────────────────────┐ │
│ │ 1. QUERY HYDRATION │ │
│ │ user action sequence — the viewer's recent engagements, and the │ │
│ │ main input to the model · following list · blocks and mutes · muted │ │
│ │ keywords · posts already seen and served · followed topics, etc. │ │
│ └────────────────────────────────────────────────────────────────────────────────────┘ │
│ ▼ │
│ ┌────────────────────────────────────────────────────────────────────────────────────┐ │
│ │ 2. CANDIDATE SOURCES — queried in parallel │ │
│ │ ┌───────────────────────────────┐ ┌────────────────────────────────────────┐ │ │
│ │ │ IN-NETWORK │ │ OUT-OF-NETWORK │ │ │
│ │ │ Thunder │ │ Phoenix retrieval retrieval model │ │ │
│ │ │ recent posts from the │ │ SimClusters cluster similarity │ │ │
│ │ │ accounts the viewer follows │ │ │ │ │
│ │ └───────────────────────────────┘ └────────────────────────────────────────┘ │ │
│ └────────────────────────────────────────────────────────────────────────────────────┘ │
│ ▼ │
│ ┌────────────────────────────────────────────────────────────────────────────────────┐ │
│ │ 3. CANDIDATE HYDRATION │ │
│ │ post text and media · author details and account labels · quoted post · │ │
│ │ language · engagement counts · subscription status, etc. │ │
│ └────────────────────────────────────────────────────────────────────────────────────┘ │
│ ▼ │
│ ┌────────────────────────────────────────────────────────────────────────────────────┐ │
│ │ 4. PRE-SCORING FILTERS │ │
│ │ duplicates across sources · older than 48 hours · the viewer's own │ │
│ │ posts · blocked and muted accounts · muted keywords · already seen │ │
│ │ or served · subscriber-only posts the viewer cannot access, etc. │ │
│ └────────────────────────────────────────────────────────────────────────────────────┘ │
│ ▼ │
│ ┌────────────────────────────────────────────────────────────────────────────────────┐ │
│ │ 5. SCORING │ │
│ │ PhoenixScorer a probability for each action the viewer might take │ │
│ │ RankingScorer weighted sum, then repeated-author decay, an │ │
│ │ out-of-network discount, a new-author boost │ │
│ │ VMRanker calls the reranking service in vm-ranker/ │ │
│ └────────────────────────────────────────────────────────────────────────────────────┘ │
│ ▼ │
│ ┌────────────────────────────────────────────────────────────────────────────────────┐ │
│ │ 6. SELECTION — TopKScoreSelector │ │
│ │ sort by final score, keep the top K │ │
│ └────────────────────────────────────────────────────────────────────────────────────┘ │
│ ▼ │
│ ┌────────────────────────────────────────────────────────────────────────────────────┐ │
│ │ 7. POST-SELECTION FILTERS — after the order is fixed │ │
│ │ VFCandidateHydrator asks visibility-filtering/ per post and viewer │ │
│ │ VFFilter removes the posts it said to drop │ │
│ │ DedupConversationFilter collapses branches of one conversation │ │
│ │ ◄── these labels come from the Labeling Path │ │
│ └────────────────────────────────────────────────────────────────────────────────────┘ │
│ │
├───────────────────── BLENDING PIPELINE ForYouCandidatePipeline ──────────────────────┤
│ │
│ ┌────────────────────────────────────────────────────────────────────────────────────┐ │
│ │ the ranked posts are one source here; the othe