LOADING...
Summarize
X reveals code that recommends posts for 'For You' timeline
To note, this isn't the first time X has disclosed its code

X reveals code that recommends posts for 'For You' timeline

Sep 09, 2025
05:41 pm

What's the story

Elon Musk's social media platform, X, has announced that it is open-sourcing the latest version of code that recommends posts for its 'For You' timeline. The firm also noted that the algorithm is "always a work in progress." They promised to keep refining their approach to bring the most relevant content for users. To note, this isn't the first time X has disclosed its code. Back in 2023, a large portion of its source code was made public.

Safety measures

Code that could compromise user safety was excluded

In its announcement, X had emphasized on maintaining user safety and privacy. The company said it was committed to the highest degree of transparency while excluding any code that could compromise these values or allow bad actors to exploit the platform. "Today's release also does not include the code that powers our ad recommendations," they added in their statement.

Algorithm

X's recommendation pipeline explained

The recommendation code at X is a collection of services that curate and serve personalized content across different product surfaces. These include the 'For You' timeline, Search, Explore, and Notifications. In a recent blog post, the company detailed its recommendation pipeline saying it tries to pull the best 1,500 tweets from hundreds of millions through these sources for each request.

Content balance

'For You' consists of both in-network, out-of-network tweets

X revealed that its 'For You' timeline is a mix of in-network and out-of-network tweets. On average, the timeline consists of 50% in-network tweets (from people you follow) and 50% out-of-network posts (from people you don't follow). However, this ratio may vary from user to user depending on their individual preferences and interactions on the platform.