X For You Feed Algorithm is the open-sourced core recommendation system that powers the For You feed on X (the social network formerly known as Twitter), and it represents one of the first times a major social platform has published production-level ranking code for public review and experimentation. The repository contains the full pipeline that ingests user engagement and content candidate data, processes it through retrieval, hydration, filtering, scoring, and selection layers, and ultimately ranks posts to show what appears in a user’s feed. At its heart, the system uses a transformer-based model adapted from xAI’s Grok architecture to predict probabilities for various user actions (such as likes, replies, reposts, clicks, and negative signals), then combines those into a weighted final score that drives ranking.

Features

  • Open-source recommendation system for the X “For You” feed
  • Transformer-based scoring using engagement history
  • Rust and Python production pipeline
  • Multi-stage candidate retrieval and filtering
  • Weighted multi-signal scoring integration
  • Reference implementation for real-world ML ranking

Project Samples

Project Activity

See All Activity >

Categories

Algorithms

License

Apache License V2.0

Follow X For You Feed Algorithm

X For You Feed Algorithm Web Site

Other Useful Business Software
Full-stack observability with actually useful AI | Grafana Cloud Icon
Full-stack observability with actually useful AI | 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 For You Feed Algorithm!

Additional Project Details

Programming Language

Rust

Related Categories

Rust Algorithms

Registered

2026-01-27