The Algorithm is Twitter’s open source release of the core ranking system that powers the platform’s home timeline. It provides transparency into how tweets are selected, prioritized, and surfaced to users, reflecting Twitter’s move toward openness in recommendation algorithms. The repository contains the recommendation pipeline, which incorporates signals such as engagement, relevance, and content features, and demonstrates how they combine to form ranked outputs. Written primarily in Scala, it shows the architecture of large-scale recommendation systems, including candidate sourcing, ranking, and heuristics. While certain components (such as safety layers, spam detection, or private data) are excluded, the release provides valuable insights into the design of real-world machine learning–driven ranking systems. The project is intended as a reference for researchers, developers, and the public to study, experiment with, and better understand the mechanisms behind social media content.

Features

  • Open source release of Twitter’s core recommendation algorithm
  • Implements ranking pipeline including candidate sourcing and filtering
  • Shows how engagement and relevance signals are used for ranking
  • Written mainly in Scala with production-scale architecture patterns
  • Excludes sensitive data but reveals algorithmic design principles
  • Provides transparency and educational insight into recommendation systems

Project Samples

Project Activity

See All Activity >

Categories

Algorithms

License

Affero GNU Public License

Follow X's Recommendation Algorithm

X's Recommendation Algorithm Web Site

You Might Also Like
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of X's Recommendation Algorithm!

Additional Project Details

Operating Systems

Linux

Programming Language

C++, Java, Python, Scala

Related Categories

Python Algorithms, C++ Algorithms, Java Algorithms, Scala Algorithms

Registered

2025-10-03