How the X algorithm works: what you can and cannot verify

What X published about the For You ranking code, how a post moves through it, what the weights mean, and which reach claims you can test yourself.

How the X algorithm works: what you can and cannot verify
Jump to a section

Key takeaways

  • X published the For You ranking code. It is a snapshot of the pipeline, not a live view of your account.
  • A weight multiplies a predicted probability. It does not multiply raw likes or reports.
  • You cannot see your per-post score from outside. You can see your own results over a fixed window.
  • Treat any reach rule you read online as a hypothesis until you test it on your account.

Every creator asks the same question sooner or later: why did this post reach so many people, and that one so few? The honest answer is that some of the causes are invisible from outside the app. X has now published more of the For You ranking code than it ever has, and that changes what you can check. It does not change the fact that you cannot see the score of any single post.

This article separates three things. What X has published. What the published code says a post goes through. And what you can only test on your own account. Where the code says something, I cite the repository. Where it does not, I say so, and where two sources disagree, I say which one I trust and why.

What X has published

X published the source code for the For You feed in the xai-org/x-algorithm repository on GitHub, under the Apache 2.0 license. TechCrunch reported on the release on August 13, 2026. It described the release as adding the model configuration, the filters, and the parameters that weight each signal, and it said the codebase became roughly 10 to 15 times larger than before. The repository's own release note for that day lists the same additions: configuration parameters, code for the systems that filter posts, and the Phoenix model code used to train the feed's models.

Two things are missing, and both matter. TechCrunch reports that the systems which use Grok to predict whether a post could violate a rule are not in this release. The repository also says that some rules are not published, because publishing them would make gaming the system easier. Its "What's not in this repo" section names Grox prompts and some botmaker rules as examples.

The repository is also a snapshot that X updates. Its README lists changes in August, September and October 2026, including changes to how ranking estimates time spent on a post and how retrieval learns which posts people read all the way through. So the code tells you how the pipeline is built. It does not tell you how your last post scored, and it does not tell you what changed in the model between releases unless you read the update notes.

  1. Aug 13, 2026
    Code release with weights, filters and Phoenix model code Source
  2. Aug 14, 2026
    Note on how weights scale predicted probabilities Source
  3. Sep 18, 2026
    Under the Hood reports add legal-compliance visibility limits Source
  4. Oct 8, 2026
    Ranking model estimates time spent more precisely Source
  5. Oct 13, 2026
    Retrieval trained to surface posts people read through Source
  6. Oct 26, 2026
    Brazil 2026 Elections filter removed Source

The timeline is the list of dated changes the README records. Read it as a changelog, not as a set of rules. Each entry changes one part of the system. If you wrote a note about how the feed worked in August, the October entries are the first place to check whether that note still holds.

Flat vector infographic with four stages, Candidates, Score, Filter and Feed, showing how a post reaches a feed, with the banner Measure your own posts, not the rumor

The pipeline in plain steps

The README describes the For You feed as a pipeline. A post is a candidate first, and it has to get through several stages before it reaches a reader. The table below follows the README's order and names the part you can check from your side.

The For You pipeline, as the README describes it
StageWhat the code doesWhat you can check
Query hydrationLoads the viewer's recent engagements, following list, blocks, mutes, muted keywords and posts already seenNothing directly. The viewer's history is private to the viewer
Candidate sourcesThunder pulls recent posts from accounts the viewer follows. Phoenix retrieval and SimClusters find posts from accounts the viewer does not follow. A popular-posts list adds moreImpressions and profile visits in your analytics for the same window, split by who saw the post where that split is available
Candidate hydrationLoads post text, media, author details, account labels, quoted posts, language and engagement countsWhether your post text and media are complete. A post with missing media is harder to judge later
Pre-scoring filtersRemoves duplicates, posts older than 48 hours, the viewer's own posts, blocked and muted accounts, and posts already seenPost timing. A post older than 48 hours is out of this stage
ScoringA model predicts the chance of each action, then a weighted sum produces a score, with adjustmentsYou cannot see the score. You can test changes and watch results
SelectionSorts candidates by score and keeps the top postsNothing directly
Post-selection filtersAsks visibility filtering about each post and drops those it says to drop, then collapses branches of one conversationWhether a post is shown at all. A drop removes it after ranking
BlendingMixes the ranked posts with ads, Who to Follow and promptsNothing directly from the post side

Two rows are worth a second look. The first is the 48-hour filter. In the For You code, a post older than that is removed before scoring, so a post that is a few days old cannot win the feed on its own merits. The second is the post-selection visibility step. The README says ranking sets the order, but whether a post can be shown at all is decided separately, from the viewer's own blocks and mutes and from labels attached to posts and accounts.

Notice what is not on this table: a line that says what kind of post scores well. The code has a model that predicts actions, and the weights decide how those predictions blend. It does not say "threads win" or "links lose". Anyone who gives you that line is going beyond what the code says.

Filters listed in the README, by stage
Pre-scoring filters18
Post-selection filters3

The chart counts the filters in the README's two filter tables. It shows where the filtering is concentrated, not how much each filter removes. The README does not publish removal rates, so a longer list is not a bigger effect. It is only a bigger number of rules.

48 hours
Age limit for posts before scoring
Source
3
Adjustments after the weighted sum
Source
4
Answers visibility filtering can give: allow, notice, interstitial, drop
Source

What the scores do and do not mean

The README itself flags a common misconception about the weights. The August 14, 2026 note says the weights scale the predicted probabilities of actions, or predicted values such as dwell time. They do not scale raw engagement counts. The README gives an example of the misreading it wants to prevent: a report weighted far above a like does not mean one report cancels out a set number of likes.

The README gives the arithmetic in one line: the final score is the sum, over the actions, of each weight times the predicted probability of that action. The predicted actions fall into groups. Engagement covers favorites, replies, reposts, quotes, shares and copy-link shares. Clicks cover opening the post, the profile, a link, a photo or a video, and a quoted post. Attention covers video views, dwell time and profile-visit time. Author covers following the author. Negative covers not interested, mute, block, report and not dwelled. Positive actions carry positive weights, and negative actions carry negative ones.

The score is also not a fixed property of your post. It is computed for each viewer, from that viewer's own predicted behavior. The README describes three adjustments that follow the weighted sum. Author diversity multiplies each post after an author's first by a decaying factor, down to a floor, so later posts from the same author in one feed score lower. The out-of-network discount multiplies posts from accounts the viewer does not follow by a factor below 1, and it does the same to replies and reposts from followed accounts. The new-author boost lifts posts from authors whose impressions are below a threshold toward a target position. All three are relative, and all three depend on the reader.

The October 2026 updates add one more point. The ranking model now estimates time spent on a post more precisely, and the retrieval model is trained to surface posts people read all the way through. For a writer, that means the README now treats finished reading as a training target. How much it changes your reach is something only your own data can show.

What the reranker does

After scoring, the README says VMRanker calls a separate service, vm-ranker, which reorders the result. The README describes it as using a determinantal point process over the posts' embeddings, which gives up a little score in exchange for less similarity between neighboring posts. In plain terms, the reranker tries to keep two near-identical posts from sitting next to each other in one feed.

This matters for a writer in one narrow way. Two posts on the same topic from the same account may be pushed apart in a feed, even if both score well. It is a reason to space out similar posts, not a reason to avoid a topic. The README does not say how strongly the reranker acts on any given feed, so treat its effect as unknown in size.

Where sources disagree

The clearest disagreement I found is about researcher access. In the TechCrunch interview published on the release day, X's VP of Product said that external researchers who had been given the open code were about to get the whole score running themselves. TechCrunch then published a correction. The correction says the researchers trained and ran the Phoenix scoring system using the open code, but did not receive the per-post score.

I trust the correction over the interview remark, because the correction is the later and more specific statement, and it matches what the release describes. The practical consequence is simple. No outside party, including the people who ran the model, has a per-post score from X. Any tool that says it shows your post's score is estimating it.

A second point needs care. The README describes the repository's parameter values as the production defaults, set by scripts that run on a schedule. It also says that experiments run on a small share of traffic, and that experiments at a notable share, such as 10 percent or more, should be visible in the repository. A value in the code is therefore the default, not a guarantee of what every viewer sees on a given day.

Dataconomy's August 14, 2026 report says that researchers were able to run the per-post score outside X. That conflicts with the TechCrunch correction quoted above, which says they trained and ran the Phoenix system but did not receive per-post scores. This article follows the TechCrunch correction, because it is the later and more specific statement from the outlet that reported the interview.

What you cannot verify from outside

You cannot see the score of your own post. Outside researchers ran the scoring system, but they did not receive per-post scores. So any tool that claims to show you the score of a post is estimating it, and you should ask how it estimates.

X is piloting a way to check part of the picture. TechCrunch reports an Under the Hood page in settings, which lets users who posted 10 or more times in the past month download their aggregate statistics as a JSON file. The file shows whether labels were applied to the account or its posts in the past calendar month. The first pilot is for a test group of accounts at least a year old, before a wider rollout. The README adds that, since September 18, 2026, the reports also show whether an account or post was limited for legal compliance, and in which country. If you have the file, it answers those narrower questions. It does not give you a reach number or a score.

Two more things you cannot verify from outside. First, the weights in the live system beyond what the repository publishes, and the experiments that the repository does not show. Second, the reason a particular post reached fewer people. Many causes can overlap, including timing, topic, the people who saw it, and simple variance across a small sample. A single post is rarely enough to say which one applied.

Claims you may read, and how to test them

The table below sorts common claims about the feed by what the sources support. Read the third column as the test you can run yourself.

Common claims, what the sources support, and how to test them
Claim you may readWhat the sources supportHow to test it on your account
A weight is a count of likesNo. The README says weights scale predicted probabilities, not raw countsDo not test it; discard the claim
A post older than 48 hours cannot win the feedSupported for the pre-scoring stage in the READMECompare post timing with the impressions your posts get in the first 48 hours
Links lower reachNot stated in the code text I readTwo posts that differ only in the link, same window, several weeks
Threads score higher than postsNot stated in the code text I readThread and single post on the same topic, same weekday and window
Premium raises reachNot stated in the code text I readCompare reach before and after a change in plan, with other variables steady
Out-of-network posts are discountedSupported by the README's out-of-network discountCompare your reach among followers and non-followers where the analytics split it

Claims you meet online that the code does not say are a case for a test. The right response is not to dismiss the claim, but to turn it into a test and keep the result. A claim that survives a fair test over several weeks is worth something. A claim that does not survive is a lesson about your own account.

What to test on your own account

The useful move is to turn a claim into a test. Pick one variable, keep the rest steady, and compare over a fixed window. The lists below separate tests you can run from claims you should not accept on their own.

Works

  • Compare posts from the same weekdays and the same weeks
  • Change one variable, such as the first line or the format, at a time
  • Read impressions and engagements for the same period on both sides

Avoid

  • Trust a screenshot that calls itself the algorithm
  • Assume a link lowers reach without a test that changes only the link
  • Change topic, format and timing in the same week

A simple test looks like this. Write two posts on the same topic and the same day. Change only the first sentence. Compare their impressions and engagements after the same number of hours. Repeat over several weeks before you draw a conclusion. One pair of posts tells you almost nothing, and a change in the first sentence can easily be overwhelmed by the topic of the day.

Keep a short log of each test: what you changed, when you posted, and what you compared. The log is more useful than memory, because memory tends to remember the post that did well. Over a few months the log also shows you which of your assumptions about the feed were wrong, and that is often the most valuable result.

The Under the Hood file adds one more input, if you are in the pilot group. It can show whether labels were applied to your account in the past calendar month. A month with a label is a month to read carefully before you compare it with another month. It is a reason to check your data, not a reason to change your topic.

What the code cannot tell you about your niche

The code is the same for every account, but the audience is not. A post that does well for a developer audience may do badly for a general one, and the code does not know which audience you have. The scoring model predicts actions for each viewer, so your niche shows up in the data, not in the rules. That is why your own results over a fixed window are more useful than any general claim about the feed.

The same applies to your size. The new-author boost in the README is aimed at authors whose impressions are low, so a small account is treated differently from a large one in one specific adjustment. It does not tell you how much the boost helps, or whether it applies to your posts in a given week. Treat it as a mechanism you can look for in your own data, not as a promise.

Common mistakes when reading the code

  • Reading a weight as a count. The README spends a paragraph on this for a reason. Weights scale probabilities.
  • Treating a snapshot as live. The repository is a snapshot that X updates. Read the dated notes before you apply an old reading to a new post.
  • Trusting a score estimate. A tool that shows a post's score is estimating it. Ask how.
  • Reading the defaults as guarantees. The parameters are production defaults, and experiments run alongside them.
  • Drawing a conclusion from one post. Several comparable posts over a fixed window say a little more.
  • Mixing variables. Changing topic, format and timing together means you learn nothing about any of them.

The release has a short public history on X. The Verge posted on January 10, 2026 that Elon Musk had said the company would open-source the algorithm, in a post that links its report, ten days before the code went up. X Engineering then posted on January 20, 2026 that it had open-sourced the new algorithm, which it said uses the same transformer architecture as xAI's Grok model, in a post that links the repository. Dataconomy's August 14, 2026 report on the expanded release described the larger code drop, including the statement that the code would be roughly 10 to 15 times larger than before, in its coverage of the release.

The Verge's post dated January 10, 2026 is the earliest source for the release in this article. I did not read the full report that post links, so this article makes no claim about what that report says about the 2023 release.

For the metric definitions behind these tests, see X impressions explained and how to read X analytics.

What Reddit readings of the code say

Readings of the code on Reddit range from careful to confident. I quote them because they show where the public reading diverges, not because any one of them is authoritative.

One Reddit author who spent three hours in the repository writes that X "ripped out all heuristics, replaced them with a Grok-1 transformer", and that the ranking layer has "no manual weighting for follower counts, account age, or historical engagement rates" (r/PromptEngineering, 2026-05-15, by Only-Locksmith8457). The second half of that claim conflicts with the repository text I read. The README lists explicit weights and adjustments, including repeated-author decay and an out-of-network discount, so this article follows the README. The author describes a May 2026 update, and I did not compare that version with the August release line by line, so I cannot rule out a change in between. That is the kind of disagreement the test in this article is for: find the file that says it, and check its date.

A short r/SmallStreamers post from the release week says that you can "see exactly how posts are measured and pushed into feeds" (r/SmallStreamers, 2026-08-13, by StanimusYT). Reading the code gives you the pipeline and the weights. It does not give you the scores for your posts, which is the point the TechCrunch correction above makes.

A thread on r/twitterhelp describes one restriction and a review that removed it, where the author found an in-app notice, requested a review, and says the label was removed a few minutes later (r/twitterhelp, 2026-08-14, by ConsciousMaterial230). Use these threads as leads to check in your own app. None of them proves a mechanism.

Before you read a result as a ranking signal, check the counting rule. The view counts page says any logged-in view counts wherever the post appears, so a view total is not a clean measure of what the feed chose to show.

Where PostMine fits

PostMine does not claim to know your ranking, and it does not score posts for the For You feed. What it gives you is your own data, read in one place. Analytics shows your account's trends and can import an X account_overview CSV for past days. Home shows your own posts that outperform, with follow-up drafts. Those are the inputs for the test loop above, not a verdict on the algorithm.

If a product tells you it has decoded the algorithm and can rank your posts with certainty, ask it to show the method. A repository you can read is a better source than any tool's summary, and a product that cannot point to a source for its ranking claim is describing a guess. The same test applies to this article: if the repository changes and the claim no longer matches the code, the claim is wrong, whatever its age.

Sources, checked 2026-11-09

Frequently asked questions

No. X published the For You ranking code and its configuration, but the release does not include every system. TechCrunch reports that the systems using Grok to predict rule violations are not in it.

The repository text I read does not say so, so I do not state it. X's [About conversations](https://help.x.com/en/using-x/x-conversations) help page does list Premium subscriber status as one factor in ranking replies within a conversation. That is a narrower claim than a general reach boost. Test the effect on your own account if it matters to you.

I have no verified answer. Test it with two posts that differ only in the link, over a fixed window, and compare the results.

Usually several causes overlap, such as timing, topic, the audience that saw it, and simple variance across a small sample. One post is rarely enough to name the cause.

Founder of PostMine. I build it in public and write about growing on X.

@buildwithyerke on X

Write the next reply in your own voice

Draft in PostMine, add the one thing only you would say, then post.