A faithful, interactive recreation of how X ranks the For You timeline, grounded in X's own open-source code. Real candidate sources, the real heavy-ranker feature set, the published weights. Then the part that matters for this case study: Grok explains why each post is where it is.
Every refresh, the For You timeline runs roughly 1,500 candidates through five stages to pick the ~50 you see. These are the real stages, with the real service names from the repo.
~50% in-network, ~50% out-of-network. From earlybird, UTEG, FRS, TweetMixer, SimClusters.
A fast logistic model trims the candidate pool to the most promising before the expensive step.
A neural net predicts ~17 engagement probabilities per post, combined by the weights below.
Author diversity, content balance, feedback fatigue, and the visibility/trust-and-safety library.
Ads, follow recommendations, and onboarding prompts are woven in. Then it serves.
About half from people you follow, half from outside your network, surfaced only with social proof. The real candidate pipelines in home-mixer:
Recent posts from accounts you follow, ranked by RealGraph (a model of your relationship strength with each account).
Uteg / DirectUteg: the User-Tweet-Entity-Graph. Posts that the people you follow recently engaged with. The "someone you follow liked this" path.
Community embeddings. You and posts both get placed into ~145k communities; you see popular posts from your communities.
Embedding similarity (TwHIN) and follow-recommendation candidates. Plus ContentExploration for fresh-interest discovery.
The neural net predicts the probability of each action, then multiplies by these weights and sums. These are the exact features the open-source heavy ranker scores (from PredictedScoreFeature.scala); the weight values are the ones X published with the release. Notice replies dominate likes by ~27x, and a reply the author engages back is the single biggest positive at 75x. Negative feedback is brutal.
These posts carry real engagement counts. The engine derives a probability for each action from the counts and recency, multiplies by the weights above, sums, applies time decay, and sorts. Tap Why this rank? on any post for the full breakdown, then hit Show less to watch the -74 negative-feedback weight crush a post.
The thesis is that Grok should be a layer that makes the timeline legible. The ranking is the most powerful, least understood thing about X. A Grok layer that can answer "why am I seeing this?" in plain language, grounded in the real signals, is the highest-trust feature the layer could ship.