Articles
Follow on X中
How did X move from hand-written rules to Grok ranking?0%
x

X Algorithm Code: Copy-Link Shares Weigh 30x a Like

AI tools

Evan LongPublished 2026-10-15Updated 2026-10-15

TL;DR Line-by-line read of xai-org/x-algorithm commit 17c96bf: like 0.66, reply 5.0, copy-link share 20.0. The 2023 author-reply weight of 75 is no longer scored separately.

On 2026-10-15, indie developer Evan Long (@evanlong_me) checked the open-source X algorithm repo xai-org/x-algorithm line by line at commit 17c96bf (committed 2026-10-14 03:41 UTC). Three findings: (1) the default weights are 0.66 for a like, 5.0 for a reply and 20.0 for sharing via copy link (param.rs L320–L321, L363–L368); (2) the 2023 Twitter algorithm weighted a reply at 13.5 (L33) and a reply engaged by the author at 75.0 (L36), and today author replies have no separate weight, though the model still reads focal_author_reply as an input feature (reply.rs L62–L69); (3) the weights multiply predicted probabilities, not engagement counts (param.rs L291–L311).

View repository2026-10-15

Image preview

Repository home. The README preview starts at the For You heading, and line 3 says it ranks posts using a transformer model. The side panel shows About, the star count, and commit 17c96bf.

View README2026-10-15

Image preview

The first three lines of README.md. Line 3 is highlighted: It ranks posts using a transformer model (Phoenix) that predicts engagement probabilities and ranks posts accordingly.

How did X move from hand-written rules to Grok ranking?

This timeline only includes posts from the personal accounts of Elon Musk and X head of product Nikita Bier. Quoted text is verbatim from the original posts; everything else is paraphrased. These are plans and statements: the code is the arbiter of what shipped. Dates are UTC+8.

Public statements by Elon Musk and Nikita Bier on the X recommendation algorithm (UTC+8)
Date (UTC+8)WhoWhat they saidPost
2025-06-10MuskParaphrase: the recommendation algorithm will use Grok more, so strong posts from small accounts can reach the feedlink
2025-08-16MuskParaphrase: testing a new algorithm powered by Grok 4 Minilink
2025-09-10MuskParaphrase: heuristic code will be replaced by a Grok AI recommendation systemlink
2025-09-20MuskParaphrase: aiming for pure AI recommendations by Novemberlink
2025-10-18Musk“The 𝕏 recommendation system is evolving very rapidly. We are aiming for deletion of all heuristics within 4 to 6 weeks.”link
2025-11-13MuskParaphrase: next month Grok will understand roughly 100 million posts a day and recommend on content quality regardless of account sizelink
2026-01-11MuskParaphrase: the new algorithm will be open-sourced within 7 days, then updated every 4 weekslink
2026-01-20MuskParaphrase: the algorithm is built by the xAI engineering teamlink
2026-03-20MuskParaphrase: a major AI recommendation update is coming next week, open-sourced at the same timelink
2026-03-29Nikita Bier“It's perhaps the strongest proof that our algorithm has eliminated all rules” … “Post ranking decisions are not even constrained by language anymore.”link
2026-05-15MuskParaphrase: the latest algorithm is on GitHub, with monthly updates and release notes from now onlink

The current README states that For You “ranks posts using a transformer model” (README L3).

View post2026-10-15

Image preview

Elon Musk’s post from 18 October 2025. The text is “The 𝕏 recommendation system is evolving very rapidly. We are aiming for deletion of all heuristics within 4 to 6 weeks.” A Grok translate control sits under the post.

View post2026-10-15

Image preview

Nikita Bier’s post from 29 March 2026. One paragraph says “It's perhaps the strongest proof that our algorithm has eliminated all rules.” The next says “Post ranking decisions are not even constrained by language anymore.”

How does the X algorithm score posts today?

Per the README, the model predicts how likely the viewer is to take each action on a post, multiplies each prediction by a weight, and sums the results (README L352–L356). The default weights live in home-mixer/params/param.rs. The table compares them to the 2023 Twitter algorithm weights in twitter/the-algorithm-ml; “—” means that version has no equivalent entry.

2026 x-algorithm default weights beside the 2023 the-algorithm-ml weights
Action2026 defaultCode2023 Twitter weight2023 source
Like0.66L3200.5L31
Reply5.0L32113.5L33
Reply boost between mutual follows15.0L322–L327——
Repost1.0L3341.0L32
Profile click0.0L349–L35412.0 (good_profile_click)L34
Click0.3L34711.0 (good_click) / 10.0 (good_click_v2)L37 / L38
Share2.0L356——
Share via DM5.0L357–L362——
Share via copy link20.0L363–L368——
Quote5.0L370——
Reply engaged by authorNo separate weight (still a model input feature)reply.rs L62–L6975.0L36
Not interested−52.272L414–L419−74.0 (negative_feedback_v2, combined)L39
Block author−31.2L420–L425covered by negative_feedback_v2L39
Mute author−58.8L426–L431covered by negative_feedback_v2L39
Report−234.0L432−369.0L40

xai-org/x-algorithm · pinned commit 17c96bf Opening home-mixer / params / param.rs Lines 295–297 comment: weights multiply “predicted probability”, not raw engagement counts Line 320: like FavoriteWeight = 0.66 Line 356: share ShareWeight = 2.0 Lines 357–362: share via DM ShareViaDmWeight = 5.0 Lines 363–368: share via copy link ShareViaCopyLinkWeight = 20.0 Line 432: report ReportWeight = -234.0 Compared with the 2023 twitter/the-algorithm-ml weights 2023 line 33: reply = 13.5 Line 36: reply engaged by the author reply_engaged_by_author = 75.0

View param.rs2026-10-15

Image preview

The param.rs weight block. Highlighted values are FavoriteWeight 0.66 and ShareViaCopyLinkWeight 20.0. The same view also shows ReplyWeight 5.0, RetweetWeight 1.0, ShareWeight 2.0, ShareViaDmWeight 5.0, and QuoteWeight 5.0.

View the 2023 weights2026-10-15

Image preview

Lines 31–40 of the old table: fav 0.5, retweet 1.0, reply 13.5, good_profile_click 12.0, video_playback50 0.005, reply_engaged_by_author 75.0, negative_feedback 0.2, negative_feedback_v2 −74.0, report −369.0.

The three biggest shifts: replies dropped from 13.5 to 5.0; author-engaged replies went from 75.0 to no separate weight; and share signals were added, with copy-link sharing (20.0) now the highest positive weight in the file.

What two caveats do you need before reading these weights?

Caveat 1: weights multiply predicted probabilities, not counts. The comment at param.rs L291–L311 says each weight multiplies the “predicted probability” of an action (or a continuous value such as watch time) and that “the weights do not multiply raw engagement counts.” It explicitly rejects the reading that “one report cancels 468 likes,” noting that a report's baseline probability is more than 1000x lower than a like's, so it needs a larger weight to affect ranking at all (param.rs L291–L311; also README L354). So “copy link weighs 30x a like” (20.0 / 0.66 ≈ 30.3) describes how strongly each prediction is scaled, not “one copy-link share equals 30 likes.”

View the comment2026-10-15

Image preview

The highlighted comment says the weights multiply predicted probabilities rather than raw engagement counts, and that a report’s baseline probability is more than 1000× lower than a like’s, which is why the report weight looks large.

Caveat 2: param.rs holds defaults that experiments can override. The README's “Experiments and Configuration” section says X runs experiments on a small share of traffic, reads many tunable values from a configuration system, and uses cron scripts to set the repo defaults to the “primary production values” (README L414–L418). Treat the table as a snapshot of the main production config; a given user may be in an experiment bucket with different values.

Did X really delete all the heuristics?

Official statements beside rule-based mechanisms still in the repository
Official statementRule-based mechanisms still in the codeSource
“deletion of all heuristics within 4 to 6 weeks” (Musk, 2025-10-18)AgeFilter removes posts older than 48 hoursREADME L374
SameDeduplication: DropDuplicatesFilter, RetweetDeduplicationFilter, DedupConversationFilter, previously-seen filtersREADME L372–L382, L402
“our algorithm has eliminated all rules” (Nikita, 2026-03-29)Out-of-network discount: posts from accounts you don't follow, and replies/reposts from accounts you do, are multiplied by a factor below 1 (value not given in the README)README L360
SameCold-start parameters: impression threshold 200, follower cap 50,000, max post age 7,200 secondsparam.rs L489–L518
SameAuthor diversity decay is described in the README, but home-mixer's value_model.rs hard-codes enable_author_diversity: falseREADME L359, value_model.rs L45–L47
SameBrazil2026ElectionFilter, added to comply with Brazilian electoral lawREADME L40
View Filtering2026-10-15

Image preview

The README Filtering table. The rows are Age, Selfpost, Retweet, Ineligible, Duplicate, Muted keyword, Blocked keyword, Previously seen, and Subscribed author.

View value_model.rs2026-10-15

Image preview

Line 45, enable_author_diversity: false, is highlighted. The next line sets author_diversity_penalty to 0.5 and author_diversity_discount to 0.2.

View cold-start parameters2026-10-15

Image preview

The highlighted cold-start parameters include OonFavThreshold 10, OonFavWeight 0.05, OonReplyThreshold 1, OonReplyWeight 0.05, OonAgeHours 48, and OonAgeWeight 0.01.

A fair reading: the scoring step really is model-driven, but filtering, dedup, discounts and cold start around it are still hand-written rules. vm-ranker's value_model.rs reads the author-diversity switch from params instead (vm-ranker/scoring/value_model.rs L104–L106), so which path production uses, and whether diversity is on, cannot be determined from the repo. Unverified.

What does this mean for creators?

Each point cites its code. Items marked “inference” are my reading; the code does not prove them directly.

  1. 48 hours is a hard cutoff. AgeFilter drops posts older than 48 hours (README L374).
  2. The first two hours matter for small accounts. Cold-start parameters: max post age 7,200 s, follower cap 50,000, impression threshold 200 (param.rs L489–L518). Inference: new posts from smaller accounts may get extra placement in that window; the mechanism was not traced line by line.
  3. Content people pass along is weighted most. Copy-link share 20.0, DM share 5.0 (L357–L368). Inference: reference material people save or send to colleagues beats chasing likes.
  4. Replies still matter, but there is no 75x bonus anymore. focal_author_reply remains a model feature (reply.rs L62–L69). Inference: author replies still influence ranking, by an amount the code does not reveal.
  5. Out-of-network reach is discounted. See README L360 and L376 (OONRetweetReplyFilter).
  6. Negative feedback is still heavily weighted. Report −234, mute −58.8 (L426–L432). Per caveat 1, this acts on the predicted chance that a viewer reports you, not a tally of reports.

Self-check: the README describes Under the Hood, a pilot tool that shows visibility-affecting labels on your account and posts (README L452–L456; entry point https://x.com/i/jf/under_the_hood ).

I ran into a similar gap between official guidance and actual mechanics when building my own site; see bilingual site SEO.

How was this verified, and what are the sources?

  • Checked on 2026-10-15 (UTC+8).
  • Code: xai-org/x-algorithm commit 17c96bf346df3d62b90f1bb01830d432dba74485 (2026-10-14 03:41 UTC); every line number verified locally with rg/sed.
  • 2023 baseline: twitter/the-algorithm-ml commit b85210863f7a94efded0ef5c5ccf4ff42767876c, recap README L31–L40, each weight linked to its own line.
  • Statements: original posts by Elon Musk and Nikita Bier, linked in the timeline.
  • Left out as unverified: any Premium ranking boost, the live out-of-network discount and author-diversity values, the repo's star count.

Screenshot-worthy comparisons

  1. Copy-link share 20.0 vs like 0.66 (L320 / L363–L368).
  2. Author-engaged reply: 75.0 in 2023 (L36) → no separate weight in 2026, still a model feature (reply.rs L62–L69).
  3. “deletion of all heuristics within 4 to 6 weeks” (Musk, 2025-10-18) vs the 48-hour AgeFilter (README L374) and enable_author_diversity: false (value_model.rs L45).

Author: Evan Long, indie developer and founder of a team building products for global markets. About · Resume · X @evanlong_me

Keep reading

More articles
Type hierarchy and readable column widthProduct design2026-10-09
Testing an article-directory SEO migrationDevelopment2026-10-09