14Signals
57% RustLanguage
19.5KStars
Apache 2.0License

X Algorithm

xAI's open-source X For You feed recommendation system — Grok-based transformer, Thunder + Phoenix retrieval, 14 engagement signals, zero hand-engineered features.

xAI · Apache 2.0 · May 15, 2026 · GitHub

About This Repository🔗

xAI open-sourced the X For You feed algorithm — a Grok-based transformer pipeline that retrieves, ranks, and filters posts using 14 predicted engagement probabilities with zero hand-engineered features. Two retrieval paths converge: Thunder serves in-network content (accounts you follow) with sub-millisecond lookups, while Phoenix discovers out-of-network candidates via a two-tower retrieval model. The Phoenix transformer ranker scores posts through a weighted scorer with candidate isolation ensuring consistent, cacheable scores. 57.4% Rust, 42.6% Python. 19.5K stars on GitHub.

Knowledge Graph Explorer🔗

Component Concept Signal
⚙ Display Settings
Appearance
1.00
9px
Physics
0.25
100

Pipeline Components🔗

Engagement Signals🔗

The Phoenix transformer predicts 14 engagement probabilities. Weighted Scorer: Final Score = Σ(weight × P(action)). Negative actions carry negative weights.

How to Run the X Algorithm Pipeline🔗

Frequently Asked Questions🔗

Glossary🔗