Skip to content

Repository files navigation

X Algorithm, explained from source

This repository is a source-audited explanation of xAI's public X recommendation-algorithm release at commit 47c1bcdadfe4911568fd6db4f8838b194325beab.

The release changes 2,053 files. This project traces those changes into one understandable model of the system: candidate retrieval, Phoenix engagement prediction, weighted ranking, slate policy, visibility enforcement, and final feed blending.

Start here

The short version

X does not use one algorithm or one score.

viewer context
      |
      +--> Thunder: recent posts from followed accounts
      +--> Phoenix: neural out-of-network retrieval
      +--> SimClusters: graph and community retrieval
                         |
                         v
                  filters and hydration
                         |
                         v
              Phoenix action probabilities
                         |
                         v
                 weighted utility score
                         |
                         v
       cold start + author diversity + OON policy
                         |
                         v
               optional DPP diversity
                         |
                         v
            visibility: allow / cover / drop
                         |
                         v
              ads and product-module blend

Phoenix predicts the probabilities of actions such as favorite, reply, repost, share, copy link, not interested, block, mute, and report. Home Mixer turns those predictions into utility with checked-in weights. Safety remains a separate decision system downstream of ranking.

What is inside

Path Purpose
REPORT.md Complete 8,000-word, exact-SHA technical audit
report/x-algorithm-technical-report.pdf Printable and link-preserving PDF edition
index.html Accessible visual whiteboard
styles.css Responsive paper-and-ink visual system
app.js Ranking sandbox and purposeful drawing motion
scripts/build_pdf.py Reproducible ReportLab PDF builder

Rebuild locally

python3 -m pip install -r requirements.txt
make pdf
make serve

Then open http://localhost:8000.

Scope and limits

This is an independent technical explanation, not an xAI publication. It is based on public source at one exact commit. The upstream release omits production data, trained checkpoints, live feature-switch allocations, some internal dependencies, selected anti-abuse rules, Grox prompt templates, and some production thresholds. Checked-in defaults do not prove which experiment is active for a particular viewer.

No X or xAI endorsement is implied.

About

Source-audited technical report and interactive whiteboard explaining the X recommendation algorithm

Resources

Stars

9 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages