X open-sources core algorithm code for 'For You' recommendation feed

IgorBrigadir · x · 2026-08-15

X has open-sourced the core algorithm repository powering the 'For You' feed. The codebase contains the logic determining which posts viewers see, combining in-network content with out-of-network discovery via ML-based retrieval, content filtering, safety systems, ranking strategies (e.g., Phoenix), and recommendation components (e.g., SimClusters).

It includes various service modules like Home Mixer, Grok-related code, ranking policies, and visual filters. This offers a deep dive into the ranking mechanisms of a major social platform for recsys enthusiasts, with ongoing updates planned to reflect production changes.

Related event: X Open Sources 'For You' Algorithm(16 posts)→

Original post →

More from Infra

Infra channel →