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
Forever Free Full-Stack Observability | Grafana Cloud Icon
Forever Free Full-Stack Observability | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
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