Back to blog
XAlgorithmHow-to

How the X algorithm ranks posts, from its open-source code

Prospel Editorial·26 November 2026·13 min read·Updated 26 November 2026

The X algorithm builds your For You feed by collecting recent posts from accounts you follow and accounts you don't, predicting how likely you are to take each of 25 kinds of action on each post, and ranking the posts by a weighted sum of those predictions. As of November 2026, X's published code gives a predicted reply a weight of 5, a like 0.708, a share by copied link 20 and a report minus 234.

Those weights multiply predicted probabilities for one viewer, not raw counts, so the practical lesson is simple: write original posts that the people who know you would reply to, share or follow you for, and avoid anything that makes them tap "not interested".

This guide is for founders and creators growing on X who want to know what the code actually says, rather than what threads about it claim. Every number below was read from X's own repository, at the commit dated 25 November 2026, and is linked to the file it comes from.

Key takeaways

  • X ranks For You posts by predicting your chance of 25 actions (like, reply, share, follow, "not interested" and more) and adding them up with fixed weights. As of November 2026 a reply is weighted 5, a like 0.708 and a copy-link share 20.
  • The weights scale predictions, not counts. X's own code comments say it is wrong to read them as "one report cancels 468 likes".
  • A predicted reply carries a weight of 20, not 5, when the post is an original post from an account the viewer mutually follows.
  • Small accounts get a lift: an original post from an account with 50,000 followers or fewer, under two hours old and with fewer than 200 home impressions, can have its score raised to that of the 16th-ranked post in a viewer's feed, whether or not they follow you, before the final discounts and reordering.
  • Replies, thread continuations and reposts from accounts a viewer doesn't follow are filtered out of For You by default, and every post older than 48 hours is dropped.

Where does the X algorithm's code come from?

X publishes the code behind the For You feed in the xai-org/x-algorithm repository on GitHub, and updates it almost daily. The README says it contains "the core code that determines which posts a viewer sees in the For You feed on X".

Two things matter before reading any number from it:

  1. The weights are mirrored from production. The README's section on experiments and configuration says X runs cron scripts "that set the defaults in this repository's code to be the primary production values", for example in home-mixer/params/param.rs. The copy used for this article says it was last synced on 24 November 2026.
  2. It is not everything. The README lists what is held back: the prompts used by Grox (the classifiers that run on new posts) and some of the botmaker rules that apply labels to posts and accounts. X also runs experiments on small shares of traffic, so the values you get on a given day can differ from the defaults.

So the code is the best public evidence of how the feed works, but it describes defaults, not a guarantee for any single account.

How does X build your For You feed?

The README describes one request for your feed as a pipeline. In plain terms:

  1. Read your history. The main input is your recent engagement: what you liked, replied to, shared and scrolled past.
  2. Collect candidates. Recent posts from accounts you follow come from a service called Thunder. Posts from accounts you don't follow come from Phoenix retrieval (a model that matches you to posts), SimClusters (communities of accounts that engage with the same things) and a shared list of popular recent posts.
  3. Filter. Duplicates, posts older than 48 hours, your own posts, accounts you block or mute, muted keywords and posts you have already seen are removed, among others.
  4. Score. The Phoenix ranking model predicts, for each post, how likely you are to take each action. Those predictions are combined into one score with the weights below.
  5. Adjust and rerank. The score is reduced for repeated posts from one author and for posts from outside your network, a new small author can be lifted, and a separate service (vm-ranker) reorders the list so that neighbouring posts are less alike.
  6. Check visibility. After ranking, a visibility-filtering system decides per post and viewer whether to show it, show it with a notice, put it behind an interstitial or drop it, based on labels applied to posts and accounts.
  7. Collapse conversations. Only one branch of a conversation is kept.

The rest of this guide goes through the parts that most affect what you post.

Which actions does the X algorithm reward most?

The weights live in home-mixer/params/param.rs. These are the ones a writer can influence, as of the 24 November 2026 sync:

Predicted actionWeightWhat it means for you
Share by copying the link20The largest positive weight: posts worth sending to someone else
Reply5 (20 from a mutual follow on an original post)Posts that invite a real answer
Quote5Posts people want to add their own view to
Share by direct message5Posts worth sending privately to one person
Follow the author4Posts that make a stranger want more from you
Share (other)2.118
Repost1
Like0.708The cheapest positive signal
Click0.274
Open a link0.2
Dwell (stopping on the post)0.05Plus separate weights on predicted time spent
Not dwelled (scrolling straight past)-0.02
Block the author-31.2
Not interested-53.07
Mute the author-58.8
Report-234

Weights scale predictions, not counts

The most common misreading of this table is to treat the weights as exchange rates between real engagements. The comments above the weights in param.rs address it directly: each weight "multiplies the predicted probability of that action", and it is "incorrect" to conclude that "one report cancels 468 likes". The same comment explains why negative weights are so large: the baseline probability of a report is "more than 1000x lower than a Like", so it needs a big weight to affect ranking at all.

Two more points from those comments are worth knowing. Predictions are personal, so reports from a group of bad actors mostly change what similar users see. And only actions on posts served in the home timeline count: "Directly navigating to a post (i.e., coordinating via groupchat) has no ranking impact." In other words, the code says coordinated engagement doesn't work the way people assume.

What changed in November 2026?

The weights move. The commit of 5 November 2026, which synced production values as of 4 November, shows the like weight going from 0.66 to 0.708, the share weight from 2.0 to 2.118, clicks from 0.3 to 0.274, video opens from 0.02 to 0, and not interested from -52.272 to -53.07. The README also records that in October 2026 the ranking model got better at estimating time spent on each post (8 October), and retrieval was trained to surface posts people read all the way through (13 October). Any guide that quotes weights without a date is probably out of date; this one was checked on 26 November 2026.

Why do replies from mutual followers matter so much?

The code adds a boost of 15 to the reply weight, making it 20, when two conditions hold: the post is an original post (not a reply and not a repost), and its author and the viewer follow each other. You can see the condition in xai-value-model/inputs.rs and the addition in xai-value-model/weights.rs.

X documented how this boost arrived in docs/BIDIRECTIONAL_BOOST_CHANGE.md: an A/B test of values from 5 to 20 began on 10 July 2026, a value of 20 rolled out to many users on 13 July, and on 24 July X lowered it to 15 after feedback that people were seeing too little discussion from accounts they didn't follow.

Our reading (opinion, not something the code states): the cheapest way to get this boost is to build real two-way relationships with people in your niche, by replying thoughtfully to them and following back the people who engage with you, and then to give them original posts worth answering. If you also post on LinkedIn, the same habit of answering people pays off there, as our guide to replying to comments on LinkedIn explains.

Does the X algorithm help small accounts?

Yes, through what the code calls cold start. In home-mixer/scorers/author_cold_start.rs, with the defaults from param.rs, a post is eligible only if every one of these is true:

  • It is an original post, not a reply or a repost (eligibility check in author_cold_start.rs).
  • The author has 50,000 followers or fewer.
  • The post is no more than 7,200 seconds (two hours) old.
  • It has had fewer than 200 impressions in the home timeline.
  • It is not already ranked in the bottom 3% of the viewer's scored posts.

At most one eligible post per feed request is lifted, by raising its score to at least that of the 16th-ranked post (with the current defaults). The lift is applied before the out-of-network and repeated-author discounts and the final reordering, so the post usually ends up near 16th rather than exactly there, and somewhat lower for a viewer who doesn't follow you. When several posts qualify, the code samples from each post's likes relative to its home impressions so far (a method called Thompson sampling), keeps the two best draws and lifts whichever of those the model scored higher, so early likes from real readers help a new post reach the shortlist. The code also splits viewers and authors into experiment groups for this feature, so not every viewer sees it the same way.

Worked example. Say you have 3,000 followers and publish an original post at 9:00. Until 11:00, and until it passes 200 home impressions, it can be lifted in the feed of any viewer it has already been retrieved for, including people who don't follow you, provided it has not been scored near the bottom for them. A reply you post at 9:05 to someone else's thread is not eligible at all, and neither is a repost. If you want a small account to reach new people, the original post is the unit that counts, and the first two hours are when it can be lifted.

Why don't threads, replies and reposts reach non-followers?

Because a filter removes them. home-mixer/filters/oon_retweet_reply_filter.rs drops reposts and replies from accounts the viewer doesn't follow, unless a setting that allows some out-of-network replies is on. In the production defaults in param.rs that setting (enable_phoenix_oon_replies) is off. The second and later posts of a thread are replies to the first, so for people who don't follow you only the opening post can reach For You, and after ranking only one branch of a conversation is kept.

Three more adjustments shape how often you appear:

  • 48-hour limit. The age filter removes every post older than 48 hours before scoring.
  • Repeated authors. Each extra post from the same author in one feed is multiplied by a decaying factor. With the code defaults in vm-ranker/params.rs (decay 0.5, floor 0.25), your second post is worth 0.625 of its score, your third 0.4375, and later posts approach 0.25.
  • Out of network. Posts from accounts the viewer doesn't follow, and replies and reposts from accounts they do follow, are multiplied by a factor below 1; the code default in the same file is 0.75.

These last two values are code defaults in the reranking service, not part of the production values mirrored into param.rs, so treat them as indicative.

What should you change in how you post on X?

Here is how we translate the code into habits. The left column is what the code shows; the right column is our recommendation.

What the code showsWhat to do
Copy-link shares (20), replies (5), quotes (5) and DM shares (5) outweigh a like (0.708)Write posts with one clear, specific idea people want to answer or pass on, not posts built to collect likes
Replies on original posts from mutual follows weigh 20Build two-way relationships in your niche and reply to the people who reply to you
Out-of-network replies and thread continuations are filteredPut your best idea in a standalone original post; use threads for followers who want the detail
Small-account lift lasts two hours and 200 home impressionsPost when your audience is awake, and be around to answer early replies
Repeated posts from one author are discountedSpace your posts out rather than publishing several in a row
Not interested (-53.07), mute (-58.8) and block (-31.2) are heavily weightedAvoid engagement bait and off-topic posts that make the wrong people want less of you
Only actions on posts served in the home timeline countDon't rely on group chats or pods to push a post; the code says navigating to a post that way has no ranking effect

Spacing posts out and staying consistent go together. If writing every day is the hard part, our guide to keeping a consistent posting schedule without writing every day covers how to batch the work, and making AI writing sound like you covers how to keep drafted posts in your own voice so people still want to reply. To check which kinds of post earn replies and shares for you, rather than likes, see how to measure content performance by format; the guide is written for LinkedIn, but the method carries over.

How does Prospel use the X algorithm's code?

Prospel publishes this article, and its Oracle Score and X post checker draw on the same repository. Every draft in Prospel gets an Oracle Score from 0 to 100; on X it scores what X's open-sourced ranking code rewards (replies, shares and follows, minus anything likely to get a "show less") and names the one change that would raise the score most. The free Prospel Chrome extension adds a stats line under posts on X with views per hour, engagement rate and how long the post has left in X's 48-hour ranking window. Both are described on the features page. You can also paste a post into the free X post checker to see an AI score based on X's ranking code.

Frequently asked questions

Does X penalise posts with links?

The code doesn't show a specific penalty for links in the ranking weights. It does give opening a link a small weight (0.2) compared with a reply (5) or a copy-link share (20), so a post whose only value is the link gives readers fewer of the actions the ranker rewards. Whether a link hurts a particular post depends on whether people still reply to and share it.

Do hashtags or tagging people help reach on X?

There is no hashtag or mention weight in the scoring code: every For You weight applies to an action the viewer is predicted to take. The ranking model does read a post's content, so a hashtag is simply part of the text it learns from, and the filters use hashtags to match people's muted keywords. Tag someone only when the post is about them or for them.

Does the time you post matter on X?

The code has no "best time" setting, but two of its limits are about time: every post is dropped from For You after 48 hours, and the small-account lift only applies in a post's first two hours. Both reward posting when your audience is online and can respond quickly. The best time to post guide covers how to find those hours.

How often does the X algorithm change?

The repository receives new commits most days, and the weights file is resynced from production values automatically. In November 2026 the like, share, click, video-open, time-spent and not-interested weights changed in the sync of 4 November, published on 5 November. Check the date on any guide, including this one, which was reviewed on 26 November 2026.

Sources

How this article was made: drafted with AI assistance and reviewed by the Prospel team before publishing. Product details describe Prospel as it works on the date above. Spotted an error? Email [email protected].

Ready to grow your personal brand?

Prospel uses the research behind articles like this to automate your content strategy on X and LinkedIn.