X_ALGORITHM_EXPLAINED.md

How X's Recommendation Algorithm Works

X's algorithm determines what content appears in your "For You" timeline. Understanding how it works helps you create content that gets maximum distribution.

§1. Three-Stage Pipeline

Stage 1: Candidate Retrieval

The algorithm fetches ~1,500 candidate tweets from three sources:

  • In-Network - Tweets from people you follow
  • Out-of-Network - Tweets from people you don't follow but might interest you
  • Embeddings - Similar tweets based on your engagement history
Stage 2: Ranking (Phoenix Scorer)

Each tweet gets a relevance score predicting your likelihood to engage. The algorithm uses a neural network trained on billions of interactions.

Stage 3: Filtering & Mixing

Final stage applies filters (blocks, mutes), balances content diversity, and mixes in ads.

§2. Engagement Signal Weights

Not all engagements are equal. The algorithm assigns different weights based on action value:

HIGH VALUE SIGNALS
  • Reply (0.18) - Shows deep engagement, starts conversations
  • Retweet (0.16) - Amplifies reach, strong endorsement
  • Like (0.15) - Most common positive signal
  • Quote Tweet (0.12) - Adds commentary, high value
  • Follow Author (0.10) - Strongest signal of quality content
MEDIUM VALUE SIGNALS
  • Click (0.06), Profile Click (0.05), Video View (0.05)
  • Dwell Time (0.04), Photo Expand (0.04)
NEGATIVE SIGNALS (PENALTIES)
  • × Report (-0.30) - Severe penalty, can lead to shadowban
  • × Block Author (-0.25) - Strong negative signal
  • × Mute Author (-0.20) - Reduces future distribution
  • × Not Interested (-0.15) - Tells algorithm to show less

§3. Author Diversity & Quality Ranking

The algorithm favors content diversity to prevent timeline monotony.

Varied content types (text, media, polls, links)
Mix of emotional tones (not all controversy, not all neutral)
Different engagement mechanisms (questions, CTAs, statements)
Balanced posting frequency (1-5 posts/day optimal)
× Spammy behavior (excessive hashtags, caps, mentions)

§4. Blue Verified Priority Ranking

X Premium (Blue) subscribers get explicit algorithmic boosts:

+15 score boost in ranking algorithm
Priority in replies (appear higher in threads)
Increased reach multiplier for viral content
Better placement in "For You" recommendations

§5. Content Features That Boost Distribution

CONTENT STRUCTURE
• Optimal length: 50-280 chars
• Has media (images/video)
• 1-3 hashtags (not more)
• Line breaks for readability
ENGAGEMENT TRIGGERS
• Asks questions
• Has clear CTA
• Trending topics/keywords
• Viral hooks (threads, POV, etc)

§6. What Hurts Your Reach (Deboost Patterns)

  • × Engagement bait ("Like if...", "RT for...")
  • × Follow-for-follow requests
  • × Excessive hashtags (>5)
  • × ALL CAPS SHOUTING
  • × Spammy links or scam keywords
  • × Low-quality or misleading content

§7. Posting Frequency & Consistency

The algorithm rewards consistent, quality posting over sporadic activity:

OPTIMAL:1-5 tweets per day
ACCEPTABLE:5-10 tweets per day
SPAM RISK:>10 tweets per day

Source: Based on xai-org/x-algorithm — Open-source implementation of X's recommendation algorithm

Note: This explains the base algorithm. Production may include additional ranking factors.