X For You Feed Algorithm is the open-sourced core recommendation system that powers the For You feed on X (the social network formerly known as Twitter), and it represents one of the first times a major social platform has published production-level ranking code for public review and experimentation. The repository contains the full pipeline that ingests user engagement and content candidate data, processes it through retrieval, hydration, filtering, scoring, and selection layers, and ultimately ranks posts to show what appears in a user’s feed. At its heart, the system uses a transformer-based model adapted from xAI’s Grok architecture to predict probabilities for various user actions (such as likes, replies, reposts, clicks, and negative signals), then combines those into a weighted final score that drives ranking.