X Algorithm is a feed ranking system that determines which posts appear in the For You feed on X by combining in-network and out-of-network content, filtering posts based on various inputs, and ranking them using a transformer model.
The system addresses the problem of selecting and ordering relevant content from a massive pool of posts. It works by retrieving both posts from followed accounts and discovered content through ML-based mechanisms, then applying filters to remove ineligible posts and scoring remaining candidates using predicted probabilities of user actions like likes, shares, and dwell time. The ranking uses a transformer model to produce a final score that determines feed order.
Developers considering adoption should understand that this is the actual production algorithm from X, not a simplified demonstration. The codebase includes the core ranking logic, filtering systems, configuration parameters, and model training code. It is most relevant for those studying large-scale feed ranking systems, building similar recommendation infrastructure, or seeking transparency into how algorithmic feeds operate. The project explicitly notes what it does not contain, helping set expectations about scope.
The project receives active maintenance with documented updates addressing both technical clarifications and regulatory requirements. Recent changes include added code comments explaining how engagement weights function in the ranking system and implementation of region-specific filtering systems. The codebase incorporates systems that impact content filtering decisions, making the mechanisms behind feed visibility explicit and auditable.