← Knowledge Notes
Global Growth / Knowledge note · English

Reverse-Engineering Creator Strategies from X's Recommendation Algorithm Source Code (Lao Zhang)

Lao Zhang of Ai Xuexi, 2026-05-16, single long-form deep dive. X platform For You recommendation system open-source update on May 15 (Phoenix / Grox / Hydrators / Ads Blender) → 7 actionable checklist items for creators. Answers "Why does my title look punchy but my traffic is terrible", "What scores exactly does the recommendation system assign", and "How many content goals should image-and-text creators break their work into". Technical teardown perspective, adding the 6th perspective beyond the 5 author perspectives in wiki-ai-self-media-engineering.

Source collection:Other Product, Design and Learning Materials · Published here:2026-09-26 · Note updated:2026-05-18

X PlatformRecommendation AlgorithmsCreator growth

When to open this:You write image-and-text content (WeChat Official Accounts / X / Xiaohongshu / Zhihu) and feel "my title is already punchy but the traffic just won't go viral", or you want to know what scores the recommendation system is actually assigning, and why "high click-through rate does not guarantee high distribution". This wiki takes a technical teardown perspective — translating the open-source code of X platform's For You recommendation system into levers that creators can actually act on.

One-sentence core:"The algorithm is not mysterious; what is mysterious is that many people have never seriously examined their own content from the recommendation system's point of view." The recommendation system is not looking for the title with the highest click-through rate; instead, it is predicting a set of user behaviors after they see this piece of content. What you optimize is not the title, but the "signal quality" across the entire recommendation pipeline.

0. Why this deserves a standalone wiki entry

wiki-ai-self-media-engineering has already compiled self-media methodologies from 5 authors (Lao D / Wang Kai / Huang Yihe / Xiaohongshu vibecoding / Yuzijiang), all complete operating systems. Lao Zhang's piece cuts in from another dimension:reverse-engineering creator actions from platform algorithm source code.

Perspective Representative author Focus
Domestic ordinary-person monetization dontbesilent (Lao D) Douyin 2 million views SOP
Overseas matrix going global wangkai (Wang Kai) 6-platform infrastructure
Non-technical independent products newtype (Huang Yihe) Global merchant route
Democratization of aesthetic creation Xiaohongshu vibecoding Aesthetic philosophy
AI comic drama agency team system yuzijiang (Yuzijiang) Hongguo Theater revenue sharing
Reverse-engineering from platform algorithm source code Lao Zhang of Ai Xuexi de Lao Zhang Recommendation system skeleton + actionable levers for creators

Unique value of the 6th perspective:Other people's methodologies tell you "what actions to take"; Lao Zhang tells you "why this action is rewarded by the algorithm".

1. For You is not one model, it is a production line

X splits the recommendation system into 6 components, and every piece of content must pass through these 6 stages in sequence. Missing any stage means it will not go viral.

graph LR
  CS["Candidate Sources<br/>候选源"] --> Phoenix
  Phoenix["Phoenix Retrieval<br/>召回"] --> Ranking["Phoenix Ranking<br/>排序"]
  Ranking --> Grox["Grox<br/>内容理解"]
  Grox --> Hydrator["Hydrators<br/>上下文补充"]
  Hydrator --> Ads["Ads Blender<br/>广告混排 + Brand Safety"]
  Ads --> Feed["For You Feed<br/>用户看到"]
  classDef sys fill:#e3f2fd,stroke:#1976d2
  classDef out fill:#e8f5e9,stroke:#43a047
  class CS,Phoenix,Ranking,Grox,Hydrator,Ads sys
  class Feed out

Why this skeleton matters for creators:Most people only have two levers in mind: "clickbait + post more". In reality, the recommendation system has 6 independent scoring stages,and each stage has different actionable levers. If you cannot pass Phoenix retrieval, no matter how strong the downstream ranking is, you have no chance — this is the root cause of "it looks like I wrote really hard but the traffic is terrible".

2. What the 6 components are each judging (reverse-engineered from source code)

2.1 Candidate Sources — There are more content entry points than you think

Newly added/updated sources this time: Phoenix Source / Phoenix Topics / Phoenix MoE / Thunder / Ads / Who To Follow / Prompts / Cached Posts.

Implications for creators:

  • Phoenix Topics:Topic entry points are becoming more important — your account must let the system know "which topic it belongs to"
  • Who To Follow:It is not just posts that get recommended;the account itself also gets recommended based on content performance — long-term stable output in a certain field makes the system's profile clearer
  • Counterexample: writing about AI today, emotions tomorrow, travel the day after, investment chicken soup the day after that — individual posts may occasionally go viral, but the system cannot build a stable account profile

2.2 Phoenix Retrieval — The two-tower model determines "which interest cluster your post belongs to"

  • User tower: encodes user features + behavior history into a user embedding
  • Candidate tower: encodes content into a candidate embedding
  • Finds top-K candidates via dot-product similarity

Translated into creator language:Every article you write is competing to become a candidate near a certain type of user embedding.

4 symptoms of failing retrieval(self-check before writing):

  • Which interest cluster does this post belong to? (If you can't say → you won't get retrieval)
  • Is it consistent with my account's historical content?
  • Can it be assigned to a clear topic?
  • Is it semantically close to content readers have liked/replied to/spent time on in the past?

2.3 Phoenix Ranking — It calculates a set of behaviors, not just a single like

home-mixer/scorers/ranking_scorer.rs the final score in it is a weighted combination of multiple actions, not just looking at likes.

12 types of user behavior all enter the scoring function(among which negative signals also carry weight):

  • Positive: open / dwell time / like / reply / retweet / quote / visit author profile / follow / share
  • Negative: not interested / mute / block / report

Break creator goals into 7 categories(directly corresponding to recommendation system scoring dimensions):

Creation goal Algorithm-side action Content design point
Reading goal Increase CTR Title + cover image combination
Dwell time goal Increase dwell time Information density of the main text, not word count
Comment goal Increase reply rate Clear viewpoint + debatable boundary + reader-immersive scenario
Retweet goal Increase retweet rate Words that "help readers express themselves"
Bookmark goal Increase bookmark rate Checklists / methods / frameworks / cases
Follow goal Increase follow rate Ending promise that "I will continue to output this kind of value"
Risk control Reduce "not interested" Do not make readers feel deceived / offended / that their time was wasted

Counterintuitive point:Clickbait makes CTR high but dwell time + bookmark collapse at the same time → the composite score is actually low, and accumulated "not interested" marks reduce account reputation. This is why "the title is punchy but traffic does not take off".

2.4 Grox — Content understanding task system

The newly added Grox grox/ is not simple sensitive word filtering, but a set of content understanding task system. From the code naming we can reverse-engineer what the platform cares about:

  • banger_initial_screen.py → initial screening quality score
  • spam.py → spam identification
  • safety_ptos.py → policy and safety classification
  • reply_ranking.py → reply quality score
  • multimodal_post_embedder_v5.py → Text + images embedded together
  • PlanMaster → execute multiple content understanding plans in parallel then merge them

BangerInitialScreenResult The parsed fields indicate the platform looks at 7 dimensions structurally:

  • Is the content quality sufficient
  • What is the topic classification
  • Are the tags clear
  • Do images and text match
  • Is there low-quality AI flavor
  • Is there a safety risk
  • Is there risk related to minors

For creators:Image-and-text content will be understood at a finer granularity — "low-quality AI flavor" is scored separately(the slop_score field), which is a direct warning to everyone who uses AI to assist writing.

2.5 Hydrators — The system aggressively supplements context

The recommendation system never only looks at the body text of a single post; it pieces together two sets of context from the user side + the content side both the user side and the content side.

Query Hydrator (user side) Candidate Hydrator (content side)
User behavior sequence Engagement counts
Followed users Author information
Blocks and mutes Language
Followed topics Whether there is media
starter packs Video duration
IP Quoted post expansion
mutual follow Brand safety score
served history mutual follow jaccard
impression bloom filter Topic filtering results

Two practical conclusions:

  1. Account positioning is very important — author history / follows / follower structure all participate in context
  2. Single-post metadata is also very important — whether the language is clear / whether media is relevant / whether quotes have context / whether the topic can be correctly identified

Mental model:You think you are just writing an article, but in reality you are feeding the system a set of understandable signals.

2.6 Ads Blender — Brand Safety affects distribution space

home-mixer/ads/The newly added ad blending logic:

  • safe_gap_blender.rs finds safe gaps so ads do not sit next to risky content
  • partition_organic_blender.rs separates content with risk signals from ad positions
  • brand_safety.rs has Safe / LowRisk / MediumRisk verdict

Although this is part of the ad system, the reminder for creators:The platform does not only judge whether content is viewable, it also judges what commercial environment it is suitable to appear in.

Long-term reliance on borderline content / shock / hatred / conspiracy theories / exaggerated titles / spam marketing to get engagement → short-term buzz, long-term loss of recommendation credit. Safety and trustworthiness are themselves content assets.

3. 3 counterintuitive points (most easily overlooked by creators)

3.1 Candidate Isolation — Stop thinking "I got suppressed by the big account next door"

The Phoenix ranking model has an engineering constraint called Candidate Isolation candidate isolation: during transformer inference, candidate content cannot attend to each other, and can only attend to the user and history, while self-attending.

In plain language:The score of each candidate piece of content should not randomly change because other content that enters the batch with it is different.

Implication for creators:Stop attributing results to "my post got suppressed by the big account next door". The more fundamental problem is — within the same user history context,whether the predicted behaviors for your piece of content itself are strong enough. The platform of course does diversity, author decay, and deduplication, but the base score of a single piece of content must rely on itself.

3.2 The cover image is not decoration, it is an algorithm entry point

MultimodalPostEmbedderV5 renders posts into text + images and sends them together into embedding.

The cover image must bear at least 3 tasks:

  1. Help the system understand the topic (affects candidate embedding classification)
  2. Help users judge whether it is worth clicking (affects CTR)
  3. Help build credibility for the main text (affects dwell time)

Example:Writing "X recommendation algorithm update interpretation"

  • With a photo of Musk → high emotion, but low information density
  • With a flowchart of "retrieval → ranking → content understanding → negative feedback" → high information density

Upgrade direction:It is not about finding a good-looking picture, but making a picture that can carry the content structure. For technical articles, make more structure diagrams / flowcharts / comparison charts — readers can understand at a glance, and the model can also understand more easily.

3.3 Confused content = the recommendation system also does not understand it

What the recommendation system fears most is not ordinary content,but content that does not know where it belongs.

Counterexample (from Lao Zhang's original text): title says "Ordinary people must seize this trend", the first half of the body talks about AI, the second half talks about the workplace, the accompanying picture is a landscape photo, the tag is entrepreneurship — users do not understand it, the system also does not understand it → retrieval fails.

4. 7-item checklist for creators (check against it before writing every post)

Directly corresponds to the recommendation system's 6 components + 1 negative control:

# Check item Which score on the algorithm side it hits
1 Retrieval clarity — title/body/cover image/tags/account positioning are consistent Phoenix Retrieval embedding classification
2 First-screen attractiveness — the title quickly explains "why it is worth clicking in", the cover image is a structure diagram/comparison chart/checklist chart/case chart, not a vibe picture CTR + multimodal embedder
3 Dwell value — the body text has information density; you cannot make big promises in the title but have all nonsense in the body dwell time
4 Engagement trigger — clear viewpoint + debatable boundary + scenario readers can put themselves into reply / engagement
5 Reasons to retweet and bookmark — methodologies/checklists/flowcharts/case libraries/pitfall-avoidance guides are naturally easy to bookmark; content that helps readers express opinions is naturally easy to retweet bookmark / retweet
6 Follow conversion — the ending lets readers know "follow me and you will continue to get this kind of value in the future" follow rate
7 Negative feedback control — do not make readers regret clicking in: clickbait / exaggeration / low-quality AI flavor / repetitive filler / controversy baiting "Not interested" + brand safety

5. Cross-perspective comparison: differences & consensus with the 5 authors

Dimension Lao Zhang (algorithm source code reverse-engineering) Lao D (domestic ordinary person) Wang Kai (overseas matrix) Huang Yihe (independent products)
Methodology starting point Source code → levers Cases → imitation SOP → matrix Tools → products
Cover image Structure diagrams carrying the content skeleton High-emotion cover images Platform-native style Product screenshots
Title Clear retrieval signals > clickbait Hook upfront Platform localization Merchant language
Scale Deep cultivation on a single platform Douyin 2 million 6-platform matrix Global merchant
Consensus (across 5+1 authors) AI writing + human planning/on-camera presence is the only consensus

When to take Lao Zhang as the main path:You want to understand why your content traffic is not taking off(diagnose problems) and are willing to make structural upgrades(not remedial actions) — then start from the skeleton. If you are still at the "just starting to create content" stage, first follow Lao D's or Wang Kai's SOP to get the process working end-to-end, then use Lao Zhang's perspective for refinement later.

6. Boundaries and Non-Applicability

  • Non-applicable platforms: The specific details in this article describe X's implementation (Phoenix / Grox / Hydrators / Ads Blender naming). When abstracting and migrating to other platforms only migrate the 6-component skeleton + 7-item checklist, do not copy specific technical names such as "two-tower" verbatim
  • Cannot explain short-term trending topics: The recommendation system follows steady-state distribution logic; marketing accounts "riding sudden trending topics for traffic" operate under a different set of logic (trending search mechanism + timeliness weighting), which this article does not cover
  • Cannot replace hands-on practice: This wiki is a diagnostic framework, not an execution manual — knowing that "recall cannot pass" ≠ knowing "how I should revise this specific post". The latter requires combining the content aesthetics of the specific platform (see xhs-vibecoding-aesthetic.md / dontbesilent-ai-self-media.md)

7. Sources & Extensions

Sources and related materials