Open-source X Recommendation Algorithm · xai-org/x-algorithm@e414c17

2 min read Original article ↗

@@ -6,6 +6,7 @@ This repository contains the core recommendation system powering the "For You" f

6677

## Table of Contents

889+

- [Updates — May 15th, 2026](#updates--may-15th-2026)

910

- [Overview](#overview)

1011

- [System Architecture](#system-architecture)

1112

- [Components](#components)

@@ -22,6 +23,26 @@ This repository contains the core recommendation system powering the "For You" f

22232324

---

242526+

## Updates — May 15th, 2026

27+28+

This release updates the For You algorithm code, including a runnable end-to-end inference pipeline alongside new components for content understanding, ads, and candidate sourcing.

29+30+

1. **End-to-end inference pipeline:** A new [`phoenix/run_pipeline.py`](phoenix/run_pipeline.py) replaces the separate `run_ranker.py` and `run_retrieval.py` scripts with a single entry point that runs **retrieval → ranking** from exported checkpoints, mirroring how the two stages are composed in production.

31+32+

2. **Pre-trained model artifacts:** A pre-trained mini Phoenix model (256-dim embeddings, 4 attention heads, 2 transformer layers) is now packaged as a ~3 GB archive distributed via Git LFS, enabling out-of-the-box inference without training your own model first.

33+34+

3. **Grox content-understanding pipeline:** A new [`grox/`](grox/) service is included, providing classifiers, embedders, and a task-execution engine for content understanding workloads such as spam detection, post-category classification, and PTOS policy enforcement.

35+36+

4. **Ads blending system:** Includes a new [`home-mixer/ads/`](home-mixer/ads/) module that handles ad injection and positioning within the feed, including brand-safety tracking that respects sensitive content boundaries.

37+38+

5. **Query hydrators:** Home mixer now hydrates user context including followed topics, starter packs, impression bloom filters, IP, mutual follow graphs, and served history.

39+40+

6. **Candidate hydrators:** Additional hydrators for engagement counts, brand safety signals, language codes, media detection, quote post expansion, mutual follow scores, and more.

41+42+

7. **Candidate sources:** Adds sources for ads, who to follow, Phoenix MoE, Phoenix topics, prompts, and updates Thunder/Phoenix ones.

43+44+

---

45+2546

## Overview

26472748

The For You feed algorithm retrieves, ranks, and filters posts from two sources: