01Core algorithm architecture
- X does not use one single recommendation algorithm. The For You feed is assembled through multiple retrieval systems, feature hydrators, ranking models, filters, rescorers, selectors, and mixers.
- The broad flow is Candidate Source → Feature Hydration → Filter → Scorer → Selector → Mixer. A post must survive several separate stages before anyone ever sees it.
- Home Mixer is one of the central For You systems. Much of modern timeline construction runs through this architecture.
- Product Mixer is the broader recommendation framework. Recommendation is a pipeline rather than one ranking formula.
- The analyzed repository contains roughly 7,700 files. The actual recommendation system is far more complex than the simplified “likes vs replies” explanations circulated online.
- The source spans Scala, Java, Python, Rust, and C++. Search, machine learning, graph systems, model serving, and retrieval are separate technical layers.
- The analyzed source reflects a September 2025-era refresh. It should not be assumed that every implementation detail is unchanged forever.
- Many production feature-switch values remain private. The public source exposes architecture much better than exact current production weightings.
- Heavy-ranker weights in the repository default to 0.0. We can see which behaviors X predicts without knowing the exact live value of every prediction.
- The ranking objective is externally configurable. X can change how much different outcomes matter without rewriting the architecture.
- Different viewers can receive different objective weights. There is not one identical ranking formula applied to every person.
- Optimization buckets exist. X can experimentally change ranking behavior for different populations.
- Daily viewer-level variation exists. One unusually weak post does not prove your account was penalized.
- Recommendation outcomes are logged back into data systems. What happens after X recommends something becomes training information for future ranking.
The biggest practical lesson: never optimize for one isolated “algorithm signal.” A post needs to clear eligibility, get retrieved, score well, avoid penalties, win inventory, and then generate real behavior.
To maximize reach
- Optimize the complete journey rather than one metric.
- Treat engagement, topic identity, reputation, relationships, and content quality as one system.
- Evaluate patterns across dozens of posts rather than reacting to one result.
To minimize restrictions
- Understand that filters and eligibility rules can override good engagement.
- Never assume high likes can rescue spam, safety, duplicate-content, or negative-feedback problems.
- Build strategies around structural mechanics rather than temporary parameter exploits.