X For You Feed Algorithm
Practical marketer guide
X's open-source repo shows a two-stage system: retrieve candidate posts first, then rank and filter them using predicted engagement, user context, visibility checks, and diversity controls. This guide turns those mechanics into marketer actions.
Commit analyzed: 0bfc2795d308f90032544322747caacd535f75ae
Feed Journey Preview
- Post published
- Signals collected
- Quality scoring
- For You distribution
- Ongoing feedback
Content Snapshot
- Engagement
- Relevance
- Timeliness
- Authority
Executive Summary
What marketers should take from the code
Retrieval comes before ranking
You cannot be ranked if you never enter the candidate pool. Follower graph, user history, topics, and Phoenix retrieval all matter.
Predicted actions are combined
The weighted scorer combines predicted favorite, reply, repost, share, dwell, video, follow-author, and negative-feedback signals.
Meaningful engagement is safer
Replies, shares, dwell, follows, and profile clicks signal deeper fit than a low-effort like alone.
Niche consistency helps discovery
Consistent topic and audience patterns likely make it easier for retrieval and ranking models to find matching users.
System Overview
Plain-English architecture
The For You feed is an orchestration problem. Home Mixer assembles candidates, Thunder supplies recent in-network posts, Phoenix retrieves and ranks out-of-network posts, Grox supports content-understanding work, and filters remove posts that should not be shown.
For marketers, the key lesson is simple: distribution is not only "followers see post." The system mixes followed-account content with model-discovered content from a wider corpus, then filters and scores everything against the viewer.
Retrieval vs ranking
Retrieval narrows a very large post universe to candidates. Ranking predicts how a specific viewer may respond to those candidates and sorts them. Source: phoenix/README.md, phoenix/run_pipeline.py.
In-network vs out-of-network
In-network content comes from accounts the viewer follows, served by Thunder. Out-of-network content is discovered from a larger corpus through Phoenix retrieval. Source: README.md, thunder/, home-mixer/sources/phoenix_source.rs.
Ads blending
The repo includes an ads module for injection and spacing around organic content, including brand-safety context. Organic ranking advice should not be treated as paid delivery mechanics. Source: home-mixer/ads/.
Signal Map
Algorithm signals translated into marketer actions
Positive predicted actions
Favorite, reply, repost, quote, click, profile click, video quality view, share, share via DM, copy link, dwell, dwell time, and follow author appear in the weighted scorer.
Confirmed Source: home-mixer/scorers/weighted_scorer.rs
Negative predicted actions
Not interested, block author, mute author, and report appear in the weighted scorer and are treated as negative-feedback signals.
Confirmed Source: home-mixer/scorers/weighted_scorer.rs
Viewer context
Home Mixer hydrates followed users, topics, starter packs, muted and blocked users, mutual follows, impressions, served history, and action sequences.
Confirmed Source: home-mixer/query_hydrators/
Content context
Candidate hydrators include engagement counts, media, language, quote expansion, mutual follow scores, subscription state, visibility filtering, and video duration.
Confirmed Source: home-mixer/candidate_hydrators/
Action Library
Filter recommendations by workstream
Filtering and Eligibility
Ways content can lose eligibility before it competes
| Filter area | What it means | Marketing translation | Confidence |
|---|---|---|---|
| Duplicates and repost dedupe | Duplicate IDs and repeated reposted content can be removed. | Do not repeat the same post with minor wording changes. | Confirmed |
| Age and recency | Old posts can be filtered from candidate sets. | Plan around when your audience is active and respond while posts are fresh. | Confirmed |
| Muted keywords and authors | Viewer-level muted terms, mutes, and blocks can remove posts. | Avoid rage-bait that trains users to mute, block, or mark you down. | Confirmed |
| Visibility and safety | Visibility filtering can drop spam, policy, safety, or deleted content. | Brand-safe, non-spammy content has fewer eligibility risks. | Confirmed |
| Conversation deduplication | Multiple branches of the same conversation can be deduped. | Reply strategy should add new value, not flood a thread. | Strong inference |
30-Day Plan
A practical operating cadence
Clarify your audience and profile promise
Tighten bio, pinned post, recurring topics, and audience language. Publish 5-7 posts that test clear niche angles and track saves, replies, reposts, profile clicks, follows, and negative feedback.
Build repeatable post formats
Test explainers, checklists, teardown threads, short videos, and useful replies. Keep topic clusters consistent enough for audience matching while varying hooks and formats.
Strengthen engagement loops
Reply quickly to substantive comments, ask precise questions, quote-post with added analysis, and engage with adjacent accounts before publishing.
Measure and prune
Compare formats by useful engagement rate, profile-to-follow conversion, video completion quality, bookmarks where available, and negative signals. Double down on formats that produce discussion and follows, not only impressions.
Testing and Measurement
A practical measurement framework
| Metric | Why it matters | How to use it | Confidence |
|---|---|---|---|
| Replies with substance | Reply prediction is visible in weighted scoring. | Track replies that add examples, objections, or questions, not just reply count. | Confirmed |
| Reposts, quotes, shares | Repost, quote, share, DM share, and copy-link signals are visible. | Compare formats by how often people pass them to others. | Confirmed |
| Profile clicks and follows | Profile-click and follow-author scores are visible. | Measure whether posts convert attention into audience growth. | Confirmed |
| Dwell and video quality proxies | Dwell, dwell time, and video quality view are visible in scoring inputs. | Use thread completion, video retention, and thoughtful replies as practical proxies. | Strong inference |
| Negative feedback | Not interested, block, mute, and report are visible negative inputs. | Watch for unfollows, hostile non-target replies, declining repeat engagement, and any available hide/report indicators. | Confirmed |
Tagging schema
For every post, tag audience, topic pillar, format, hook type, media type, CTA, and publish window.
HypothesisWeekly template
Pick one variable, publish 5-10 tests, compare against your last 30-day median, then decide repeat, revise, or stop.
HypothesisAnalytics limit
X Analytics may not expose every model signal. Treat visible metrics as proxies, not the algorithm's raw inputs.
Strong inferenceAudience-Specific Notes
Apply the same mechanics differently
Creators
Turn recurring audience problems into recognizable series. Optimize for follows, profile clicks, replies, and shares.
HypothesisBrand accounts
Lead with usefulness before promotion. Avoid content that attracts broad negative feedback from people outside the target market.
Strong inferenceAgencies
Use teardown posts, client-safe examples, and proof-led threads to attract decision-makers and profile clicks.
HypothesisSmall businesses
Post practical product education, customer use cases, and local or niche-specific expertise rather than generic offers.
HypothesisB2B teams
Use narrow problem framing and buyer-language examples. Measure profile-to-follow and profile-to-site conversion.
HypothesisPaid and organic teams
Keep organic ranking lessons separate from paid delivery. Ads blending has its own module and brand-safety context.
ConfirmedPractical Examples
Before and after posts
Weak post
"Marketing is changing fast. Thoughts?"
Algorithm-aware post
"Most small brands treat X like a billboard. Better test: post one useful teardown daily for 14 days, then track replies, profile clicks, and follows per impression. Here are the 5 teardown angles I would use..."
Engagement bait
"Reply YES if you want the secret."
Useful conversation starter
"What is one acquisition channel that worked once but stopped compounding? I am collecting patterns for a teardown and will share the best fixes."
Link-only post
"New blog: example.com/post"
Value-first post
"We analyzed 47 onboarding flows. The biggest retention leak was not email timing. It was unclear first-session success. Three fixes, with examples, then the full post."
Poor video post
"New video is up."
Stronger video post
"A 42-second teardown of why this landing page loses buyers above the fold. Watch the headline, proof, and CTA order."
Myths and Cautions
What not to overclaim
"Likes are everything"
The code shows many predicted actions, including replies, reposts, shares, dwell, profile clicks, follows, and negative feedback.
"Posting more always helps"
More volume can create more chances, but repeated weak posts can train users to ignore, mute, or mark content as uninteresting.
"Hashtags alone boost reach"
The repo emphasizes user context, retrieval, ranking, filtering, and content understanding. Hashtags are not shown as a standalone reach guarantee.
"The algorithm is fully known"
The repo is useful but not a full real-time production disclosure. Models, weights, and policy systems can change.
"One viral post means optimization"
A single spike does not prove a profile has consistent audience fit or durable recommendation paths.
"Negative comments are always good"
Controversy may create replies, but not-interested, block, mute, and report signals can suppress distribution.
Interactive Checklists
Saved in this browser
Sources and Limits
Primary evidence
Primary repo inspected: github.com/xai-org/x-algorithm. Commit: 0bfc2795d308f90032544322747caacd535f75ae.
| Claim | Evidence path | Confidence |
|---|---|---|
| Home Mixer runs hydration, sources, filters, scorers, selection, post-selection filters, and side effects. | README.md, candidate-pipeline/, home-mixer/ | Confirmed |
| Phoenix uses retrieval then ranking. | phoenix/README.md, phoenix/run_pipeline.py | Confirmed |
| Weighted scoring includes favorite, reply, repost, click, profile click, VQV, share, copy-link share, dwell, quote, follow-author, and negative actions. | home-mixer/scorers/weighted_scorer.rs | Confirmed |
| Blocked/muted authors, muted keywords, visibility failures, prior seen/served posts, duplicates, old posts, subscriptions, and conversation duplicates can be filtered. | home-mixer/filters/ | Confirmed |
| User context includes follows, topics, action sequences, mutual follows, impressions, mutes, blocks, and served history. | home-mixer/query_hydrators/ | Confirmed |
| Profile, content, and community consistency should improve model-audience matching. | phoenix/README.md, grox/, home-mixer/query_hydrators/ | Hypothesis |
This is not a promise of reach or a complete disclosure of X production ranking. It is a practical interpretation of the open-source code and docs at the inspected commit.