X open-sourced their entire For You feed algorithm. Here's what it actually says about how your posts get ranked — no hype, just code.
Every time you open your For You feed, your request passes through these stages in milliseconds.
The algorithm fetches your entire context: engagement history, who you follow, topics you care about, mutual follows, even your IP address for location signals.
It pulls your recent likes, replies, reposts, followed topics, starter packs, and creates a bloom filter of posts you've already seen.
Thunder (an in-memory post store) retrieves recent posts from accounts you follow with sub-millisecond lookups.
This is the 'people you chose to follow' portion of your feed. Posts are fetched in real-time from a distributed cache.
Phoenix's Two-Tower retrieval model finds posts from people you don't follow but might like, based on embedding similarity.
Your user embedding is compared against millions of post embeddings to find the most relevant content from across the platform.
Duplicates, posts you've already seen (bloom filter), self-posts, blocked/muted authors, and age-expired content are all removed.
This stage reduces the candidate pool from thousands to hundreds, keeping only fresh, relevant content.
The Grok transformer predicts 19 different engagement probabilities for every remaining post, then multiplies each by a weight.
Score = Σ(weight × P(action)). Positive signals (like, reply, share) add to your score. Negative signals (block, mute) subtract.
If the same author appears multiple times, each subsequent post gets exponentially penalized to ensure feed variety.
Post #2 from the same author → 70% of original score. Post #3 → 49%. Post #4 → 34%. This prevents any single account from dominating your feed.
The top K posts by final score are selected, validated, and assembled into your For You feed in ranked order.
Ads are blended in at this stage with brand-safety checks. The final feed is a mix of in-network, out-of-network, and promoted content.
The Phoenix transformer predicts 19 different actions for every post. Each prediction gets multiplied by a weight, then summed into your final score.
Score = Σ(weight × P(action))Key insight: A single block or report can outweigh dozens of likes. Negative signals have disproportionate power because they actively subtract from your score.
Reading the actual source code revealed some things that no one was talking about.
A Grok Vision-Language Model scores every post 0 to 1. Score ≥ 0.4 = "banger" status and gets a ranking boost. It reads both your text AND images.
Grok has a dedicated classifier that detects AI-generated low-quality content ("slop"). If your post reads like generic ChatGPT output, it gets penalized.
Your IP is hashed and used as an embedding feature for location-based content relevance. The algorithm knows roughly where you are.
Sharing a post via DM has the highest positive weight of all 19 signals. The algorithm interprets this as the strongest endorsement possible.
ASR (automatic speech recognition) converts video audio to text, which is then embedded alongside the visual content for multimodal understanding.
Your 2nd post in someone's feed scores 70% of the original. 3rd post: 49%. 4th: 34%. Posting too frequently in a short window hurts each subsequent post.
Your post's score doesn't depend on what other posts are in the same batch. Scores are consistent and cacheable — no competition effects.
Unlike the 2023 algorithm, there are ZERO manual rules or hand-tuned features. Everything is learned by the Grok transformer end-to-end.
Based on the actual code, here's what you should change about your posting strategy.
DM shares and copy-link shares carry the highest positive weight. Create content people want to send to a friend privately.
Write posts that make people think "my friend needs to see this."
A single block outweighs dozens of likes. Controversial content that gets engagement but also blocks is a net negative.
Engagement bait that annoys people will actively kill your reach.
Grok evaluates your post quality (text + images). You need ≥ 0.4 to be a "banger." Original, insightful, well-crafted content wins.
Be specific, add data, share unique perspectives. Generic takes get low scores.
The slop detector penalizes content that reads like generic AI output. Personal voice, specific details, and authentic tone matter.
Write like a human. Use first-person, specific numbers, real experiences.
Images trigger photo_expand signals. Videos unlock the VQV (video quality view) signal. Videos also get transcribed for better embedding.
Add an image at minimum. Video with clear speech gets the most signals.
Author diversity decay means your 3rd post in someone's feed window scores only 49% of your first. Quality over quantity.
Post 2-3 high-quality posts per day instead of 10 mediocre ones.
Paste a tweet and see how it scores against the algorithm's actual ranking signals.
Write or paste a tweet to see how it scores against the algorithm.