34,166
stars
+128+143+658
5,513
forks
321
watchers
–
prs
166
issues
–
releases
–
discussions
README
X For You Feed Algorithm This repository contains the core code that determines which posts a viewer sees in the For You feed on X. It combines in-network content (from accounts the viewer follows) with out-of-network content (discovered through ML-based retrieval and other mechanisms), filters content based on a variety of inputs, and ranks posts using a transformer model. Table of Contents - Notable Updates - October 26th, 2026 - October 13th, 2026 - October 8th, 2026 - September 18th, 2026 - August 14th, 2026 - August 13th, 2026 - Overview - System Architecture - Request Path - Labeling Path - Components - How It Works - Scoring and Ranking - Filtering - Experiments and Configuration - What's not in this repo? - Under the Hood Label Transparency Tool - Key Design Decisions - License --- Notable Updates October 26th, 2026 - Brazil 2026 Elections filter removed. With the 2026 Brazilian elections over, we have removed Brazil2026ElectionFilter from For You. Posts from the accounts it covered are no longer filtered out because of it. See the August 14th, 2026 update for what the filter did. October 13th, 2026 - Retrieval trained to surface posts people read all the way through. Phoenix retrieval is now also trained to surface posts that people read all the way through. October 8th, 2026 - Ranking predicts time spent much better. The Phoenix ranking model now does a better job of estimating how long you'll spend on each post: see the code. September 18th, 2026 - Under the Hood. Reports now include information about whether one's account or posts have had their visibility limited because of required compliance with law(s). For example, you'll be able to see if any of your posts were withheld from showing in a country following a legal demand — and which country. August 14th, 2026 Notable updates: - How weights work. There's a common misconception about how weights related to actions (e.g. Like, Share, Block, Report, etc) work in ranking. The weights scale the predicted probabilities of such actions (or predicted continuous values, e.g. dwell time) — they do not scale the raw engagement counts, so e.g. it'd be incorrect to see that a report has 468 times higher weight than a like and conclude that e.g. "1 report cancels out 468 likes". The weights are a multiple on your own predicted probability of Liking, Reporting, etc, which is substantially driven by your own behavior. We've added comments to the code so that LLMs or people reading it are more likely to understand it correctly. - Brazil 2026 Elections. As announced by X, in accordance with Brazilian electoral law, For You began running Brazil2026ElectionFilter, which removed posts from accounts reported to Brazil's Electoral Court for the 2026 election, unless the viewer explicitly follows the account. (Removed after the election; see the October 26th, 2026 update.) August 13th, 2026 This release: - Adds key configuration parameters (including weigh
相关报道 (5)
News & coverage (15)
Hacker NewsX For You Feed Algorithm▲ 125 · 65 comments · 2026-01-20Hacker NewsBrazilian election filter in X For You timeline▲ 48 · 59 comments · 2026-08-15Hacker NewsOpen Source X Algorithm Integrates First Public Contribution▲ 4 · 1 comments · 2026-09-02Hacker NewsX for You Feed Algorithm (Updated May 15th)▲ 3 · 0 comments · 2026-05-15Hacker NewsX Algorithm open source updated▲ 2 · 0 comments · 2026-05-15Hacker NewsBrazil2026ElectionFilter▲ 1 · 0 comments · 2026-08-15runtimewire.comElon Musk: latest X algorithm published on GitHub2026-05-15coineditionWhat X Algorithm Transparency Gaps Mean for Crypto Users2026-05-15xlet's visualize the X algorithm!!2026-05-15The VergeMusk says he’s going to open-source the new X algorithm next week2026-01-10