Particle.news
Download on the App Store

X Open-Sources Grok-Powered Recommendation Code for 'For You' Feed and Ads

X replaces hand-engineered rules with a transformer model to rank both organic posts and advertising.

Overview

  • The company published the production recommendation code on GitHub, covering the logic that determines what users see across the platform.
  • Documentation shows a Grok-based transformer predicts multiple user actions to score posts, moving away from manual heuristics.
  • The pipeline retrieves in-network and out-of-network candidates, narrows a pool of over 100 million posts to roughly 1,500, enriches metadata, and assembles the feed after safety checks.
  • Built in Rust and Python, the system includes components such as Thunder for in-network retrieval, Phoenix for discovery and scoring, and a Home Mixer that composes the final ranking.
  • Elon Musk called the current system “dumb,” pledged updates every four weeks with developer notes, and the release arrives as X tightens policies following misuse of Grok’s image tools and clamps down on engagement-farming apps.