There’s a ton of folk wisdom on X about how to go viral. A few examples you’ll see over and over:
- Put links in the first reply. “Post the link in the first reply (comment) of your own post” (Sprout Social).
- Replies are king. “A reply on your tweet is worth 13.5x a like,” and if you reply back, “a two-way conversation [is] worth 150x more than a single like” (OpenTweet).
- Pay for Premium. Premium gets “roughly 4x for in-network reach to your own followers and about 2x for out-of-network reach to non-followers” (SocialRails).
But it’s very hard to tell what’s real, and most of it traces back to code Twitter released in 2023. So I was excited to learn that X now publishes the production code for its For You feed at xai-org/x-algorithm, ranking weights included, and updates it about every four weeks. That’s about as close to ground truth as you can get, so I dug in.
How the ranker works
The basic trick is to use something cheap to narrow the field, then save the expensive model for a few thousand posts.
Source: xai-org/x-algorithm, September 2026 release.
- Retrieval narrows ~10 million posts to ~2,800. Most come from people you follow or from an embedding search for posts close to your recent history.
- A transformer predicts what you’ll do. Phoenix (whose code started as a port of Grok-1) reads your last ~1,000 actions and predicts the odds you’ll like, reply, share, mute, or report each post.
- A weighted sum becomes the score. Posts from people you don’t follow get multiplied by 0.75, and each extra post from the same author counts for less.
A few implementation details I found fascinating:
- The ranker never reads your words. Its inputs are post IDs, author IDs, and actions. Your text only gets in through a semantic ID: six numbers from 0 to 255 that work a bit like a postal address. The first number picks one of 256 broad neighborhoods, and each number after that narrows it down further. Posts on the same topic end up sharing the first few numbers.
- An LLM also writes a report on every post. A Gemma-based screen (called, delightfully, the “banger initial screen”) reads each post and outputs a description, tags, topic categories, yes/no flags like high quality, spam, and NSFW, and a “slop score.” The published code doesn’t show how the slop score gets used, but it’s there.
- The weights are right there in
param.rs. Copy-link share is 20, reply 5 (not 13.5), quote 5, DM share 5, repost 1, and like 0.5. Report is −234 and mute −58.8. X even added a comment explaining that these multiply probabilities, not counts, so a report isn’t “worth 468 likes.” Reports are just over 1,000 times rarer. - A lot of the folk wisdom isn’t in the code. There’s no weight for the author replying back, and I couldn’t find a Premium multiplier anywhere in the scoring code.
- Mutual follows got a big boost this summer. Replies on original posts from mutual follows now count for 20 instead of 5 (X even published the whole A/B test history, which is pretty cool to see).
What this means for your posts
So what should you actually do?
- Write things people send to someone. A copy-link share carries 40 times the weight of a like, which makes it incredibly valuable. People forward useful things: a surprising number, a clear chart, an explanation that makes something click.
- Start conversations. Replies and quotes each carry 10 times the weight of a like. Build mutual follows with people in your field, since their replies count four times as much.
- Stay on topic. To reach people who don’t follow you, your post has to land near their interests in embedding space. A post clearly about one thing gets a clear semantic ID.
- Don’t rage bait. Mutes and reports are by far the heaviest weights. Bait shown to the wrong audience earns exactly those.
- Post less, but better. Your second post in someone’s feed counts about 0.6x, your third about 0.4x. Also, everything expires after 48 hours.
- Links are fine now. X says the link penalty ended in mid-2025, and the code agrees. Just make sure the post stands on its own.
There are still limits, though. The trained model isn’t public and every score is personalized to the viewer, so you can’t compute ahead of time how a post will do. But X’s Under the Hood tool will at least tell you if any labels are holding your account back.