Understanding the X Algorithm: Elon Musk’s Push for Transparency and Improvement
In early 2026, Elon Musk and the teams at X (formerly Twitter) and xAI took a significant step toward openness by open-sourcing major updates to the platform’s recommendation algorithm. This move aligns with Musk’s long-standing commitment to transparency, allowing users and developers to examine the code that determines what appears in the “For You” feed. Musk has described the current system as “dumb” and in need of “massive improvements,” but he emphasizes that the public can now track progress in real time through regular updates.
The algorithm’s primary goal is to deliver content that maximizes positive user engagement while minimizing regret over time spent on the platform. It pulls from a mix of sources: posts from accounts you follow (in-network) and relevant content from outside your network (out-of-network) that the system predicts you’ll find appealing based on your past behavior.
At its core, the system relies on advanced AI, specifically a transformer architecture adapted from xAI’s Grok model. This powers the ranking process, particularly through a component called Phoenix, which handles retrieval and scoring. Phoenix uses a two-tower model to analyze user history—including likes, replies, time spent viewing posts, blocks, mutes, and other interactions—to predict how likely you are to engage positively with a given post (e.g., liking, reposting, replying, watching videos fully, or dwelling longer) versus negatively (e.g., marking as “not interested,” blocking, or reporting).
These predictions are combined into a weighted score that determines a post’s final ranking in your feed. The Home Mixer orchestrates the overall flow, blending in-network candidates (via a system called Thunder) with AI-retrieved out-of-network ones, then applying filters to exclude spam, duplicates, blocked accounts, muted keywords, overly violent content, or other low-quality material. The entire process is now managed largely by xAI’s engineering team, with the code hosted publicly on GitHub at github.com/xai-org/x-algorithm.
Musk has repeatedly stressed that the algorithm is neutral with respect to politics. It no longer suppresses content from one ideological side (a complaint he leveled against the pre-2022 Twitter), and analyses of the open-source code—including by external AIs—have found no built-in bias favoring left or right. Outcomes depend on user behavior and real-world signals rather than deliberate favoritism.
Recent enhancements address common frustrations. Users can now tap on the “For You” tab to select topic-specific feeds, such as “Technology” or “AI,” which filter out unrelated content like political ragebait. This allows for more curated, interest-focused timelines without constant exposure to divisive material. Musk has noted that these options help reduce doomscrolling by steering toward genuinely engaging topics.
The code is updated approximately every four weeks, complete with developer notes explaining changes. This iterative approach lets the community observe improvements as xAI refines the system to better distinguish meaningful interest from outrage-driven clicks. While Musk admits the algorithm remains imperfect—sometimes amplifying negativity unintentionally—he views it as continually evolving toward smarter, more user-valuing recommendations.
For those interested in the technical details or wanting to follow ongoing developments, the GitHub repository provides the full codebase under the Apache 2.0 license. Musk’s vision is clear: an open, AI-driven feed that prioritizes quality over manipulation, with transparency as the foundation for trust and progress.