xai-org/x-algorithm

Algorithm powering the For You feed on X

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 18 minutes ago
Added to GitGenius on September 1st, 2026
Created on January 19th, 2026
Open Issues & Pull Requests: 155 (+0)
GitHub issues: Enabled
Number of forks: 5,367
Total Stargazers: 32,852 (+2)
Total Subscribers: 304 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 2.8 hours
Mean response time: 45.4 hours
90th percentile: 5.3 days
Tracked items: 22

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 100% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Only 2% of issues opened in the past year have been closed.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 27
New in 7 days: 5
Closed in 7 days: 0
Avg open age: 13 days
Stale 30+ days: 0
Stale 90+ days: 0

Recent activity

Opened in 7 days: 2
Closed in 7 days: 0
Comments in 7 days: 4
Events in 7 days: 4

Top labels

No label distribution available yet.

Detailed Description

X Algorithm is a feed ranking system that determines which posts appear in the For You feed on X by combining in-network and out-of-network content, filtering posts based on various inputs, and ranking them using a transformer model.

The system addresses the problem of selecting and ordering relevant content from a massive pool of posts. It works by retrieving both posts from followed accounts and discovered content through ML-based mechanisms, then applying filters to remove ineligible posts and scoring remaining candidates using predicted probabilities of user actions like likes, shares, and dwell time. The ranking uses a transformer model to produce a final score that determines feed order.

Developers considering adoption should understand that this is the actual production algorithm from X, not a simplified demonstration. The codebase includes the core ranking logic, filtering systems, configuration parameters, and model training code. It is most relevant for those studying large-scale feed ranking systems, building similar recommendation infrastructure, or seeking transparency into how algorithmic feeds operate. The project explicitly notes what it does not contain, helping set expectations about scope.

The project receives active maintenance with documented updates addressing both technical clarifications and regulatory requirements. Recent changes include added code comments explaining how engagement weights function in the ranking system and implementation of region-specific filtering systems. The codebase incorporates systems that impact content filtering decisions, making the mechanisms behind feed visibility explicit and auditable.