X Published Its Ranking Code Yesterday. If You Post for Your Business, Read the Weights.
Cade Cunningham
Author

So yesterday X put the code behind the For You feed on GitHub, the actual ranking engine, under an open license. Keith Coleman, their head of product, told TechCrunch, "You'll get the core ranking code that pulls posts and ranks them for any given user and assembles the feed." And I spent a couple of hours in it last night, because for anybody who posts for their business, this is the first time the rules are written down instead of guessed at.
I'm going to skip the machine learning and go straight to the part you can use, which is a file of numbers. The feed predicts how likely you are to do each thing to a post, multiplies each probability by a fixed weight, and adds them up. The weights are right there in the repo, and they tell you exactly what X wants.
The weights
A like is worth 0.5. A repost is 1.0. A reply is 5.0, and a reply from someone you follow who follows you back gets a 15.0 boost on top of that. Someone following you off the post is 4.0. Sharing the post is 2.0, sharing it by DM is 5.0, and copying the link to the post is 20.0. Clicking into the post is 0.4. Opening a link inside it is 0.2.
So a reply is ten times a like. A reply from a mutual is forty times a like. And the single most valuable thing anyone can do with your post is copy the link, presumably to send it to somebody, and that's worth forty likes on its own.
Then the negatives. Not interested is minus 43.2. Block is minus 31.2. Mute is minus 58.8. Report is minus 234.
What that means if you're posting for a business
Number one, write things people reply to. Not "thoughts?" at the end, but actual claims a person can disagree with or add to from their own experience. A post that gets ten replies did more than a post that got a hundred likes. And since a reply from a mutual is the biggest positive number in the file, the accounts you actually talk to matter more than the size of your following.
Number two, the goal is the private forward. Copy-link at 20 and DM share at 5 both beat every public metric. The post that wins is the one somebody reads and thinks, I need to send this to my ops manager. Specific and useful travels in DMs. Motivational doesn't.
Number three, links aren't punished, they're just cheap. There's no link penalty anywhere in the code. Opening a link is worth 0.2, which is less than half a like. So the problem with ending a thread with "read more here" isn't that X buries it. It's that you spent your best slot buying the cheapest action on the list. Put the link in the middle and spend the last post on the question.
Number four, don't bait. One report is minus 234, which cancels 468 likes. One mute cancels 118. The negative weights are a hundred times the size of the positive ones, so a post that annoys one person in ten to engage the other nine is a losing trade mathematically, before you even get to what it does to your name.
Number five, don't post six times in an hour. There's an author diversity rule in there that halves each additional post from the same author in a feed, down to a floor of a quarter. Three good posts spaced out beat six stacked.
And one more from the same file. Out-of-network posts, meaning posts from accounts a reader doesn't follow, get multiplied by 0.75 before anything else. For a business account most readers don't follow you, so you start at a 25 percent discount, which means you don't get to be 25 percent less interesting than the post next to you.
Why I care about this beyond X
Because this is what running any part of a business off the actual data looks like instead of off folklore. For years every marketing person had a theory about what X rewards. Now it's a file, and the theory doesn't matter. When we write for X now, the first thing we do is re-read those constants, and when X updates the repo, the rules we write against update with it. That's the difference between an assistant that writes posts and something that works the marketing role. It doesn't guess at the rules of the room, it reads them. Same idea as stop being reactive, applied to marketing.
If you've been posting for your business and it feels like shouting into a well, send me your last ten posts and we'll score them against the file. It's usually obvious in five minutes what to change.