How X Determines Post Relevance
Relevance is one of the most important concepts behind X's For You recommendations. The open-source X recommendation architecture does not use one simple universal “relevance score” for every post. Instead, it uses a user's context and engagement history to retrieve potentially relevant posts and then uses Phoenix to predict how that particular user may respond to each candidate. (GitHub)
The key idea is: A post isn't simply relevant or irrelevant. It can be highly relevant to one user and almost completely irrelevant to another.
The Relevance Pipeline
X's current open-source repository describes the For You system as retrieving candidates from both Thunder, which supplies posts from accounts the user follows, and Phoenix Retrieval, which discovers posts from a broader corpus. (GitHub)
1. X Looks at Your Engagement History
One of the most important pieces of the current architecture is what you've previously engaged with. The X repository says the Grok-based transformer uses engagement history—including actions such as likes, replies and shares—to determine what content is relevant to the user. (GitHub)
This means your For You feed isn't simply based on who you follow. Your behavior provides context.
2. Relevance Is Personalized
Consider two users: User A frequently engages with AI, programming, startups, and technology, while User B frequently engages with cricket, football, and sports news. Now consider a post stating “X just open-sourced its recommendation algorithm.” For User A, this has high potential relevance, whereas for User B, it has lower potential relevance. The post itself hasn't changed; the viewer has. That's one of the most important principles behind personalized recommendation.
3. X Uses a User Representation
Phoenix Retrieval uses a two-tower architecture. The user tower encodes user information and engagement history into a normalized user representation, and the candidate tower produces representations for posts. (GitHub) This allows X to efficiently search a large corpus for posts that are potentially relevant to the user.
4. Candidate Retrieval Happens Before Ranking
This distinction is important. X doesn't necessarily rank every post on the platform for every user. The retrieval system first finds a smaller set of potentially relevant candidates (encoding user history, creating a user representation, comparing with candidate representations, and retrieving top candidates using similarity). (GitHub) This means relevance begins before the final ranking stage.
5. Similarity Helps Find Potentially Relevant Posts
The retrieval model uses normalized user and candidate representations and calculates similarity using a dot product. (GitHub) A higher similarity means the candidate is more closely aligned with the representation produced for that user. But this is a retrieval score, not the final For You ranking score.
6. Retrieval Relevance ≠ Final Ranking
There are effectively two different questions: Retrieval asks “Could this post be relevant to this user?” while Ranking asks “How valuable is this candidate for this user compared with the other candidates?” The current Phoenix pipeline explicitly separates retrieval from ranking. (GitHub) A post can be retrieved but ultimately rank poorly.
7. Phoenix Ranking Looks at User Context
After candidate retrieval, Phoenix evaluates candidates using the user's context and engagement history. The ranking model predicts multiple possible actions rather than producing one simplistic “quality score” (Like, Reply, Repost, Quote, Click, Dwell, Share, Follow, Negative feedback), which are then combined through weighted scoring. (GitHub)
8. X Doesn't Need a Single Relevance Number
You might imagine a post relevance score of 87/100, but the current architecture is more nuanced. Phoenix predicts multiple actions (P(Like), P(Reply), P(Repost), P(Quote), P(Click), P(Dwell), P(Share), P(Follow)...), and the weighted scorer combines these predictions into a final ranking score. (GitHub) So relevance is expressed through predicted user behavior.
9. Engagement History Is More Than a List of Likes
The current retrieval model doesn't simply count your likes. The user representation is built from user features plus history and actions, converting multi-action history into embeddings and processing the sequence through the Phoenix transformer. (GitHub) This gives the model contextual information about what the user has been doing.
10. The Sequence Matters
X says the system learns relevance from user engagement sequences rather than relying on a large collection of manually engineered relevance rules. (GitHub) For example, a sequence of clicking, liking, replying, and sharing AI posts provides contextual information about user interests without assigning a permanent artificial score.
11. Content and Author Both Matter
Candidate representations include information associated with the post and author. The retrieval implementation explicitly builds candidate representations using post and author embeddings. (GitHub) So relevance isn't simply what words are in a post.
12. Following Someone Is Only One Route to Relevance
X has two major candidate sources: In-network (posts from accounts the user follows) and Out-of-network (posts discovered through Phoenix Retrieval from the broader corpus). (GitHub) This means you don't have to follow someone for their posts to enter your feed.
13. Out-of-Network Relevance Is Especially Important
Phoenix Retrieval is specifically designed to discover potentially relevant posts outside the user's network. (GitHub) The system can compare a user's representation against a large corpus of candidate representations to surface top-K retrieved posts.
14. A Post Can Be Relevant Without Being Popular
A post doesn't necessarily need thousands of likes to be relevant to a particular person. A highly technical post with 100 likes can be extremely relevant to a developer who frequently engages with that subject, whereas a post with 50,000 likes might be irrelevant to that same developer.
15. Popularity and Relevance Are Different
| Concept | Meaning |
|---|---|
| Popularity | How much engagement a post has received |
| Relevance | How suitable the post may be for a particular viewer |
| Retrieval score | How closely candidate and user representations match |
| Ranking score | Combined predicted-action score used for ranking |
These concepts can overlap, but they are not identical.
16. A Retrieved Post Can Still Lose
Being retrieved does not guarantee recommendation. The current pipeline applies additional stages after retrieval, including candidate hydration, pre-scoring filters, scoring, ranking and selection. (GitHub) A post can be retrieved but ultimately rank poorly.
17. Filtering Happens Too
Before ranking, the current pipeline removes candidates that meet exclusion conditions such as duplicates, old posts, posts from the viewer, blocked/muted accounts, muted keywords, previously seen posts, recently served posts, and ineligible subscription content. (GitHub)
18. Negative Feedback Also Informs Relevance
The Phoenix model predicts negative actions as well as positive ones (Not Interested, Block author, Mute author, Report). (GitHub) This means recommendation isn't simply asking what the user will like, but predicting what the user is likely to do if shown this candidate.
19. Relevance Can Change
A post's relevance isn't necessarily permanent because user interests change, recent engagements change, the candidate pool changes, and new posts arrive. Same user + different recent history → different user representation → different candidate relevance.
20. Relevance Is Not the Same as Quality
A post can be excellent but not relevant to a specific viewer, or ordinary yet highly relevant. The recommendation system's objective isn't to determine the objectively best post on X, but what content is likely to be useful or engaging for a particular user.
21. Relevance Is Not a Creator Score
Creators sometimes imagine that X assigns accounts a permanent creator relevance score. The current open-source architecture doesn't establish such a universal creator-facing number, instead producing relevance through user/candidate representations and predicted actions within the recommendation pipeline. (GitHub)
22. Why the Same Post Gets Different Reach
Suppose you publish a technical breakdown. For a machine-learning engineer, it generates high relevance, high click probability, and high likes. For someone who primarily follows sports, it generates low relevance and low interaction. The post is identical; the predicted response is different. That is personalized relevance.
23. The Complete Relevance Model
This reflects the major concepts documented in the current open-source architecture. (GitHub)
What the Open Source Confirms vs. What It Does Not
What Open Source Confirms
- • User engagement history is used to understand relevance. (GitHub)
- • Phoenix Retrieval uses a two-tower architecture. (GitHub)
- • User and candidate representations are compared for retrieval. (GitHub)
- • Both in-network and out-of-network candidates are used. (GitHub)
- • Phoenix ranking predicts multiple user actions. (GitHub)
- • Candidates can be filtered before and after scoring. (GitHub)
What Open Source Does Not Tell Us
- ✗ A universal post relevance score
- ✗ A fixed number of impressions per relevance level
- ✗ A guaranteed viral threshold
- ✗ A fixed follower-to-reach ratio
- ✗ A specific “relevance percentage” creators can optimize for
The Under The Hood Takeaway
X determines relevance by modeling the relationship between a user's behavior and potential candidate posts—not by assigning every post one universal relevance score. The current architecture uses engagement history to build a user representation, retrieves potentially similar candidates, and then uses Phoenix to predict how the user may respond to each candidate. Those predictions contribute to ranking. (GitHub)
So when asking “Why did X recommend this post to me?” the best Under The Hood answer is: Because the system's models found the post potentially relevant to your behavior and context, then evaluated its predicted value against other candidates competing for your feed. And when asking “Why didn't X recommend my post to everyone?” the answer is: Because relevance is personalized. A post can be highly relevant to one user and weakly relevant to another.
Official Open-Source References
- • X / xAI — For You Algorithm repository — current architecture, Phoenix, Thunder, filtering, scoring and candidate pipeline. (GitHub)