Overview
Scoring is the most critical stage of the pipeline. The Phoenix scorer uses a Grok-based transformer model to predict engagement probabilities for each candidate, and these predictions are combined using a weighted formula to produce the final relevance score.Unlike traditional recommendation systems that rely on hand-engineered features, the Phoenix model learns relevance entirely from user engagement sequences. No manual feature engineering required.
Scoring Pipeline
Four scorers apply sequentially to transform raw candidates into ranked results:Phoenix Scorer
Model Architecture
The Phoenix scorer uses a Grok-based transformer with candidate isolation - candidates cannot attend to each other during inference. This ensures scores are consistent regardless of which other posts are in the batch.Phoenix Model Details
See the Phoenix Ranking page for complete transformer architecture and attention masking details.
Input Format
The model takes:- User Context: User embedding + engagement history sequence
- Candidate Posts: Post embeddings (text hashes, author IDs, metadata)
Output: Multi-Action Predictions
The model predicts probabilities for 14 engagement actions:Positive Engagement Actions
Positive Engagement Actions
These actions indicate the user finds content valuable:
favorite_score- Probability user will like the postreply_score- Probability user will replyretweet_score- Probability user will repostquote_score- Probability user will quote repostclick_score- Probability user will click into post detailprofile_click_score- Probability user will click author profilevqv_score- Probability of video quality view (watching video)photo_expand_score- Probability user will expand photoshare_score- Probability user will share externallyshare_via_dm_score- Probability user will DM the postshare_via_copy_link_score- Probability user will copy linkdwell_score- Probability user will dwell (spend time viewing)follow_author_score- Probability user will follow the author
Negative Engagement Actions
Negative Engagement Actions
These actions indicate the user dislikes content:
not_interested_score- Probability user will click “Not Interested”block_author_score- Probability user will block the authormute_author_score- Probability user will mute the authorreport_score- Probability user will report the post
Continuous Predictions
Continuous Predictions
dwell_time- Expected dwell time in seconds (continuous value)
Implementation
The Phoenix scorer extracts predictions from the model response:home-mixer/scorers/phoenix_scorer.rs
Weighted Scorer
Formula
The weighted scorer combines all Phoenix predictions into a single relevance score:Negative engagement predictions (block, mute, report, not interested) have negative weights, which reduces the score for content users would likely dislike.
Weight Configuration
Weights are tuned based on business objectives and user satisfaction metrics. Higher weights are given to:- Meaningful engagement: Replies, reposts, follows (indicate high-quality content)
- Consumption: Dwell time, video views (indicate engaging content)
- Passive signals: Simple clicks (less meaningful than likes)
- Negative signals: Blocks, mutes, reports (strongly negative)
Video Quality View (VQV) Eligibility
The VQV weight only applies to videos longer than a minimum duration:home-mixer/scorers/weighted_scorer.rs
Score Normalization
After computing the weighted sum, the score is normalized using an offset function:home-mixer/scorers/weighted_scorer.rs
- Negative scores are scaled appropriately
- All scores are shifted to a consistent range
- Zero or near-zero scores don’t dominate rankings
Author Diversity Scorer
Purpose
Ensures the feed doesn’t show too many posts from the same author consecutively, even if that author’s content scores very high.Algorithm
- Sort all candidates by weighted score (descending)
- Track how many times each author has appeared
- Apply an exponential decay multiplier:
decay- Decay factor (typically 0.5-0.8)position- How many posts from this author have already been seen (0-indexed)floor- Minimum multiplier (prevents complete elimination)
Example
Ifdecay = 0.6 and floor = 0.2:
| Post from Author | Position | Multiplier | Effect |
|---|---|---|---|
| First post | 0 | 1.0 | Full score |
| Second post | 1 | 0.68 | 68% of score |
| Third post | 2 | 0.488 | 49% of score |
| Fourth post | 3 | 0.373 | 37% of score |
Implementation
home-mixer/scorers/author_diversity_scorer.rs
OON Scorer
Purpose
Adjusts scores for out-of-network content to balance in-network and out-of-network posts in the feed.Formula
OON_WEIGHT_FACTOR (typically 0.75-1.0) controls how much out-of-network content appears:
- < 1.0: Prioritizes in-network content
- = 1.0: No preference between in-network and out-of-network
- > 1.0: Prioritizes out-of-network content (discovery mode)
Implementation
home-mixer/scorers/oon_scorer.rs
Final Score Range
After all scorers apply, final scores typically range:- High relevance: 5.0 - 15.0
- Medium relevance: 1.0 - 5.0
- Low relevance: 0.1 - 1.0
- Very low/negative: < 0.1
Performance Optimization
Batch Inference
The Phoenix scorer batches all candidates into a single model inference request, reducing latency from O(n) to O(1) requests.Score Caching
Scores are cached with:prediction_request_id- Unique ID for this scoring requestlast_scored_at_ms- Timestamp for cache invalidation
Candidate Isolation
Because candidates cannot attend to each other in the transformer, scores are deterministic and independent of batch composition. This enables:- Parallel scoring of different candidate batches
- Score caching across requests
- A/B testing without score contamination
Related Pages
Phoenix Ranking
Deep dive into the Grok-based transformer architecture
Pipeline Stages
Overview of all pipeline stages
Filtering
Pre-scoring and post-selection filters
Phoenix Retrieval
Two-tower model for candidate sourcing