AVWBeta
ajad van wyk
About
Portfolio
Tech Stack
Blog
Gallery
Stimming
Resources
AVW
AVW
Get in touch

Let'sbuildsomethingremarkabletogether.

Start with the background, selected work, or the profile brief for a sharper read on the practice and the work behind it.

Get in TouchProfile Brief

Explore

About
Portfolio
Blog

Expertise

Finance & Investment
Legal Framework
AI & Innovation
Research & Writing

Resources

Browse Study Notes
Download LLM Profile
Tech Stack
Gallery

Trust

Email
Download Profile Brief
About AVW
Selected Work

Latest Notes

Archive

Phoenix

X Algorithm

Thunder

X Algorithm

X Algorithm — For You Feed

X Algorithm

AVWCape Town, South Africa

© 2026 Ajad Van Wyk. All rights reserved.

Back to Resources
X Algorithm

XAlgorithm—ScoringPipeline

15 Apr 2026
2 min read
recommendation-systemx-twitterscoringmachine-learning
In this note
  1. 01Scorer sequence
  2. 021. Phoenix scorer
  3. 032. Weighted scorer
  4. 043. Author diversity scorer
  5. 05Implementation notes
  6. 06Related notes

X Algorithm — Scoring Pipeline

"Three scorers applied sequentially after pre-scoring filters. The Phoenix scorer does the ML heavy lifting; the weighted and diversity scorers combine and normalise the outputs."
01

Scorer sequence

Filtered candidates
        │
        ▼
1. Phoenix scorer          ← Grok transformer inference
        │
        ▼
2. Weighted scorer         ← combine ~15 action probabilities
        │
        ▼
3. Author diversity scorer ← attenuate repeat authors
   OON scorer              ← adjust out-of-network scores
        │
        ▼
Sort by final score → top K selection

02

1. Phoenix scorer

Runs the Phoenix Grok-based transformer. For each candidate:

  • - Input: user engagement history sequence + post features (via hash embeddings)
  • - Candidate isolation: posts cannot attend to each other — scores are batch-independent
  • - Output: probability for each of ~15 action types

Action probabilities

CategoryActions
PositiveP(like) P(reply) P(repost) P(quote) P(click) P(share) P(follow_author) P(video_view)
NeutralP(dwell) P(photo_expand) P(profile_click)
NegativeP(block_author) P(mute_author) P(report) P(not_interested)

03

2. Weighted scorer

Combines all action probabilities into a single scalar:

$$\text{Score} = \sum_{i} w_i \cdot P(\text{action}_i)$$

Where:

  • - $w_i > 0$ for positive actions
  • - $w_i < 0$ for negative actions (block, mute, report actively suppress content)
"The weights are learned during training — not manually tuned. The model decides how much each action type should matter relative to others."

04

3. Author diversity scorer

Attenuates scores for posts from authors already well-represented in the current candidate set. Prevents any single author from dominating the feed.

A separate OON scorer applies additional adjustments specifically to out-of-network candidates, balancing in-network and out-of-network content in the final ranking.


05

Implementation notes

Scorers are implemented as Scorer traits in the candidate-pipeline crate:

rust
trait Scorer {
    fn score(&self, candidates: Vec<Candidate>, query: Query) -> Vec<ScoredCandidate>;
}

The framework runs scorers sequentially, passing the scored output of each to the next.

06

Related notes

  • - Phoenix — transformer architecture and action probability outputs
  • - X Algorithm — For You Feed — full pipeline context
  • - X Algorithm — Pre-Scoring Filters — what happens before scoring
  • - X Algorithm — Key Concepts — weighted scorer, candidate isolation
Previous

X Algorithm — Pre-Scoring Filters

More from this module

Phoenix

recommendation-systemx-twitterout-of-network-retrievaltransformer

Thunder

recommendation-systemx-twitterin-network-retrievalrust

X Algorithm — For You Feed

recommendation-systemmachine-learningx-twitterstudy-guide

X Algorithm — Key Concepts

recommendation-systemx-twitterconceptsglossary
Keep exploring

More notes and resources

Browse the full resource vault, or reach out to discuss any of these topics.

All resources
Get in touch