Based on xAI's open-sourced code · May 2026

Every time you open ,
an AI picks ~50 posts
out of thousands.

Here's exactly how it chooses — in plain English. No math. Eleven interactive sections, ~5 minutes.

11 chapters8 interactive demos5 min readby @0xshawnpang
kept by the algorithmfiltered outscrolling = real-time ranking
01 · The 60-second version

In one breath.

Click any step to lock it. Scroll for the full version ↓
02 · Where posts come from

Two buckets of posts.
One tab uses both.

Switch tabs to watch which posts show up. The For You tab mixes people you follow with strangers an AI picked for you. Following uses only the first.

BUCKET A · IN-NETWORK

“Thunder”

Recent posts from accounts you follow. Loaded from fast in-memory storage in < 1 ms.
~few thousand follows watched, updated live
BUCKET B · OUT-OF-NETWORK

“Phoenix Retrieval”

An AI compares your behaviour to all of X and pulls the closest matches. You don't follow them.
~all of X embedded, refreshed periodically
Andrej Karpathy@karpathy·8m
muting the word 'banger' has improved my life 30%
301 628 5486
Sam Altman@sama·23m
made a chart of all my charts
333 687 5964
Visa@visakanv·2hfor you
the algorithm rewards what the algorithm rewards
620 1226 10270
@levelsio@levelsio·23m
every problem looks like a thread when you sell threads
365 747 6443
swyx@swyx·2hfor you
twitter is just a chat room with a sales funnel
652 1285 10749
Naval@naval·23m
I quit my job to scroll professionally
397 807 6921
swyx@swyx·2hfor you
nobody read your post. it's fine. so did mine
684 1345 11227
● For You: mixes followed + AI-picked strangers
03 · The funnel

10,000 candidates.
50 survive.

From the moment you tap the app, the algorithm shrinks a giant pool stage by stage. Drag the slider to step through.

STAGE 1 OF 4
10,000
Candidates gathered
in-network + out-of-network
CANDIDATES GATHERED
ROUGH ORDER-OF-MAGNITUDE NUMBERS · ACTUAL COUNTS VARY PER USER
04 · Filters

Posts that never even get scored.

Before any AI runs, these get dropped from the pile. If your post hits any of these for a given viewer, it's invisible — no matter how good it is.

Blocked authors
Anyone you've blocked. Obvious one.
Muted authors
Same idea, quieter. They post — you don't see it.
Muted keywords
Words on your block list. The whole post is filtered out.
Already seen
A probabilistic 'have I shown this?' filter. No repeats.
Too old
There's a hard max age. Stale posts get dropped.
Your own posts
X doesn't show you your own stuff in your feed.
Duplicate reposts
Only one version of the same thing survives.
Safety violations
Spam, gore, violence, policy violations.
Inaccessible accounts
Private, suspended, paywalled if you haven't paid.
05 · The AI's prediction job

19 ways you might react.
That's the entire AI.

For every post, the model predicts how likely you are to do each of these things. Hover any one to see what it does. Weights are illustrative— exact production values aren't in the public release.

POSITIVE SIGNAL — PUSHES SCORE UP

Like

Default engagement. The cheapest positive signal — fast and frequent.

REL. WEIGHT
+1.0

One report can outweigh many likes. The AI doesn't have a notion of "quality" — only "engagement likely". It's predicting what people like you will do, not judging your post.

06 · Score simulator

Tap reactions.
Watch the score move.

The 19 predictions get added with weights into one number. Higher = more screens. Here's a live version. One report ≈ many likes lost.

LIVE SCORE
+0
OKFollowers see it. Limited out-of-network reach.
TRY A PRESET
PUSHES UP
Like+1.0
120
Reply+3.0
8
Repost+2.5
4
Share+1.8
3
Dwell+2.0
60
Profile click+1.4
5
Follow author+3.5
1
Watch video+2.2
0
PUSHES DOWN
Not interested2.5
0
Mute author4.0
0
Block author6.0
0
Report post8.0
0

ILLUSTRATIVE — EXACT WEIGHTS NOT IN THE PUBLIC RELEASE

07 · Hand-written rule

You can't dominate.
Each post by the same author
counts less than the last.

Even if all your posts are great, only the first one or two get full credit per viewer. This is hard-coded — the AI doesn't get to override it.

IF YOU POST 3 TIMES TODAY...
3×

By post 3, you're at ~⅓ effective score. Each one cannibalizes the last.

Quality > quantity. Posting 5 mediocre things hurts more than 1 great one.
100%
×1.00
55%
×0.55
33%
×0.33
BONUS

Video gets extra credit

If your post has a video longer than a threshold, it gets an extra scoring signal (video-quality-view). Longer ≠ trivially better — but trivial clips don't qualify.

NEW ACCOUNT

The system has a tutorial mode

If you have few interactions (~<100), your feed is routed to a different cluster — more topic-based, less personalised. First-time users get training-wheels ranking.

08 · Journey of a post

From "Post" to feed.
About 7 stops, ~50 ms.

Press play and follow a single tweet through the system.

STEP 01 / 07
01
02
03
04
05
06
07
STAGE 1

You hit Post

Your post is published. The clock starts.

09 · Re-ranking demo

Same 12 posts.
Three different feeds.

Watch the same set of posts get re-ordered as filters and ranking turn on. Tap a mode.

Notice how the highest-engagement post (1.5K likes) is post #6 chronologically — but ranks #1 once the algorithm runs. Recency only matters as a filter.
← HIGHEST SCORE · RANKED9 shown
#01
Balaji@balajis·40m
nobody read your post. it's fine. so did mine
121 181 6,005
#02
Sam Altman@sama·12m
made a chart of all my charts
79 118 3,925
#03
DHH@dhh·3h
every problem looks like a thread when you sell threads
33 50 1,645
#04
Elon Musk@elonmusk·2m
the algorithm has officially read my diary
20 29 965
#05
Visa@visakanv·2h
you don't have writer's block, you have taste exceeding skill
15 22 725
#06
Patrick Collison@patrickc·5h
spent 3 hours optimizing a function that runs once a year
8 12 385
#07
Andrej Karpathy@karpathy·5m
the best startups feel illegal at first
3 4 125
#08
Paul Graham@paulg·55m
the best onboarding is a friend showing you
1 2 53
#09
@levelsio@levelsio·18m
the For You tab knows things about me I haven't told my therapist
1 1 37
10 · Creator scorecard

Will this post go viral?
Answer 8 questions.

A diagnostic, not an oracle. Each yes/no maps to a behaviour the algorithm rewards or punishes.

01
Will you push it in the first hour after posting?
Replying to early commenters, sharing in DMs — keeps early signals strong.
02
Does the post contain exactly one idea?
If you have two ideas, that's two posts. Multi-topic posts ranker-confuse and engagement-dilute.
03
Is this your first post today?
Author diversity penalty: post #2 ≈ 55%, #3 ≈ 33%, #4 ≈ 20%.
04
Will people stop scrolling to read it?
Dwell time is a strong signal you can't fake. A worth-reading post earns it.
05
Does it invite a reply, not just a like?
Replies count ~3× a like. A question or hot take outperforms a statement.
06
Does it have a video over the minimum length?
Video-quality-view is an extra scoring slot. Long-enough video qualifies.
07
Is it free of report/mute bait?
One report can outweigh many likes. Bait earns negative signals fast.
08
Could a stranger see this and want to follow you?
Profile-clicks and follows-after-view are the strongest positives in the ranker.
VIRAL SCORE · 0/8 ANSWERED
50
DECENT

Your followers will mostly see it. Out-of-network reach modest.

11 · Common misconceptions

What the open code
does NOT show.

Things people assume but the public release doesn't support. Tap to expand.

ACTUALNo such boost was found in the released ranker. Accounts are treated equally by learned behaviour.
Doesn't prove production has none — only that the public release doesn't reveal one.
ACTUALThere's safety filtering and category classifiers — but no 'promote this topic / suppress that' toggle in the released code.
Trust & safety enforcement is real. It's not a topic dial, though.
ACTUALAds are inserted by a separate spacing rule. They're not scored alongside posts by the main ranker.
Ad relevance is a whole other system, not this one.
ACTUALIt doesn't. It predicts what people like you will do. 'Quality' is just a stand-in for predicted engagement.
This is why baity content can score well — and why 'just be authentic' is bad advice.
ACTUALProduction is retrained continuously on live data. The release is a frozen snapshot from one moment in time.
Things may have changed since — especially around trust/safety and advertiser preferences.