The definitive guide to maximizing your reach on X (Twitter), based on reverse-engineering the open-source algorithm.
Frequently asked questions about the X algorithm, answered with code references.
A: Yes, partially. X released the recommendation algorithm code in April 2023. The core logic for scoring, filtering, and ranking is public. However, specific parameter values (weights, thresholds) are redacted for security.
Source: github.com/twitter/the-algorithm
A: The open-sourced version is a snapshot. X continues to iterate internally. The fundamental mechanics (scoring, filtering, Two-Tower retrieval) are likely stable, but specific weights and parameters change.
A: Based on the public code, there’s no explicit “premium boost.” However, premium features (longer posts, edit button) may indirectly help engagement. The algorithm focuses on engagement signals, not subscription status.
A: Based on code analysis, Reply has the highest positive weight (~2× other actions), followed by Quote Tweet and Follow.
Source: weighted_scorer.rs
A: Very bad. Block appears to have approximately -10× the weight of a like. One block can undo the positive signal from 10 likes.
Source: weighted_scorer.rs - BLOCK_AUTHOR_WEIGHT
A: Views/impressions are not directly weighted. What matters is engagement (actions taken). However, dwell time (how long someone looks at your post) IS tracked and weighted.
A: The algorithm looks up the original tweet ID for retweets when scoring. Your retweet’s score is influenced by the original content’s predicted engagement.
Source: phoenix_scorer.rs
A: Possible causes:
A: Through the Two-Tower retrieval system (Phoenix). Your content embedding is matched with user embeddings via similarity search. Being consistent in your niche creates a cleaner embedding that matches better.
Source: phoenix/recsys_retrieval_model.py
A: Yes. The Age Filter removes posts older than a threshold. Posts need early engagement to be distributed widely. Posting when your audience is online is crucial.
Source: age_filter.rs
A: Not directly mentioned in scoring code. Hashtags may help with:
Use relevant hashtags sparingly.
A: Threads have advantages:
Source: Author diversity logic in author_diversity_scorer.rs
A: Video has a dedicated score (Video Quality View), but ONLY if the video exceeds a minimum duration threshold. Short clips don’t get this bonus.
Source: weighted_scorer.rs - VQV_WEIGHT, MIN_VIDEO_DURATION_MS
A: Photo Expand is tracked as a positive action, but it’s low-weight. Images help more by:
A: The code doesn’t show explicit link penalties. However:
A: A key ML architecture decision. When the transformer scores candidates, each post can only “see” the user context—not other candidate posts. This ensures your score doesn’t depend on what other posts are in the batch.
Source: phoenix/grok.py - make_recsys_attn_mask()
A: A retrieval system with two neural networks:
Source: phoenix/recsys_retrieval_model.py
A: When multiple posts from the same author appear:
Post 1: 100% score
Post 2: ~76% score
Post 3: ~59% score
...converges to ~20% floor
Formula: multiplier = (1 - floor) × decay^position + floor
Source: author_diversity_scorer.rs
A: Out-of-network (OON) content (from accounts you don’t follow) is multiplied by OON_WEIGHT_FACTOR (less than 1.0). This gives in-network content an advantage.
Source: oon_scorer.rs
Fact: Author diversity penalty means your 2nd, 3rd posts get progressively lower scores. Quality > quantity.
Fact: Replies have ~2× the weight of likes in the scoring formula.
Fact: It’s a deterministic ML system based on predicted engagement. Understanding it helps.
Fact: Followers who don’t engage provide no positive signals. Low engagement rate may hurt your distribution.
Fact: The algorithm is forward-looking. Consistent high-quality content will improve your signals over time.
Open an issue on this repo with the question label.
| Back to: Rules | Checklists |