
How X.com Builds the "For You" Feed
X.com/Twitter* made public their algorithms for how content is presented to you. Just like LinkedIn, there isn’t just a single algorithm - it’s a multi-algorithm pipeline that helps determine what you see.
I take all of this with a bit of skepticism since Elon is nearly always in my “For You” feed no matter what I do, but if you’re interested in how this works and how it potentially affects you, read on.
Thanks to Yongkyun (or Daniel) for his breakdown of the architecture. Without it, I almost certainly wouldn’t have been able to parse the original code to understand how this works.
This is basically his breakdown, rewritten for Muggles™ and Mudbloods™.
1) It’s an AI-powered recommendation pipeline, natch
Unlike the early days of Twitter, your feed isn’t just a simple chronological list anymore - it’s a multi-stage machine-learning system that processes millions of tweets whenever you open your For You timeline. The processing pipeline has clear stages that transform tweets into a personalized feed. (Or slop, depending on your perspective.)
2) There are two main sources of content for “candidate” tweets
When you load the feed, X gathers a pool of potential tweets to show you from two places:
- In-network tweets: content from accounts that you already follow (This is the “Thunder” pipeline).
- Out-of-network tweets: potentially relevant tweets from the entire universe of tweets (The “Phoenix” pipeline) discovered by AI similarity matching.
This blend means that you see both accounts you follow and new, interesting tweets from accounts you don’t. Whether or not X matches your definition of “interesting” is up to you, but you can influence that.
3) AI scores relevance with “engagement predictions”
Once candidate tweets are gathered, they get run through Grok. It predicts how likely you are to take any kind of action - not just likes, but replies, retweets, clicks, video watches, follow actions, and negative signals like blocks or “not interested.”
These predictions are combined into a single score for each tweet:
- Positive signals (likes, replies, shares, click-through) drive the score up.
- Negative signals (blocks, mutes, reports, “not interested”) drive the score down.
- The system avoids over-showing a single account by dampening scores if one account dominates a feed.
- Out-of-network tweets are penalized slightly unless they are highly engaging.
4) Pre-filters clean the candidate pool
Before the final score is calculated, the system filters out tweets that shouldn’t be shown - duplicates, old tweets, ones you’ve already seen, muted content, blocked accounts, or unsafe material. This step keeps your feed cleaner and more relevant before any ranking happens.
5) Final selection & visibility checks
After scoring, the highest-ranked tweets are chosen and sorted into the feed you see - but not before another layer of visibility filtering for safety and policy compliance, and deduplication to avoid multiple tweets from the same conversation thread.
What this means for you
Engagement still drives visibility
Tweets that earn meaningful user interactions (e.g., replies, clicks, retweets) are more likely to be ranked higher and seen by more people. Replies and deep engagement carry particularly strong weight.
Negative feedback hurts reach
If users mute, block, or mark content as “not interested,” that actively reduces a tweet’s visibility. Avoid tactics that annoy or mislead people - those signals matter.
Discovery is still possible
Even if an account doesn’t follow you, the algorithm can recommend your content if it aligns with their interests based on behavioral similarity. (Phoenix)
Quality beats quantity
The algorithm penalizes spammy repetition and over-tweeting by the same account. Diverse, high-quality content that encourages interaction tends to do better than blasting lots of low-value tweets.
Early Performance matters
Early engagement signals often help a tweet gain momentum, since the model continuously re-scores content as interactions accumulate.
* It will always be Twitter to me. And posts will always be Tweets.

