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

Other Useful Business Software
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
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