Elon Musk Open-Sources ‘For You’ Timeline Algorithm on X
By releasing its latest recommendation code, the company aims to foster greater trust and invite external scrutiny, enabling experts to better understand how content is prioritised and distributed.

In a move to boost transparency, X (formerly Twitter) has announced that it is open-sourcing the latest code powering its “For You” timeline. The decision is part of an ongoing effort to make the inner workings of its recommendation system clearer to users, researchers, and developers.
Today, as part of our effort to make our platform transparent, we are open-sourcing the latest code used to recommend posts on the For You timeline.
— Engineering (@XEng) September 9, 2025
Our algorithm is always a work in progress. We will continue to refine our approach to surface the most relevant content to our…
The “For You” feed is central to the platform experience, surfacing personalised content for millions of users worldwide. By releasing its latest recommendation code, the company aims to foster greater trust and invite external scrutiny, enabling experts to better understand how content is prioritised and distributed.
“Our algorithm is always a work in progress,” the company said in a statement. “We will continue to refine our approach to surface the most relevant content to our community.”
The open-sourcing effort also allows developers and academics to study and potentially improve the system, while giving users more clarity on why they see certain posts.
This follows a 2023 post by X owner Elon Musk, who, after acquiring the company, pledged to open-source its recommendation code.
"Our algorithm is overly complex & not fully understood internally. People will discover many silly things, but we’ll patch issues as soon as they’re found!" he said.
Twitter will open source all code used to recommend tweets on March 31st
— Elon Musk (@elonmusk) March 17, 2023
X's For You timeline relies on a complex recommendation system designed to distill over 500 million daily Tweets into a handful of personalised highlights. The process has three stages: sourcing candidate Tweets, ranking them with machine learning, and applying filters to remove blocked, duplicate, or NSFW content.
Roughly half of the recommendations come from accounts you follow, while the rest are from outside your network, using tools like Real Graph to predict engagement and SimClusters to map shared interests. The backbone service, Home Mixer, integrates these models to deliver a dynamic, tailored feed every time you refresh.
This initiative reflects a broader trend in the tech industry, where transparency around AI-driven recommendation engines is increasingly viewed as critical to addressing concerns around bias, misinformation, and fairness.
Comments ()