The Full Pipeline Explorer

Follow a tweet's complete journey from posting to your timeline through all 5 algorithmic stages. See exactly how scoring, filters, and penalties determine what you see.

What Is The Recommendation Pipeline?

Every day, Twitter processes approximately 1 billion tweets through a 5-stage pipeline. By the time one reaches your feed, it has passed through candidate generation, feature extraction, machine learning scoring, multiple filters and penalties, and final mixing. Only ~4% survive to appear in feeds.

The Five Stages

Stage 1: Candidate Generation (~1B → ~1,400)
  Fetch potential tweets from various sources

Stage 2: Feature Hydration (~1,400 tweets)
  Attach ~6,000 features to each tweet

Stage 3: Heavy Ranker ML Scoring (~1,400 tweets)
  Predict 15 engagement types, calculate weighted scores

Stage 4: Filters & Penalties (~1,400 → ~100-200)
  Apply multipliers, diversity penalties, safety filters

Stage 5: Mixing & Serving (~100-200 → 50-100)
  Insert ads, modules, deliver final timeline

Why This Matters


Follow a Tweet Through The Pipeline

Configure the Tweet

Choose a tweet scenario to follow through the pipeline. Each scenario has realistic engagement probabilities and characteristics.

🔥 Viral Educational Thread

In-Network

High-quality thread from someone you follow in your main interest cluster

📊 Reply: 8% ❤️ Like: 25% 🔁 RT: 3%

🌐 Out-of-Network Quality

Out-of-Network

Great content from someone you don't follow, different cluster

📊 Reply: 5% ❤️ Like: 18% 🔁 RT: 2%

⚡ Controversial Take

In-Network

Hot take that drives replies, from followed author

📊 Reply: 12% ❤️ Like: 8% 👎 Negative: 4%

📝 3rd Tweet from Same Author

In-Network

Good content but author already has 2 tweets in your feed

📊 Reply: 6% ❤️ Like: 20% ⚠️ 3rd tweet penalty

The Technical Details

Stage 1: Candidate Generation

Fetch ~1,400 candidate tweets from various sources based on your profile:

Stage 2: Feature Hydration

Attach ~6,000 features to each tweet:

Stage 3: Heavy Ranker (ML Scoring)

MaskNet model predicts 15 engagement probabilities and calculates weighted score:

score = Σ (probability_i × weight_i)

Top weights:
- Reply with Author Engagement: 75.0
- Reply: 13.5
- Good Profile Click: 12.0
- Retweet: 1.0
- Favorite: 0.5

Negative weights:
- Negative Feedback: -74.0
- Report: -369.0

Stage 4: Filters & Penalties

Multiple filters reshape the ranking:

Stage 5: Mixing & Serving

Insert ads, promoted tweets, follow recommendations, and serve final timeline.


Code References

Candidate generation: ForYouScoredTweetsCandidatePipelineConfig.scala

Heavy Ranker weights: HomeGlobalParams.scala:786-1028

Scoring computation: NaviModelScorer.scala:139-178

Out-of-network penalty: RescoringFactorProvider.scala:45-57

Author diversity: AuthorBasedListwiseRescoringProvider.scala:54

Cluster scoring: ApproximateCosineSimilarity.scala:84-94