xai-org/x-algorithm
DataSource code for the ranking system behind X's For You feed, published for inspection and research rather than deployment.
Treat this as a readable reference implementation of a large-scale feed recommender, not a service you can deploy. It explains how X assembles the For You feed — in-network posts from followed accounts, out-of-network retrieval, visibility filtering and transformer-based ranking — but the supplied material does not show that the repository is a complete, buildable system.
The problem
Anyone trying to understand or audit what determines which posts appear in a large social feed usually has only public descriptions and user-side observation. Before this release, the concrete steps — which candidate sources feed the mixer, where blocked and muted accounts are applied, how predicted actions are combined — were not public code. With the repository, a reader follows a request from candidate gathering through ranking and filtering, and sees named modules for each stage. What changes for that reader is the ability to point at a specific component instead of reasoning from the visible feed.
What's different
The design separates ranking from eligibility. The home mixer combines followed-account candidates held by thunder, out-of-network retrieval from phoenix, simclusters, and a shared popular-posts source, then ranks them together with one model overview. A separate visibility-filtering stage decides whether a post can appear at all, using the viewer's blocks and mutes plus labels attached by other systems visibility filtering. That split is the most useful idea in the code: a high score cannot override a viewer's own block.
The ranking weights are configuration in the code, and the August 2026 update clarifies that they scale predicted probabilities of actions such as like or report, not raw engagement counts, so the weights cannot be read as "one report equals hundreds of likes" weights explanation. The August 2026 release also replaced a demonstration model with training code and synthetic data generation for a proof-of-concept Phoenix training run release notes. The transparency tool now reports when an account or post was withheld in a country after a legal demand, including which country under the hood. The trade-off is that this is explanatory code: an HN commenter noted the repository appeared not to be intended for building, with some code omitted comment, so it documents architecture better than it supports reproduction.
Who should try it
Good fit: engineers and researchers studying recommender architecture, especially the candidate-generation/ranking/filtering split, or people investigating how account-level actions and labels affect feed eligibility. Also reasonable for a recruiter or technical writer who needs an accurate map of how such a feed request is processed.
Poor fit: someone hoping to run their own For You-style feed. The repository is not presented as a deployable service, and the supplied README focuses on architecture and change notes rather than setup. A reader who needs runnable code should start from the documented training proof-of-concept material and expect to fill in missing pieces.
Requirements and limitations
Rust is the primary language, and the code references a transformer model trained through the Phoenix path, so following it assumes familiarity with large-scale ranking systems rather than beginner Rust. The most important limitation is completeness: much of the value is in reading module boundaries and comments, not compiling or operating the system. The model itself is not shared in a way that lets an outsider verify ranking behavior against live weights; the repository shows the mechanism, not a portable model artifact.
The README's notable-updates pattern also matters for upkeep: behavior changes are logged as dated entries rather than presented as a stable API notable updates. Anyone tracking the feed should read those entries rather than assume an older description still holds.
HotRepo's take
HotRepo tracked the repository on a single daily-board day, 2026-10-27, at 33,824 stars with +37 that day project; comparable history is insufficient to judge persistence. HN discussion around the January 2026 release drew 125 points and 65 comments thread, and one commenter compared it with the earlier Twitter algorithm release comment, a useful caution about how long such publications stay current. Before investing time, check the notable-updates log to see whether the architecture described still matches the code.
Hacker News
Written by AI from the project's README, updated October 27, 2026. The project's own docs are the source of truth.