{
  "schemaVersion": "1.0.0",
  "meta": {
    "id": "x-for-you-fad2f71",
    "title": "The Mechanic: X For You source corpus",
    "platform": "X",
    "repository": "xai-org/x-algorithm",
    "commit": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
    "commitDate": "2026-09-16T01:11:22Z",
    "corpusVersion": "2026-09-15.1",
    "retrievedAt": "2026-09-15T18:19:06-07:00",
    "scope": "A hand-curated, frozen reading of the public For You request path: candidate sourcing, eligibility, multi-action scoring, selected score adjustments, semantic reranking, selection, visibility filtering, and served-history recording.",
    "caveats": [
      "This corpus proves what the named public files contain at one commit. It does not prove what X deployed for every viewer, geography, client, or experiment bucket.",
      "The repository says notable experiments should be visible and checked-in defaults should mirror primary production values, but it also says many values come from configuration. A checked-in default is not a runtime observation.",
      "Some Grox prompts, some Botmaker rules, deployment infrastructure, production data, telemetry, and service dependencies are absent. Model predictions cannot be reconstructed from the excerpts alone.",
      "The current X Help page still links the historical twitter/the-algorithm repository. xai-org/x-algorithm is a newer official public repository that self-describes as the X For You core; that provenance mismatch is unresolved here.",
      "Hypotheses are proposed tests derived from mechanisms. None is a claim of measured lift or confirmed production behavior."
    ],
    "baselineNote": "The baseline is an authored, competent surface-growth comparator. It is not a sample of practitioners and cannot establish that mechanism discovery outperforms people."
  },
  "sources": [
    {
      "id": "src-overview",
      "title": "For You overview and candidate sources",
      "sourceType": "repository-documentation",
      "path": "README.md",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/README.md#L58-L69",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "## Overview\n\nThe For You feed is assembled per request. Posts come from two places:\n\n1. **In-Network** — [`thunder/`](thunder/) keeps recent posts from the accounts a viewer follows in memory\n2. **Out-of-Network** — [`phoenix/`](phoenix/) retrieval and [`simclusters/`](simclusters/) find posts from accounts the viewer does not follow\n\nBoth are ranked together by the same model. **Phoenix** reads the viewer's recent engagement history and predicts, for each post, how likely the viewer is to take each action on it. Those predictions are combined into one score using weights held in the code — see [Scoring and Ranking](#scoring-and-ranking).\n\nTwo pipelines do the work. The **Post Pipeline** finds, ranks and filters posts. The **Blending Pipeline** wraps it and adds what the model does not rank: ads, Who to Follow recommendations, prompts.\n\nRanking sets the order. Whether a post can be shown at all is decided separately, by [`visibility-filtering/`](visibility-filtering/), from the viewer's own actions such as blocks and mutes and from labels that other systems here attach to posts and accounts.",
      "lineStart": 58,
      "lineEnd": 69,
      "sha256": "203d9b6ee7495c7160cb59185125d3aaaa6b3bd75ecb4e48b3af6a5c4c8938e5",
      "provenance": "Verbatim excerpt from the first-party repository README at the frozen commit.",
      "caveats": [
        "Architecture description, not a runtime trace."
      ]
    },
    {
      "id": "src-request-pipeline",
      "title": "Post pipeline stages",
      "sourceType": "repository-documentation",
      "path": "README.md",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/README.md#L90-L155",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "│  ┌────────────────────────────────────────────────────────────────────────────────────┐  │\n│  │ 1. <a href=\"home-mixer/query_hydrators/\">QUERY HYDRATION</a>                                                                 │  │\n│  │    user action sequence — the viewer's recent engagements, and the                 │  │\n│  │    main input to the model · following list · blocks and mutes · muted             │  │\n│  │    keywords · posts already seen and served · followed topics, etc.                │  │\n│  └────────────────────────────────────────────────────────────────────────────────────┘  │\n│                                            ▼                                             │\n│  ┌────────────────────────────────────────────────────────────────────────────────────┐  │\n│  │ 2. <a href=\"home-mixer/sources/\">CANDIDATE SOURCES</a> — queried in parallel                                         │  │\n│  │    ┌───────────────────────────────┐ ┌────────────────────────────────────────┐    │  │\n│  │    │ IN-NETWORK                    │ │ OUT-OF-NETWORK                         │    │  │\n│  │    │ <a href=\"thunder/\">Thunder</a>                       │ │ <a href=\"phoenix/\">Phoenix retrieval</a>   retrieval model    │    │  │\n│  │    │   recent posts from the       │ │ <a href=\"simclusters/\">SimClusters</a>         cluster similarity │    │  │\n│  │    │   accounts the viewer follows │ │                                        │    │  │\n│  │    └───────────────────────────────┘ └────────────────────────────────────────┘    │  │\n│  └────────────────────────────────────────────────────────────────────────────────────┘  │\n│                                            ▼                                             │\n│  ┌────────────────────────────────────────────────────────────────────────────────────┐  │\n│  │ 3. <a href=\"home-mixer/candidate_hydrators/\">CANDIDATE HYDRATION</a>                                                             │  │\n│  │    post text and media · author details and account labels · quoted post ·         │  │\n│  │    language · engagement counts · subscription status, etc.                        │  │\n│  └────────────────────────────────────────────────────────────────────────────────────┘  │\n│                                            ▼                                             │\n│  ┌────────────────────────────────────────────────────────────────────────────────────┐  │\n│  │ 4. <a href=\"home-mixer/filters/\">PRE-SCORING FILTERS</a>                                                             │  │\n│  │    duplicates across sources · older than 48 hours · the viewer's own              │  │\n│  │    posts · blocked and muted accounts · muted keywords · already seen              │  │\n│  │    or served · subscriber-only posts the viewer cannot access, etc.                │  │\n│  └────────────────────────────────────────────────────────────────────────────────────┘  │\n│                                            ▼                                             │\n│  ┌────────────────────────────────────────────────────────────────────────────────────┐  │\n│  │ 5. SCORING                                                                         │  │\n│  │    <a href=\"home-mixer/scorers/phoenix_scorer.rs\">PhoenixScorer</a>   a probability for each action the viewer might take             │  │\n│  │    <a href=\"home-mixer/scorers/ranking_scorer.rs\">RankingScorer</a>   weighted sum, then repeated-author decay, an                    │  │\n│  │                    out-of-network discount, a new-author boost                     │  │\n│  │    <a href=\"home-mixer/scorers/vm_ranker.rs\">VMRanker</a>        calls the reranking service in <a href=\"vm-ranker/\">vm-ranker/</a>                       │  │\n│  └────────────────────────────────────────────────────────────────────────────────────┘  │\n│                                            ▼                                             │\n│  ┌────────────────────────────────────────────────────────────────────────────────────┐  │\n│  │ 6. SELECTION — <a href=\"home-mixer/selectors/top_k_score_selector.rs\">TopKScoreSelector</a>                                                   │  │\n│  │    sort by final score, keep the top K                                             │  │\n│  └────────────────────────────────────────────────────────────────────────────────────┘  │\n│                                            ▼                                             │\n│  ┌────────────────────────────────────────────────────────────────────────────────────┐  │\n│  │ 7. <a href=\"home-mixer/filters/\">POST-SELECTION FILTERS</a> — after the order is fixed                               │  │\n│  │    <a href=\"home-mixer/candidate_hydrators/vf_candidate_hydrator.rs\">VFCandidateHydrator</a>  asks <a href=\"visibility-filtering/\">visibility-filtering/</a> per post and viewer             │  │\n│  │    <a href=\"home-mixer/filters/vf_filter.rs\">VFFilter</a>             removes the posts it said to drop                          │  │\n│  │    <a href=\"home-mixer/filters/dedup_conversation_filter.rs\">DedupConversationFilter</a>  collapses branches of one conversation                 │  │\n│  │                         ◄── these labels come from the Labeling Path               │  │\n│  └────────────────────────────────────────────────────────────────────────────────────┘  │\n│                                                                                          │\n├─────────────────────  BLENDING PIPELINE   <a href=\"home-mixer/candidate_pipeline/for_you_candidate_pipeline.rs\">ForYouCandidatePipeline</a>  ──────────────────────┤\n│                                                                                          │\n│  ┌────────────────────────────────────────────────────────────────────────────────────┐  │\n│  │ the ranked posts are one source here; the others add non-post items:               │  │\n│  │    ads · Who to Follow · prompts · push-to-home, etc.                              │  │\n│  │                                                                                    │  │\n│  │ <a href=\"home-mixer/selectors/blender_selector.rs\">BlenderSelector</a> interleaves them. The default <a href=\"home-mixer/ads/partition_organic_blender.rs\">ads blender</a> reorders                 │  │\n│  │ posts for ad adjacency. Who to Follow and prompts go at fixed positions.           │  │\n│  └────────────────────────────────────────────────────────────────────────────────────┘  │\n│                                            ▼                                             │\n│  ┌────────────────────────────────────────────────────────────────────────────────────┐  │\n│  │ <a href=\"home-mixer/side_effects/\">SIDE EFFECTS</a> — after the response is sent                                          │  │\n│  │    record which posts were served · refresh the post cache · log ad                │  │\n│  │    and client events, etc.                                                         │  │\n│  └────────────────────────────────────────────────────────────────────────────────────┘  │",
      "lineStart": 90,
      "lineEnd": 155,
      "sha256": "203d9b6ee7495c7160cb59185125d3aaaa6b3bd75ecb4e48b3af6a5c4c8938e5",
      "provenance": "First-party repository README at the frozen commit.",
      "caveats": [
        "The diagram is maintained documentation and may omit internal stages."
      ]
    },
    {
      "id": "src-ranking-actions",
      "title": "Multi-action score composition",
      "sourceType": "repository-documentation",
      "path": "README.md",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/README.md#L323-L351",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "### Scoring and Ranking\n\nPhoenix predicts a probability for each action:\n\n```\nEngagement    favorite · reply · repost · quote · share · share via DM · share via copy link\nClicks        post · profile · link · photo expand · video open · quoted post\nAttention     video quality view · dwell · dwell time · click dwell time · active seconds\nAuthor        follow author\nNegative      not interested · mute author · block author · report · not dwelled\n```\n\n`RankingScorer` combines them:\n\n```\nFinal Score = Σ (weight_i × P(action_i))\n```\n\nPositive actions carry positive weights, negative actions negative ones. The weights are in [`home-mixer/params/param.rs`](home-mixer/params/param.rs); the arithmetic is in [`home-mixer/scorers/ranking_scorer.rs`](home-mixer/scorers/ranking_scorer.rs).\n\nThere is a common misconception to be aware of about the weights: they scale the predicted probabilities (or predicted continuous values, e.g. dwell time) — they do *not* scale the raw engagement counts, so e.g. it'd be incorrect to see that a report has 468 times higher weight than a like and conclude that e.g. \"1 report cancels out 468 likes\". The weights are a multiple on your own predicted probability of Liking, Reporting, etc, which is substantially driven by your own behavior.\n\nThree adjustments follow:\n\n- **Author Diversity**: each post after an author's first is multiplied by a decaying factor, down to a floor.\n- **Out-of-Network Discount**: posts from accounts the viewer does not follow are multiplied by a factor below 1, as are replies and reposts from accounts the viewer does follow.\n- **New-Author Boost**: posts from authors whose impressions are below a threshold are lifted toward a target position.\n\n`VMRanker` then calls [`vm-ranker/`](vm-ranker/), a separate service that reorders the result.",
      "lineStart": 323,
      "lineEnd": 351,
      "sha256": "203d9b6ee7495c7160cb59185125d3aaaa6b3bd75ecb4e48b3af6a5c4c8938e5",
      "provenance": "First-party repository README at the frozen commit.",
      "caveats": [
        "The action weights apply to predictions or continuous values, not raw action counts."
      ]
    },
    {
      "id": "src-weight-defaults",
      "title": "Checked-in ranking weights and interpretation warning",
      "sourceType": "source-code",
      "path": "home-mixer/params/param.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/params/param.rs#L291-L388",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "// These weights reflect a combination of how much an action is\n// valued in ranking and typical propensities of these actions\n// across the X network (e.g. negative feedback is overall rare).\n\n// Each weight multiplies the *predicted* probability of that\n// action (P(favorite), P(repost), …) or a continuous value e.g.\n// watch time -- the weights do not multiply raw engagement counts.\n// One common misinterpretation is that you can read these weight\n// ratios as count equivalences, e.g. the incorrect statement that\n// \"one report cancels 468 likes\" -- this is incorrect because the\n// weights apply to the predicted probabilities rather than raw counts.\n\n// And the baseline probability of a Report is more than 1000x lower\n// than a Like, so it’s weighted more to allow the prediction to affect\n// the final ranking at all.\n\n// Related to the above is a misunderstanding that bad actors engaging\n// in mass blocking/reporting will significantly suppress reach. There\n// are multiple things inhibiting this:\n// 1. It’s predicting your likelihood of the action, not summing up\n// raw weights on counts. Also, recommendations are personalized, so\n// reports from bad actors will primarily affect recommendations for\n// users who are similar to the bad actors, rather than having the same\n// effect on the post's ranking to everyone.\n// 2. For an account to count in the algorithms recommendation system,\n// it must take place on a post served in Home Timeline. Directly\n// navigating to a post (i.e., coordinating via groupchat) has no\n// ranking impact. And users cannot manufacture a post to show up in\n// their Timeline in any consistently reproducible way.\nparam!(FavoriteWeight, f64, \"rust_home_mixer_favorite_weight\", 0.5);\nparam!(ReplyWeight, f64, \"rust_home_mixer_reply_weight\", 5.0);\nparam!(\n    BidirectionalFollowReplyWeightBoost,\n    f64,\n    \"rust_home_mixer_bidirectional_follow_reply_weight_boost\",\n    15.0\n);\nparam!(\n    BidirectionalFollowDwellWeightBoost,\n    f64,\n    \"rust_home_mixer_bidirectional_follow_dwell_weight_boost\",\n    0.0\n);\nparam!(RetweetWeight, f64, \"rust_home_mixer_retweet_weight\", 1.0);\nparam!(\n    PhotoExpandWeight,\n    f64,\n    \"rust_home_mixer_photo_expand_weight\",\n    0.05\n);\nparam!(\n    VideoOpenWeight,\n    f64,\n    \"rust_home_mixer_video_open_weight\",\n    0.07\n);\nparam!(ClickWeight, f64, \"rust_home_mixer_click_weight\", 0.4);\nparam!(OpenLinkWeight, f64, \"rust_home_mixer_open_link_weight\", 0.2);\nparam!(\n    ProfileClickWeight,\n    f64,\n    \"rust_home_mixer_profile_click_weight\",\n    0.0\n);\nparam!(VqvWeight, f64, \"rust_home_mixer_vqv_weight\", 0.0);\nparam!(ShareWeight, f64, \"rust_home_mixer_share_weight\", 2.0);\nparam!(\n    ShareViaDmWeight,\n    f64,\n    \"rust_home_mixer_share_via_dm_weight\",\n    5.0\n);\nparam!(\n    ShareViaCopyLinkWeight,\n    f64,\n    \"rust_home_mixer_share_via_copy_link_weight\",\n    20.0\n);\nparam!(DwellWeight, f64, \"rust_home_mixer_dwell_weight\", 0.05);\nparam!(QuoteWeight, f64, \"rust_home_mixer_quote_weight\", 5.0);\nparam!(\n    QuotedClickWeight,\n    f64,\n    \"rust_home_mixer_quoted_click_weight\",\n    0.05\n);\nparam!(\n    QuotedVqvWeight,\n    f64,\n    \"rust_home_mixer_quoted_vqv_weight\",\n    0.0\n);\nparam!(\n    FollowAuthorWeight,\n    f64,\n    \"rust_home_mixer_follow_author_weight\",\n    4.0\n);",
      "lineStart": 291,
      "lineEnd": 388,
      "sha256": "baa02bf4e0bcf4534022880080adbe3aacfda69353959141fdaefef4e26dac22",
      "provenance": "First-party Rust configuration source at the frozen commit.",
      "caveats": [
        "Defaults can be overridden by feature-switch configuration and experiments.",
        "Weight ratios are not engagement-count equivalences."
      ]
    },
    {
      "id": "src-weighted-score",
      "title": "RankingScorer weighted terms",
      "sourceType": "source-code",
      "path": "home-mixer/scorers/ranking_scorer.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/scorers/ranking_scorer.rs#L429-L533",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "    fn apply(score: Option<f64>, weight: f64) -> f64 {\n        score.unwrap_or(0.0) * weight\n    }\n\n    pub(crate) fn compute_weighted_score(\n        weights: &ScoringWeights,\n        query: &ScoredPostsQuery,\n        candidate: &PostCandidate,\n    ) -> f64 {\n        let (pos, neg) = Self::compute_weighted_parts(weights, query, candidate);\n        Self::offset_score(pos - neg, weights)\n    }\n\n    pub(crate) fn compute_weighted_parts(\n        weights: &ScoringWeights,\n        query: &ScoredPostsQuery,\n        candidate: &PostCandidate,\n    ) -> (f64, f64) {\n        let scores: &PhoenixScores = &candidate.phoenix_scores;\n\n        let vqv_weight = crate::util::candidates_util::vqv_weight(\n            query,\n            candidate,\n            weights.min_video_duration_ms,\n            weights.vqv,\n        );\n\n        let quoted_vqv_weight = crate::util::candidates_util::quoted_vqv_weight(\n            candidate,\n            weights.min_video_duration_ms,\n            weights.quoted_vqv,\n            weights.enable_quoted_vqv_duration_check,\n        );\n\n        let post_unexplored_active = weights.post_unexplored_active_for(candidate);\n\n        let base_dwell_time_term = Self::apply(scores.dwell_time, weights.cont_dwell_time);\n        let dwell_time_term = match scores.post_unexplored_score {\n            Some(post_unexplored)\n                if weights.enable_multiplicative_post_unexplored && post_unexplored_active =>\n            {\n                base_dwell_time_term\n                    * (1.0 + post_unexplored * weights.multiplicative_post_unexplored_alpha)\n            }\n            _ => base_dwell_time_term,\n        };\n\n        let post_unexplored_term = if post_unexplored_active {\n            Self::apply(scores.post_unexplored_score, weights.post_unexplored)\n        } else {\n            0.0\n        };\n\n        let terms = [\n            Self::apply(scores.favorite_score, weights.favorite),\n            Self::apply(scores.reply_score, weights.reply_weight_for(candidate)),\n            Self::apply(scores.retweet_score, weights.retweet),\n            Self::apply(scores.photo_expand_score, weights.photo_expand),\n            Self::apply(scores.video_open_score, weights.video_open),\n            Self::apply(scores.click_score, weights.click),\n            Self::apply(scores.open_link_score, weights.open_link),\n            Self::apply(scores.profile_click_score, weights.profile_click),\n            Self::apply(scores.vqv_score, vqv_weight),\n            Self::apply(scores.share_score, weights.share),\n            Self::apply(scores.share_via_dm_score, weights.share_via_dm),\n            Self::apply(\n                scores.share_via_copy_link_score,\n                weights.share_via_copy_link,\n            ),\n            Self::apply(scores.dwell_score, weights.dwell_weight_for(candidate)),\n            Self::apply(scores.quote_score, weights.quote),\n            Self::apply(scores.quoted_click_score, weights.quoted_click),\n            Self::apply(scores.quoted_vqv_score, quoted_vqv_weight),\n            dwell_time_term,\n            Self::apply(\n                weights.low_fav_penalized_click_dwell(scores),\n                weights.cont_click_dwell_time,\n            ),\n            Self::apply(\n                scores.active_secs_5m_residual_norm,\n                weights.cont_active_secs_5m_residual_norm,\n            ),\n            Self::apply(scores.follow_author_score, weights.follow_author),\n            Self::apply(scores.not_interested_score, weights.not_interested),\n            Self::apply(scores.block_author_score, weights.block_author),\n            Self::apply(scores.mute_author_score, weights.mute_author),\n            Self::apply(scores.report_score, weights.report),\n            Self::apply(scores.not_dwelled_score, weights.not_dwelled),\n            if weights.enable_multiplicative_post_unexplored {\n                0.0\n            } else {\n                post_unexplored_term\n            },\n        ];\n\n        let mut pos = 0.0;\n        let mut neg = 0.0;\n        for t in terms {\n            if t >= 0.0 {\n                pos += t;\n            } else {\n                neg -= t;\n            }\n        }\n        (pos, neg)",
      "lineStart": 429,
      "lineEnd": 533,
      "sha256": "c1d3a38a944ab130ff2d4064c60ac82bc089e8f176f05be7d5d4cf28afd8666e",
      "provenance": "First-party Rust scoring source at the frozen commit.",
      "caveats": [
        "The public code does not reveal the prediction produced for a particular viewer-post pair."
      ]
    },
    {
      "id": "src-mutual-boost",
      "title": "Mutual-follow original-post reply boost",
      "sourceType": "source-code",
      "path": "home-mixer/scorers/ranking_scorer.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/scorers/ranking_scorer.rs#L239-L257",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "impl ScoringWeights {\n    fn post_unexplored_active_for(&self, candidate: &PostCandidate) -> bool {\n        !self.post_unexplored_in_network_only || candidate.in_network == Some(true)\n    }\n\n    fn bidirectional_boost_eligible(candidate: &PostCandidate) -> bool {\n        candidate.in_reply_to_tweet_id.is_none()\n            && candidate.retweeted_tweet_id.is_none()\n            && candidate.is_mutual_follow_author == Some(true)\n    }\n\n    fn reply_weight_for(&self, candidate: &PostCandidate) -> f64 {\n        if self.bidirectional_follow_reply_weight_boost != 0.0\n            && Self::bidirectional_boost_eligible(candidate)\n        {\n            return self.reply + self.bidirectional_follow_reply_weight_boost;\n        }\n        self.reply\n    }",
      "lineStart": 239,
      "lineEnd": 257,
      "sha256": "c1d3a38a944ab130ff2d4064c60ac82bc089e8f176f05be7d5d4cf28afd8666e",
      "provenance": "First-party Rust scoring source at the frozen commit.",
      "caveats": [
        "Eligibility does not guarantee a favorable prediction or feed placement."
      ]
    },
    {
      "id": "src-author-diversity",
      "title": "Repeated-author score multiplier",
      "sourceType": "source-code",
      "path": "home-mixer/scorers/ranking_scorer.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/scorers/ranking_scorer.rs#L625-L677",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "    fn diversity_multiplier(decay_factor: f64, floor: f64, exponent: f64) -> f64 {\n        (1.0 - floor) * decay_factor.powf(exponent) + floor\n    }\n\n    fn author_pool_counts(candidates: &[PostCandidate], pre_diversity_scores: &[f64]) -> Vec<u32> {\n        let mut indexed: Vec<(usize, f64)> = pre_diversity_scores\n            .iter()\n            .enumerate()\n            .map(|(i, &s)| (i, s))\n            .collect();\n        indexed.sort_by(|(_, a), (_, b)| b.partial_cmp(a).unwrap_or(Ordering::Equal));\n\n        let mut counts = vec![0u32; candidates.len()];\n        let mut author_counts: FxHashMap<u64, u32> = FxHashMap::default();\n        for (idx, _) in indexed {\n            let author_id = candidates[idx].author_id;\n            let k = author_counts.get(&author_id).copied().unwrap_or(0);\n            counts[idx] = k;\n            author_counts.insert(author_id, k + 1);\n        }\n        counts\n    }\n\n    fn served_slate_contexts(candidates: &[PostCandidate]) -> Option<Vec<SlateContext>> {\n        candidates.iter().map(|c| c.served_slate_context).collect()\n    }\n\n    fn stored_slate_contexts(candidates: &[PostCandidate]) -> Option<Vec<SlateContext>> {\n        candidates.iter().map(|c| c.slate_context).collect()\n    }\n\n    fn author_diversity_multipliers(query: &ScoredPostsQuery, counts: &[u32]) -> Vec<f64> {\n        let decay_factor = query.params.get(AuthorDiversityDecay);\n        let floor = query.params.get(AuthorDiversityFloor);\n\n        counts\n            .iter()\n            .map(|&k| Self::diversity_multiplier(decay_factor, floor, f64::from(k)))\n            .collect()\n    }\n\n    fn apply_author_diversity(\n        query: &ScoredPostsQuery,\n        candidates: &[PostCandidate],\n        pre_diversity_scores: &[f64],\n    ) -> Vec<f64> {\n        let counts = Self::author_pool_counts(candidates, pre_diversity_scores);\n        let multipliers = Self::author_diversity_multipliers(query, &counts);\n        pre_diversity_scores\n            .iter()\n            .zip(multipliers)\n            .map(|(&score, multiplier)| score * multiplier)\n            .collect()",
      "lineStart": 625,
      "lineEnd": 677,
      "sha256": "c1d3a38a944ab130ff2d4064c60ac82bc089e8f176f05be7d5d4cf28afd8666e",
      "provenance": "First-party Rust scoring source at the frozen commit; defaults are in the separately cited parameter file.",
      "caveats": [
        "This operates on candidates in one viewer request. Posting close together only increases the chance of overlap; it does not prove overlap."
      ]
    },
    {
      "id": "src-network-adjustment",
      "title": "Out-of-network score adjustment",
      "sourceType": "source-code",
      "path": "home-mixer/scorers/ranking_scorer.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/scorers/ranking_scorer.rs#L680-L699",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "    fn effective_oon_weight(query: &ScoredPostsQuery) -> f64 {\n        if !query.topic_ids.is_empty() {\n            return query.params.get(TopicOonWeightFactor);\n        }\n\n        let oon_weight_factor = query.params.get(OonWeightFactor);\n\n        let new_user_age_threshold = Duration::from_secs(query.params.get(NewUserAgeThresholdSecs));\n\n        let is_eligible_new_user = duration_since_creation_opt(query.user_id)\n            .map(|age| age < new_user_age_threshold)\n            .unwrap_or(false)\n            && query.user_features.followed_user_ids.len() >= NEW_USER_MIN_FOLLOWING;\n\n        if is_eligible_new_user {\n            NEW_USER_OON_WEIGHT_FACTOR\n        } else {\n            oon_weight_factor\n        }\n    }",
      "lineStart": 680,
      "lineEnd": 699,
      "sha256": "c1d3a38a944ab130ff2d4064c60ac82bc089e8f176f05be7d5d4cf28afd8666e",
      "provenance": "First-party Rust scoring source at the frozen commit; numeric defaults are in the parameter file.",
      "caveats": [
        "A score adjustment is conditional on candidate sourcing and other filters."
      ]
    },
    {
      "id": "src-value-model-mode",
      "title": "Default value-model mode",
      "sourceType": "source-code",
      "path": "home-mixer/params/param.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/params/param.rs#L488-L493",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "param!(\n    ValueModelMode,\n    String,\n    \"rust_home_mixer_value_model_mode\",\n    \"weighted\"\n);",
      "lineStart": 488,
      "lineEnd": 493,
      "sha256": "baa02bf4e0bcf4534022880080adbe3aacfda69353959141fdaefef4e26dac22",
      "provenance": "First-party Rust configuration source at the frozen commit.",
      "caveats": [
        "The checked-in default is weighted; feature switches and gated alternative modes can change the scoring path."
      ]
    },
    {
      "id": "src-ranking-adjustment-flow",
      "title": "Scoring-mode gates and adjustment flow",
      "sourceType": "source-code",
      "path": "home-mixer/scorers/ranking_scorer.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/scorers/ranking_scorer.rs#L708-L833",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "    async fn score(\n        &self,\n        query: &ScoredPostsQuery,\n        candidates: &[PostCandidate],\n    ) -> Vec<Result<PostCandidate, String>> {\n        let weights = ScoringWeights::from_params(&query.params).perturbed(query);\n        let enable_author_diversity = query.params.get(EnableAuthorDiversity);\n\n        let use_dwell_regret = match query.params.get(ValueModelMode).as_str() {\n            DWELL_REGRET_SIGMOID_MODE => true,\n            GATED_DWELL_REGRET_MODE => GateModel::from_params(&query.params)\n                .is_some_and(|gate| gate.serve_new_scoring(query)),\n            _ => false,\n        };\n        let weighted_parts: Vec<(f64, f64)> = if use_dwell_regret {\n            Vec::new()\n        } else {\n            candidates\n                .iter()\n                .map(|c| Self::compute_weighted_parts(&weights, query, c))\n                .collect()\n        };\n        let weighted_scores: Vec<f64> = if use_dwell_regret {\n            let dr_weights = DwellRegretWeights::from_params(&query.params);\n            Self::compute_dwell_regret_base_scores(&dr_weights, candidates)\n        } else {\n            weighted_parts\n                .iter()\n                .map(|&(pos, neg)| Self::offset_score(pos - neg, &weights))\n                .collect()\n        };\n\n        let effective_oon = Self::effective_oon_weight(query);\n        let deboost_in_network_replies_retweets = query\n            .params\n            .get(EnableOonRescoreForInNetworkRepliesRetweets);\n        let oon_applies = |c: &PostCandidate| match c.in_network {\n            Some(false) => true,\n            Some(true) => {\n                deboost_in_network_replies_retweets\n                    && (c.in_reply_to_tweet_id.is_some() || c.retweeted_tweet_id.is_some())\n            }\n            None => false,\n        };\n\n        let persisted_contexts: Option<Vec<SlateContext>> = Self::served_slate_contexts(candidates)\n            .or_else(|| {\n                query\n                    .has_cached_posts\n                    .then(|| Self::stored_slate_contexts(candidates))\n                    .flatten()\n            });\n\n        if !use_dwell_regret && query.params.get(MultiplierPreOffset) {\n            let diversity_multipliers: Vec<f64> = if enable_author_diversity {\n                let counts = Self::author_pool_counts(candidates, &weighted_scores);\n                Self::author_diversity_multipliers(query, &counts)\n            } else {\n                vec![1.0; candidates.len()]\n            };\n            let scores: Vec<f64> = weighted_parts\n                .iter()\n                .enumerate()\n                .map(|(i, &(pos, neg))| {\n                    let mut m = diversity_multipliers[i];\n                    if oon_applies(&candidates[i]) {\n                        m *= effective_oon;\n                    }\n                    let net = pos - neg;\n                    let scaled = if net >= 0.0 { m * net } else { net };\n                    Self::offset_score(scaled, &weights)\n                })\n                .collect();\n            let final_scores = self.author_cold_start.apply(query, candidates, &scores);\n            return weighted_scores\n                .iter()\n                .zip(final_scores)\n                .enumerate()\n                .map(|(i, (&weighted, score))| {\n                    Ok(PostCandidate {\n                        weighted_score: Some(weighted),\n                        score: Some(score),\n                        slate_context: persisted_contexts.as_ref().map(|contexts| contexts[i]),\n                        ..Default::default()\n                    })\n                })\n                .collect();\n        }\n\n        let adjusted_scores = self\n            .author_cold_start\n            .apply(query, candidates, &weighted_scores);\n\n        let diversity_adjusted = if enable_author_diversity {\n            Self::apply_author_diversity(query, candidates, &adjusted_scores)\n        } else {\n            adjusted_scores.clone()\n        };\n\n        let final_scores: Vec<f64> = candidates\n            .iter()\n            .enumerate()\n            .map(|(i, c)| {\n                let after_diversity = diversity_adjusted[i];\n                if oon_applies(c) {\n                    after_diversity * effective_oon\n                } else {\n                    after_diversity\n                }\n            })\n            .collect();\n\n        weighted_scores\n            .iter()\n            .zip(final_scores)\n            .enumerate()\n            .map(|(i, (&weighted, score))| {\n                Ok(PostCandidate {\n                    weighted_score: Some(weighted),\n                    score: Some(score),\n                    slate_context: persisted_contexts.as_ref().map(|contexts| contexts[i]),\n                    ..Default::default()\n                })\n            })\n            .collect()\n    }",
      "lineStart": 708,
      "lineEnd": 833,
      "sha256": "c1d3a38a944ab130ff2d4064c60ac82bc089e8f176f05be7d5d4cf28afd8666e",
      "provenance": "First-party Rust scoring source at the frozen commit.",
      "caveats": [
        "The default path applies cold-start exploration, author diversity, then the network factor; an alternate pre-offset path changes the order."
      ]
    },
    {
      "id": "src-filter-order",
      "title": "Pre-score filter installation order",
      "sourceType": "source-code",
      "path": "home-mixer/candidate_pipeline/phoenix_candidate_pipeline.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/candidate_pipeline/phoenix_candidate_pipeline.rs#L355-L383",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "        let filters: Vec<Box<dyn Filter<ScoredPostsQuery, PostCandidate>>> = vec![\n            Box::new(DropDuplicatesFilter),\n            Box::new(CoreDataHydrationFilter),\n            Box::new(AgeFilter::new(Duration::from_secs(params::MAX_POST_AGE))),\n            Box::new(SelfTweetFilter),\n            Box::new(OONRetweetReplyFilter),\n            Box::new(OONNsfwSimclustersFilter),\n            Box::new(RetweetDeduplicationFilter),\n            Box::new(IneligibleSubscriptionFilter),\n            Box::new(PreviouslySeenPostsFilter),\n            Box::new(PreviouslySeenPostsBackupFilter),\n            Box::new(PreviouslyServedPostsFilter),\n            Box::new(ViewerMutedKeywordFilter::new()),\n            Box::new(AuthorSocialgraphFilter),\n            // Brazil 2026 election filter\n\n            // Application providers that use a recommendation system for users must exclude from the\n            // results the channels and profiles reported to the Electoral Court under the terms of\n            // § 1º of this article and, except in cases of paid boosting, the content posted on them.\n\n            // https://dadosabertos.tse.jus.br/dataset/candidatos-2026\n\n            // OmarAzizSenador deleted his account at the time this code was written.\n            Box::new(Brazil2026ElectionFilter),\n            Box::new(VideoFilter),\n            Box::new(TopicIdsFilter),\n            Box::new(NewUserMinEngagementFilter),\n            Box::new(InventoryHoldoutFilter),\n        ];",
      "lineStart": 355,
      "lineEnd": 383,
      "sha256": "6443a46ea824d00d08c3f12963fe20212a3a29b60fd7ccb830f1579949afd22d",
      "provenance": "First-party Rust pipeline source at the frozen commit.",
      "caveats": [
        "Installed order does not show per-request filter results."
      ]
    },
    {
      "id": "src-age-limit",
      "title": "Forty-eight-hour age eligibility",
      "sourceType": "source-code",
      "path": "home-mixer/params/config.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/params/config.rs#L16-L39",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "pub const MAX_GRPC_MESSAGE_SIZE: usize = 128 * 1024 * 1024;\npub const TOP_K_CANDIDATES_TO_SELECT: usize = 50;\npub const RESULT_SIZE: usize = 35;\npub const FEED_MODULE_SLOTS: usize = 4;\npub const MAX_JETFUEL_FRAMES_PER_RESPONSE: usize = 8;\npub const FOR_YOU_MAX_RESULT_SIZE: usize =\n    RESULT_SIZE + FEED_MODULE_SLOTS + MAX_JETFUEL_FRAMES_PER_RESPONSE;\npub const RANKED_FOLLOWING_MAX_RESULT_SIZE: usize = 38;\npub const FOLLOWING_MAX_RESULT_SIZE: usize = 110;\npub const FOLLOWING_ADS_TOP_K: usize = 9;\npub const FOLLOWING_POST_FETCH_SIZE: usize = FOLLOWING_MAX_RESULT_SIZE - FOLLOWING_ADS_TOP_K;\npub const FOLLOWING_PIPELINE_RESULT_SIZE: usize = FOLLOWING_MAX_RESULT_SIZE + 2;\n\npub const WHO_TO_FOLLOW_POSITION: usize = 6;\npub const FOLLOWING_WHO_TO_FOLLOW_MIN_POSTS: usize = 10;\npub const PROMPTS_POSITION: i32 = 0;\npub const FEED_SURVEY_POSITION: usize = 12;\n\npub const UAS_WINDOW_TIME_MS: i64 = 300_000;\n\npub const MAX_POST_AGE: u64 = 48 * 60 * 60;\n\npub const NEW_USER_OON_WEIGHT_FACTOR: f64 = 0.00001;\npub const NEW_USER_MIN_FOLLOWING: usize = 5;",
      "lineStart": 16,
      "lineEnd": 39,
      "sha256": "8e603c15d103635aba7e3ca6b94b5dd6ca03497b653d59c668eb67e693c15908",
      "provenance": "First-party Rust configuration source at the frozen commit; filter wiring and implementation are preserved as companion files.",
      "caveats": [
        "This is the examined For You candidate pipeline, not every X surface or every possible reappearance mechanism."
      ]
    },
    {
      "id": "src-oon-reply-filter",
      "title": "Out-of-network reply and repost eligibility",
      "sourceType": "source-code",
      "path": "home-mixer/filters/oon_retweet_reply_filter.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/filters/oon_retweet_reply_filter.rs#L5-L21",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "pub struct OONRetweetReplyFilter;\n\nimpl Filter<ScoredPostsQuery, PostCandidate> for OONRetweetReplyFilter {\n    fn filter(\n        &self,\n        _query: &ScoredPostsQuery,\n        candidates: Vec<PostCandidate>,\n    ) -> FilterResult<PostCandidate> {\n        let (removed, kept): (Vec<_>, Vec<_>) = candidates.into_iter().partition(|c| {\n            let is_reply = c.in_reply_to_tweet_id.is_some();\n            let is_retweet = c.retweeted_tweet_id.is_some();\n            (c.in_network == Some(false) && (is_retweet || is_reply))\n                || (is_reply && c.ancestors.is_empty())\n        });\n\n        FilterResult { kept, removed }\n    }",
      "lineStart": 5,
      "lineEnd": 21,
      "sha256": "4260fcf0e1478cf3b856a35cf222a524c717faff79eb52e8f7caf884674a866d",
      "provenance": "First-party Rust filter source at the frozen commit.",
      "caveats": [
        "This says nothing about Following, profile, search, notifications, or direct-link distribution."
      ]
    },
    {
      "id": "src-cold-start-params",
      "title": "New-author exploration defaults",
      "sourceType": "source-code",
      "path": "home-mixer/params/param.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/params/param.rs#L653-L712",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "    VMRankerDppTheta,\n    f64,\n    \"rust_home_mixer_vm_ranker_dpp_theta\",\n    0.65\n);\nparam!(\n    VMRankerDppMaxSelectedRank,\n    u32,\n    \"rust_home_mixer_vm_ranker_dpp_max_selected_rank\",\n    150\n);\nparam!(\n    ColdStartImpressionThreshold,\n    u32,\n    \"rust_home_mixer_cold_start_impression_threshold\",\n    1000\n);\nparam!(\n    ColdStartSlotMin,\n    u32,\n    \"rust_home_mixer_cold_start_slot_min\",\n    15\n);\nparam!(\n    ColdStartSlotMax,\n    u32,\n    \"rust_home_mixer_cold_start_slot_max\",\n    16\n);\nparam!(\n    ColdStartFollowerCap,\n    i64,\n    \"rust_home_mixer_cold_start_follower_cap\",\n    1000\n);\nparam!(\n    ColdStartMaxPostAgeSecs,\n    u64,\n    \"rust_home_mixer_cold_start_max_post_age_secs\",\n    86400\n);\n\nparam!(\n    LowImpressionsMaxPositionRatio,\n    f64,\n    \"rust_home_mixer_low_impressions_max_boost_position_ratio\",\n    0.85\n);\n\nparam!(\n    EnableViewerColdStart,\n    bool,\n    \"rust_home_mixer_enable_viewer_cold_start_boost\",\n    true\n);\nparam!(\n    EnableColdStartThompsonSampling,\n    bool,\n    \"rust_home_mixer_enable_cold_start_thompson_sampling\",\n    false",
      "lineStart": 653,
      "lineEnd": 712,
      "sha256": "baa02bf4e0bcf4534022880080adbe3aacfda69353959141fdaefef4e26dac22",
      "provenance": "First-party Rust configuration source at the frozen commit.",
      "caveats": [
        "Several gates depend on experiment arm and author corpus; the threshold names are more reliable than any assumed viewer experience."
      ]
    },
    {
      "id": "src-cold-start-rule",
      "title": "New-author exploration eligibility and score lift",
      "sourceType": "source-code",
      "path": "home-mixer/scorers/author_cold_start.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/scorers/author_cold_start.rs#L290-L337",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "fn apply_cold_start(\n    params: &ColdStartParams,\n    candidates: &[PostCandidate],\n    scores: &[f64],\n    corpus: &[AuthorCorpus],\n    target: f64,\n) -> Vec<f64> {\n    let arm = params.arm;\n    let (positions, nonzero) = positions_among_nonzero(scores);\n    let max_cold_start_slot = (params.max_position_ratio * nonzero as f64) as usize;\n\n    let eligible: Vec<usize> = candidates\n        .iter()\n        .enumerate()\n        .filter(|(i, c)| {\n            cold_start_base_eligible(c, params.follower_cap)\n                && cold_start_corpus_eligible(arm, c, corpus[*i])\n                && cold_start_freshness_eligible(arm, c, params.max_post_age)\n                && positions[*i] < max_cold_start_slot\n                && c.view_count_on_home\n                    .is_some_and(|imp| imp < params.impression_threshold)\n        })\n        .map(|(i, _)| i)\n        .collect();\n\n    let best_idx = if params.use_thompson_sampling {\n        pick_thompson(\n            &eligible,\n            candidates,\n            scores,\n            params.beta_alpha0,\n            params.beta_beta0,\n            params.impression_scale,\n            params.ts_top_k,\n            &mut rand::rng(),\n        )\n    } else {\n        pick_by_score(&eligible, scores)\n    };\n\n    let Some(best_idx) = best_idx else {\n        return scores.to_vec();\n    };\n\n    let mut effective = scores.to_vec();\n    effective[best_idx] = effective[best_idx].max(target);\n    record_cold_started_posts(is_phoenix_moe(&candidates[best_idx]), arm.as_str(), 1);\n    effective",
      "lineStart": 290,
      "lineEnd": 337,
      "sha256": "ad0dc6f90e5162d674258e2839cb1ce6c971c58637e2c0ca04f3aa8dc39ae036",
      "provenance": "First-party Rust scoring source at the frozen commit.",
      "caveats": [
        "Base eligibility also requires an original post and follower count at or below the cap; experiment arm changes details."
      ]
    },
    {
      "id": "src-vm-params",
      "title": "VMRanker defaults",
      "sourceType": "source-code",
      "path": "home-mixer/params/param.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/params/param.rs#L628-L663",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "param!(\n    EnableVMRanker,\n    bool,\n    \"rust_home_mixer_enable_vm_ranker\",\n    true\n);\nparam!(\n    VMRankerEnableFallback,\n    bool,\n    \"rust_home_mixer_vm_ranker_enable_fallback\",\n    false\n);\nparam!(\n    VMRankerClusterId,\n    String,\n    \"rust_home_mixer_vm_ranker_cluster_id\",\n    \"Experiment3\"\n);\nparam!(\n    PhoenixExperimentOverrides,\n    String,\n    \"rust_home_mixer_phoenix_experiment_overrides\",\n    \"\"\n);\nparam!(\n    VMRankerDppTheta,\n    f64,\n    \"rust_home_mixer_vm_ranker_dpp_theta\",\n    0.65\n);\nparam!(\n    VMRankerDppMaxSelectedRank,\n    u32,\n    \"rust_home_mixer_vm_ranker_dpp_max_selected_rank\",\n    150\n);",
      "lineStart": 628,
      "lineEnd": 663,
      "sha256": "baa02bf4e0bcf4534022880080adbe3aacfda69353959141fdaefef4e26dac22",
      "provenance": "First-party Rust configuration source at the frozen commit.",
      "caveats": [
        "Feature switches and experiments can override these values."
      ]
    },
    {
      "id": "src-vm-dpp",
      "title": "Semantic diversity reranking",
      "sourceType": "source-code",
      "path": "vm-ranker/dpp.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/vm-ranker/dpp.rs#L35-L170",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "pub fn rescore(\n    inputs: &[DppInput],\n    seed: Option<&DppInput>,\n    config: &DppConfig,\n    _viewer_id: u64,\n) -> Vec<DppResult> {\n    let n = inputs.len();\n    if n == 0 {\n        return Vec::new();\n    }\n\n    let mut sorted: Vec<usize> = (0..n).collect();\n    sorted.sort_unstable_by(|&a, &b| {\n        inputs[b]\n            .score\n            .partial_cmp(&inputs[a].score)\n            .unwrap_or(std::cmp::Ordering::Equal)\n    });\n\n    let top_count = config.max_selected_rank.min(n);\n    let top_indices: &[usize] = &sorted[..top_count];\n    let m: usize = top_count;\n\n    DPP_POOL_SIZE\n        .with_label_values(&[&config.max_selected_rank.to_string()])\n        .observe(m as f64);\n\n    let miss_count = top_indices\n        .iter()\n        .filter(|&&i| inputs[i].embedding_missing)\n        .count();\n    DPP_EMBEDDING_MISS_RATIO\n        .with_label_values(&[&m.to_string()])\n        .observe(miss_count as f64 / m as f64);\n\n    {\n        let top_score = inputs[top_indices[0]].score;\n        let bot_score = inputs[top_indices[m - 1]].score;\n        let med_score = inputs[top_indices[m / 2]].score;\n        DPP_POOL_SCORES\n            .with_label_values(&[\"max\"])\n            .observe(top_score);\n        DPP_POOL_SCORES\n            .with_label_values(&[\"min\"])\n            .observe(bot_score);\n        DPP_POOL_SCORES\n            .with_label_values(&[\"median\"])\n            .observe(med_score);\n        let safe_max = top_score.max(EPSILON);\n        DPP_POOL_SCORES\n            .with_label_values(&[\"q_min\"])\n            .observe(bot_score / safe_max);\n        DPP_POOL_SCORES\n            .with_label_values(&[\"q_median\"])\n            .observe(med_score / safe_max);\n    }\n\n    let max_score = inputs[top_indices[0]].score.max(EPSILON);\n\n    let theta = config.theta.clamp(0.0, 1.0 - EPSILON);\n    let alpha = theta / (2.0 * (1.0 - theta));\n\n    let total = m + usize::from(seed.is_some());\n    let item_at = |ki: usize| -> &DppInput {\n        if ki < m {\n            &inputs[top_indices[ki]]\n        } else {\n            seed.expect(\"index m only exists when seed is present\")\n        }\n    };\n\n    let qf: Vec<f64> = (0..total)\n        .map(|ki| {\n            let q = if ki < m {\n                item_at(ki).score / max_score\n            } else {\n                1.0\n            };\n            (alpha * q).exp()\n        })\n        .collect();\n\n    let norms: Vec<f64> = (0..total).map(|ki| item_at(ki).norm).collect();\n\n    let mut kernel = vec![0.0f64; total * total];\n    for i in 0..total {\n        kernel[i * total + i] = qf[i] * qf[i];\n        for j in (i + 1)..total {\n            let denom = norms[i] * norms[j];\n            let cos = if denom > EPSILON {\n                dot_product(&item_at(i).embedding, &item_at(j).embedding) / denom\n            } else {\n                0.0\n            };\n            let val = qf[i] * qf[j] * cos;\n            kernel[i * total + j] = val;\n            kernel[j * total + i] = val;\n        }\n    }\n\n    let pinned = seed.map(|_| m);\n    let dpp_result = greedy_dpp(&kernel, total, config.top_k, pinned);\n    let selected: Vec<(usize, f64)> = dpp_result\n        .selected\n        .iter()\n        .copied()\n        .filter(|&(ki, _)| ki < m)\n        .collect();\n    let selected = &selected;\n\n    let reason = if dpp_result.rank_exhausted {\n        \"rank_exhausted\"\n    } else {\n        \"top_k_reached\"\n    };\n    DPP_TERMINAL_CV\n        .with_label_values(&[reason])\n        .observe(dpp_result.terminal_cv);\n\n    let mut dpp_selected: Vec<usize> = selected.iter().map(|&(ki, _)| top_indices[ki]).collect();\n    dpp_selected.sort_unstable_by(|&a, &b| {\n        inputs[b]\n            .score\n            .partial_cmp(&inputs[a].score)\n            .unwrap_or(std::cmp::Ordering::Equal)\n    });\n\n    let results: Vec<DppResult> = dpp_selected\n        .iter()\n        .map(|&orig_idx| {\n            let score = inputs[orig_idx].score;\n            DppResult {\n                id: inputs[orig_idx].id,\n                score,\n            }\n        })",
      "lineStart": 35,
      "lineEnd": 170,
      "sha256": "a91d5d977d195391543b67e3a7cda2b4925a4cf05d2d3a555878fa903bf933a9",
      "provenance": "First-party Rust reranking source at the frozen commit.",
      "caveats": [
        "An author cannot observe the candidate set, its embeddings, or nearby competing posts."
      ]
    },
    {
      "id": "src-top-k",
      "title": "Top-K score selection",
      "sourceType": "source-code",
      "path": "home-mixer/selectors/top_k_score_selector.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/selectors/top_k_score_selector.rs#L6-L14",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "pub struct TopKScoreSelector;\n\nimpl Selector<ScoredPostsQuery, PostCandidate> for TopKScoreSelector {\n    fn score(&self, candidate: &PostCandidate) -> f64 {\n        candidate.score.unwrap_or(f64::NEG_INFINITY)\n    }\n    fn size(&self) -> Option<usize> {\n        Some(params::TOP_K_CANDIDATES_TO_SELECT)\n    }",
      "lineStart": 6,
      "lineEnd": 14,
      "sha256": "f263471272ea8ab27cf75825c9c62360b746a3eb7f8956cdf1977cf665d9ab2d",
      "provenance": "First-party Rust selector source at the frozen commit.",
      "caveats": [
        "Later post-selection visibility filters can still remove selected candidates."
      ]
    },
    {
      "id": "src-configuration-caveat",
      "title": "Experiments, configuration, and source omissions",
      "sourceType": "repository-documentation",
      "path": "README.md",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/README.md#L400-L432",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "## Experiments and Configuration\n\nAs we work to improve the algorithm we regularly run experiments on a small percentage of timeline traffic. Our aim is for experiments running at a notable share of traffic — e.g. 10% or more — to be visible in this repository.\n\nTo enable experimentation, many tunable values are read from a configuration system rather than written into the code. To help people understand the production defaults, we run cron scripts that set the defaults in this repository's code to be the primary production values, for example in [`home-mixer/params/param.rs`](home-mixer/params/param.rs).\n\n[`docs/BIDIRECTIONAL_BOOST_CHANGE.md`](docs/BIDIRECTIONAL_BOOST_CHANGE.md) follows a widely-discussed timeline change, exemplifying what you would see as a param value changes over time.\n\n---\n\n\n\n## What's not in this repo?\n\nWe believe transparency is important for trust, and our aim is for the public to be able to understand how posts are distributed on X, so they can audit, critique or even help improve the system.\n\nOne challenge with making code that impacts post distribution public is that people could use it to try to game the system. To reduce the risk of this, there are a limited set of files not currently published in the repository, e.g.:\n\n- Grox prompts. E.g. the j2 files with the specific LLM prompts used in Grox.\n- Some botmaker rules\n\nHowever, we still want the public to have insight into these systems. To accomplish that, we're piloting a new [transparency tool](#under-the-hood-label-transparency-tool) that will show people the visibility-impacting labels that have been applied to their account and posts. This approach has multiple benefits:\n\n- one can see the outcomes of these systems (and whether they affect their own account)\n- one can see whether labels have been manually applied outside of automated systems\n- one can match any labels present on their account to the code to understand if or how the visibility of their posts is affected, and critique it if desired\n\nWe believe the combination of code + transparent outputs is a powerful one for public transparency, and welcome feedback.\n\n\n### Deployment-related code\n\nThe focus of the repository is transparency into the code that affects post visibility in the For You timeline. All of the code here is inspectable, and some of the code is even designed to be runnable end-to-end — e.g. training and running the Phoenix scoring model. Where code is meant to be built and run, the relevant manifests are in the repo, e.g. [`phoenix/`](phoenix/) ships a Cargo workspace, a `pyproject.toml`, a [quickstart](phoenix/QUICKSTART.md) and synthetic data generation, so a small model can be trained and served end-to-end. Elsewhere, code may not necessarily include build- or deployment-related files or generally self-explanatory infrastructure imports (e.g. `xai_service_runner` or `xai_kafka`). If there's anything not here that you believe would help your understanding of the algorithm, please let us know.",
      "lineStart": 400,
      "lineEnd": 432,
      "sha256": "203d9b6ee7495c7160cb59185125d3aaaa6b3bd75ecb4e48b3af6a5c4c8938e5",
      "provenance": "First-party repository README at the frozen commit.",
      "caveats": [
        "This is the repository maintainer's scope statement; it does not independently audit completeness."
      ]
    },
    {
      "id": "src-served-history",
      "title": "Selected feed items recorded to served history",
      "sourceType": "source-code",
      "path": "home-mixer/side_effects/update_served_history_side_effect.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/side_effects/update_served_history_side_effect.rs#L31-L77",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "#[async_trait]\nimpl SideEffect<ScoredPostsQuery, FeedItem> for UpdateServedHistorySideEffect {\n    fn enable(&self, query: Arc<ScoredPostsQuery>) -> bool {\n        is_prod() && query.params.get(EnableUrtMigrationComponents)\n    }\n\n    async fn side_effect(\n        &self,\n        input: Arc<SideEffectInput<ScoredPostsQuery, FeedItem>>,\n    ) -> Result<(), String> {\n        let items = &input.selected_candidates;\n        if items.is_empty() {\n            return Ok(());\n        }\n\n        let query = &input.query;\n        let now_ms = query.request_time_ms;\n\n        let entries: Vec<EntryWithItemIds> = items\n            .iter()\n            .enumerate()\n            .flat_map(|(position, item)| build_entries(item, position as i64))\n            .collect();\n\n        if entries.is_empty() {\n            return Ok(());\n        }\n\n        let history = ServedHistory {\n            request_type: request_type(query),\n            entries,\n            served_id: Some(query.request_id as i64),\n            served_time_ms: None,\n        };\n\n        let platform = app_id_to_served_history_id(query.client_app_id);\n        self.client\n            .put(\n                query.user_id,\n                TimelineType::for_request(query.request_type),\n                platform,\n                now_ms,\n                &history,\n            )\n            .await\n            .map_err(|e| e.to_string())\n    }",
      "lineStart": 31,
      "lineEnd": 77,
      "sha256": "75bb09a8ceadfc0241f5af42badefb771b9149b23469ebcf25a6d3ad31fa5281",
      "provenance": "First-party Rust side-effect source at the frozen commit.",
      "caveats": [
        "This records serving, not post-engagement feedback or a guaranteed expansion loop."
      ]
    },
    {
      "id": "src-author-diversity-defaults",
      "title": "Author-diversity enable, decay, and floor defaults",
      "sourceType": "source-code",
      "path": "home-mixer/params/param.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/params/param.rs#L233-L252",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "param!(EnableRanking, bool, \"rust_home_mixer_enable_ranking\", true);\nparam!(\n    EnableAuthorDiversity,\n    bool,\n    \"rust_home_mixer_enable_author_diversity\",\n    true\n);\nparam!(\n    AuthorDiversityDecay,\n    f64,\n    \"rust_home_mixer_author_diversity_decay\",\n    0.5\n);\nparam!(\n    AuthorDiversityFloor,\n    f64,\n    \"rust_home_mixer_author_diversity_floor\",\n    0.25\n);\nparam!(",
      "lineStart": 233,
      "lineEnd": 252,
      "sha256": "baa02bf4e0bcf4534022880080adbe3aacfda69353959141fdaefef4e26dac22",
      "provenance": "First-party Rust configuration source at the frozen commit.",
      "caveats": [
        "Checked-in defaults can be overridden by configuration. The formula orders same-author posts by their pre-diversity score, not publication time."
      ]
    },
    {
      "id": "src-score-offset",
      "title": "Positive-score offset constant",
      "sourceType": "source-code",
      "path": "home-mixer/params/config.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/params/config.rs#L40",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "pub const NEGATIVE_SCORES_OFFSET: f64 = 0.001;",
      "lineStart": 40,
      "lineEnd": 40,
      "sha256": "8e603c15d103635aba7e3ca6b94b5dd6ca03497b653d59c668eb67e693c15908",
      "provenance": "First-party Rust configuration source at the frozen commit; filter wiring and implementation are preserved as companion files.",
      "caveats": [
        "This is a pinned public-source detail. Runtime settings and live behavior are not verified."
      ]
    },
    {
      "id": "src-network-defaults",
      "title": "Network discount and score-adjustment defaults",
      "sourceType": "source-code",
      "path": "home-mixer/params/param.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/params/param.rs#L259-L277",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "param!(\n    OonWeightFactor,\n    f64,\n    \"rust_home_mixer_oon_weight_factor\",\n    0.75\n);\nparam!(\n    MultiplierPreOffset,\n    bool,\n    \"rust_home_mixer_multiplier_pre_offset\",\n    false\n);\n\nparam!(\n    EnableOonRescoreForInNetworkRepliesRetweets,\n    bool,\n    \"rust_home_mixer_enable_oon_rescore_for_in_network_replies_retweets\",\n    true\n);",
      "lineStart": 259,
      "lineEnd": 277,
      "sha256": "baa02bf4e0bcf4534022880080adbe3aacfda69353959141fdaefef4e26dac22",
      "provenance": "First-party Rust configuration source at the frozen commit.",
      "caveats": [
        "This is a pinned public-source detail. Runtime settings and live behavior are not verified."
      ]
    },
    {
      "id": "src-offset-function",
      "title": "Positive and negative score offset branches",
      "sourceType": "source-code",
      "path": "home-mixer/scorers/ranking_scorer.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/scorers/ranking_scorer.rs#L536-L544",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-15T18:19:06-07:00",
      "excerpt": "    pub(crate) fn offset_score(combined_score: f64, w: &ScoringWeights) -> f64 {\n        if w.total_sum == 0.0 {\n            combined_score.max(0.0)\n        } else if combined_score < 0.0 {\n            (combined_score + w.negative_sum) / w.total_sum * NEGATIVE_SCORES_OFFSET\n        } else {\n            combined_score + NEGATIVE_SCORES_OFFSET\n        }\n    }",
      "lineStart": 536,
      "lineEnd": 544,
      "sha256": "c1d3a38a944ab130ff2d4064c60ac82bc089e8f176f05be7d5d4cf28afd8666e",
      "provenance": "First-party Rust scoring source at the frozen commit.",
      "caveats": [
        "This is a pinned public-source detail. Runtime settings and live behavior are not verified."
      ]
    },
    {
      "id": "src-candidate-source-defaults",
      "title": "Candidate source defaults and enable switches",
      "sourceType": "source-code",
      "path": "home-mixer/params/param.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/params/param.rs#L4-L53",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-16T19:03:59Z",
      "excerpt": "param!(\n    PhoenixMaxResults,\n    u32,\n    \"rust_home_mixer_phoenix_max_results\",\n    1000\n);\nparam!(\n    EnablePhoenixSource,\n    bool,\n    \"rust_home_mixer_enable_phoenix_source\",\n    true\n);\n\nparam!(\n    ThunderMaxResults,\n    u32,\n    \"rust_home_mixer_thunder_max_results\",\n    1200\n);\nparam!(\n    ThunderAlgorithm,\n    String,\n    \"rust_home_mixer_thunder_algorithm\",\n    \"default\"\n);\nparam!(\n    ThunderClusterId,\n    String,\n    \"rust_home_mixer_thunder_cluster_id\",\n    \"amp\"\n);\nparam!(\n    TweetMixerMaxResults,\n    u32,\n    \"rust_home_mixer_tweet_mixer_max_results\",\n    800\n);\nparam!(\n    EnableTweetMixerSource,\n    bool,\n    \"rust_home_mixer_enable_tweet_mixer_source\",\n    false\n);\n\nparam!(\n    EnableSimclustersSource,\n    bool,\n    \"rust_home_mixer_enable_simclusters_source\",\n    true\n);",
      "lineStart": 4,
      "lineEnd": 53,
      "sha256": "baa02bf4e0bcf4534022880080adbe3aacfda69353959141fdaefef4e26dac22",
      "provenance": "Verbatim excerpt from first-party Rust source at the frozen commit.",
      "caveats": [
        "These are checked-in defaults; feature-switch values can vary."
      ]
    },
    {
      "id": "src-thunder-request-limit",
      "title": "Thunder request limit and source gate",
      "sourceType": "source-code",
      "path": "home-mixer/sources/thunder_source.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/sources/thunder_source.rs#L23-L38",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-16T19:03:59Z",
      "excerpt": "#[async_trait]\nimpl Source<ScoredPostsQuery, PostCandidate> for ThunderSource {\n    fn enable(&self, query: &ScoredPostsQuery) -> bool {\n        !query.has_cached_posts\n    }\n\n    async fn source(&self, query: &ScoredPostsQuery) -> Result<Vec<PostCandidate>, String> {\n        let following_list = &query.user_features.followed_user_ids;\n        let excluded_ids = query.seen_ids.to_vec();\n        let following_user_ids: Vec<u64> = following_list.iter().map(|&id| id as u64).collect();\n\n        let request = GetInNetworkPostsRequest {\n            user_id: query.user_id,\n            following_user_ids,\n            max_results: quality_factor::apply(query.params.get(ThunderMaxResults)),\n            exclude_tweet_ids: excluded_ids,",
      "lineStart": 23,
      "lineEnd": 38,
      "sha256": "b66d12f37f011893d70e748085a6cc712406102f519eaff849b7d0ff76a9d220",
      "provenance": "Verbatim excerpt from first-party Rust source at the frozen commit.",
      "caveats": [
        "The requested maximum passes through quality_factor::apply."
      ]
    },
    {
      "id": "src-phoenix-request-limit",
      "title": "Phoenix request limit and source gate",
      "sourceType": "source-code",
      "path": "home-mixer/sources/phoenix_source.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/sources/phoenix_source.rs#L60-L89",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-16T19:03:59Z",
      "excerpt": "#[async_trait]\nimpl Source<ScoredPostsQuery, PostCandidate> for PhoenixSource {\n    fn enable(&self, query: &ScoredPostsQuery) -> bool {\n        query.params.get(EnablePhoenixSource)\n            && (!query.is_topic_request() || query.is_bulk_topic_request())\n            && !query.in_network_only\n            && !query.has_cached_posts\n    }\n\n    async fn source(&self, query: &ScoredPostsQuery) -> Result<Vec<PostCandidate>, String> {\n        let user_id = query.user_id;\n\n        let sequence = query\n            .retrieval_sequence\n            .as_ref()\n            .ok_or_else(|| \"PhoenixSource: missing retrieval_sequence\".to_string())?;\n\n        let cluster = Self::resolve_cluster(query);\n        let client_context = build_client_context(query);\n        let user_context = build_user_context(query);\n\n        let response = self\n            .dispatch\n            .retrieve_with_fallback(\n                query,\n                cluster,\n                user_id,\n                sequence.clone(),\n                query.columnar_retrieval_sequence.clone(),\n                quality_factor::apply(query.params.get(PhoenixMaxResults)),",
      "lineStart": 60,
      "lineEnd": 89,
      "sha256": "499075517699cf19c0fe1d3e30850e1245946a8b0ea6c2ed9963de3028032e73",
      "provenance": "Verbatim excerpt from first-party Rust source at the frozen commit.",
      "caveats": [
        "The requested maximum passes through quality_factor::apply."
      ]
    },
    {
      "id": "src-simclusters-limit-values",
      "title": "SimClusters candidate-limit constants",
      "sourceType": "source-code",
      "path": "home-mixer/sources/simclusters_source.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/sources/simclusters_source.rs#L24-L35",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-16T19:03:59Z",
      "excerpt": "const MAX_SANN_CANDIDATES: usize = 10_000;\nconst MAX_RESULTS: usize = 800;\nconst SOURCE_EMBEDDING_TYPE: EmbeddingType = EmbeddingType::LOG_FAV_LONGEST_L2_EMBEDDING_TWEET;\nconst CANDIDATE_EMBEDDING_TYPE: EmbeddingType = EmbeddingType::LOG_FAV_BASED_TWEET;\nconst MODEL_VERSION: ModelVersion = ModelVersion::MODEL_20M_145K_2020;\nconst ANN_MAX_NUM_RESULTS: i32 = 200;\nconst ANN_MIN_SCORE: f64 = 0.0;\nconst ANN_MAX_TOP_POSTS_PER_CLUSTER: i32 = 800;\nconst ANN_MAX_SCAN_CLUSTERS: i32 = 50;\nconst ANN_MAX_POST_CANDIDATE_AGE_HOURS: i32 = 48;\nconst ANN_MIN_POST_CANDIDATE_AGE_HOURS: i32 = 0;\nconst POST_ANN_MIN_SCORE: f64 = 0.5;",
      "lineStart": 24,
      "lineEnd": 35,
      "sha256": "326b3e9806fa10bcdd1f454c1bfeb83a500f2fd87990b6c740f15b613ef22a2d",
      "provenance": "Verbatim excerpt from first-party Rust source at the frozen commit.",
      "caveats": [
        "The 800 value limits this source, not the whole feed."
      ]
    },
    {
      "id": "src-simclusters-output-cap",
      "title": "SimClusters enable conditions and 800-post cap",
      "sourceType": "source-code",
      "path": "home-mixer/sources/simclusters_source.rs",
      "url": "https://github.com/xai-org/x-algorithm/blob/fad2f71edc780ab14e4cfaebbb8b221385782e43/home-mixer/sources/simclusters_source.rs#L86-L121",
      "version": "fad2f71edc780ab14e4cfaebbb8b221385782e43",
      "date": "2026-09-16",
      "retrievedAt": "2026-09-16T19:03:59Z",
      "excerpt": "#[async_trait]\nimpl Source<ScoredPostsQuery, PostCandidate> for SimclustersSource {\n    fn enable(&self, query: &ScoredPostsQuery) -> bool {\n        query.params.get(EnableSimclustersSource)\n            && !query.in_network_only\n            && !query.has_cached_posts\n            && has_post_signals(query)\n    }\n\n    async fn source(&self, query: &ScoredPostsQuery) -> Result<Vec<PostCandidate>, String> {\n        let signal_ids = post_signal_ids(query);\n        if signal_ids.is_empty() {\n            return Ok(vec![]);\n        }\n\n        let max_per_query = (MAX_SANN_CANDIDATES / signal_ids.len()).max(1);\n\n        let futures = signal_ids.into_iter().map(|signal_id| async move {\n            let candidates = self.get_post_candidates(signal_id).await?;\n            Ok::<_, String>(candidates)\n        });\n\n        let results = futures::future::join_all(futures).await;\n        let mut per_query_results = Vec::with_capacity(results.len());\n        for result in results {\n            let candidates = result?;\n            let filtered: Vec<SimClustersANNTweetCandidate> = candidates\n                .into_iter()\n                .filter(|c| *c.score > POST_ANN_MIN_SCORE)\n                .take(max_per_query)\n                .collect();\n            per_query_results.push(filtered);\n        }\n\n        let mut interleaved = interleave_by_post_id(per_query_results);\n        interleaved.truncate(MAX_RESULTS);",
      "lineStart": 86,
      "lineEnd": 121,
      "sha256": "326b3e9806fa10bcdd1f454c1bfeb83a500f2fd87990b6c740f15b613ef22a2d",
      "provenance": "Verbatim excerpt from first-party Rust source at the frozen commit.",
      "caveats": [
        "The source runs only when post signals exist and the other shown conditions hold."
      ]
    }
  ],
  "nodes": [
    {
      "id": "candidate-sourcing",
      "name": "Find posts for this person",
      "stage": "candidate-generation",
      "plainEnglish": "X gathers recent posts from accounts a person follows, plus posts from other accounts its recommendation systems find.",
      "technicalExplanation": "The snapshot names Thunder for in-network posts and Phoenix retrieval plus SimClusters for out-of-network posts in the per-request For You path.",
      "evidenceRefs": [
        "src-overview",
        "src-candidate-source-defaults",
        "src-thunder-request-limit",
        "src-phoenix-request-limit",
        "src-simclusters-limit-values",
        "src-simclusters-output-cap"
      ],
      "evidenceClass": "direct",
      "confidence": 0.98,
      "controllability": "exogenous",
      "downstreamNodes": [
        "candidate-hydration"
      ],
      "caveats": []
    },
    {
      "id": "candidate-hydration",
      "name": "Gather the post details",
      "stage": "feature-generation",
      "plainEnglish": "X loads the post, author, and viewer relationship details that its later checks and scoring rules need.",
      "technicalExplanation": "The recorded request path hydrates core post data, quotes, media, subscriptions, author details, social-graph relations, language, counts, and semantic IDs before filtering.",
      "evidenceRefs": [
        "src-request-pipeline"
      ],
      "evidenceClass": "direct",
      "confidence": 0.96,
      "controllability": "exogenous",
      "downstreamNodes": [
        "pre-score-eligibility"
      ],
      "caveats": [
        "Many hydrated values are not controllable and some are not exposed to authors."
      ]
    },
    {
      "id": "pre-score-eligibility",
      "name": "Check which posts can enter",
      "stage": "eligibility-filtering",
      "plainEnglish": "X removes posts that fail its eligibility checks before calculating their scores. For example, this path removes replies and reposts for viewers who do not follow the author.",
      "technicalExplanation": "The recorded pre-score chain includes age, out-of-network reply/repost, duplicate, seen-post, keyword, social-graph, subscription, safety-adjacent, video, and topic filters.",
      "evidenceRefs": [
        "src-filter-order",
        "src-age-limit",
        "src-oon-reply-filter"
      ],
      "evidenceClass": "direct",
      "confidence": 0.99,
      "controllability": "indirect",
      "downstreamNodes": [
        "engagement-prediction"
      ],
      "caveats": [
        "Passing these filters only preserves eligibility; it does not create distribution."
      ]
    },
    {
      "id": "engagement-prediction",
      "name": "Estimate how a person will respond",
      "stage": "predicted-engagement",
      "plainEnglish": "For each remaining post, X estimates this person’s chance of liking, replying, sharing, clicking, or giving negative feedback.",
      "technicalExplanation": "Phoenix supplies per-viewer predictions for multiple positive, attention, click, author, and negative actions rather than one universal engagement number.",
      "evidenceRefs": [
        "src-ranking-actions"
      ],
      "evidenceClass": "direct",
      "confidence": 0.97,
      "controllability": "indirect",
      "downstreamNodes": [
        "weighted-ranking"
      ],
      "caveats": [
        "Authors can influence content, not set predictions; model features and outputs for a live request are unobservable here."
      ]
    },
    {
      "id": "weighted-ranking",
      "name": "Turn those chances into a score",
      "stage": "ranking",
      "plainEnglish": "X multiplies each predicted action by its own weight, then combines the results. A reply or share can contribute more than a like with the same predicted chance.",
      "technicalExplanation": "RankingScorer applies checked-in weights to Phoenix predictions and continuous values, sums positive and negative terms, and offsets the resulting score.",
      "evidenceRefs": [
        "src-weight-defaults",
        "src-weighted-score",
        "src-value-model-mode",
        "src-ranking-adjustment-flow"
      ],
      "evidenceClass": "direct",
      "confidence": 0.99,
      "controllability": "indirect",
      "downstreamNodes": [
        "network-adjustment",
        "author-diversity",
        "new-author-exploration"
      ],
      "caveats": [
        "Weights are not raw count values and can vary through runtime configuration.",
        "The checked-in ValueModelMode is weighted, but the scorer contains alternative dwell-regret modes selected by configuration."
      ]
    },
    {
      "id": "network-adjustment",
      "name": "Account for who follows whom",
      "stage": "heuristics-penalties",
      "plainEnglish": "X adjusts scores based on the viewer’s relationship to the author and the post format. These conditions can change how much a post’s score counts.",
      "technicalExplanation": "The scorer applies an effective out-of-network factor, while a pre-score filter removes out-of-network replies and reposts. Original posts from mutual follows can receive an added reply-prediction weight.",
      "evidenceRefs": [
        "src-network-adjustment",
        "src-oon-reply-filter",
        "src-mutual-boost",
        "src-ranking-adjustment-flow"
      ],
      "evidenceClass": "direct",
      "confidence": 0.98,
      "controllability": "indirect",
      "downstreamNodes": [
        "semantic-reranking"
      ],
      "caveats": [
        "Network status is viewer-specific; an author cannot set it globally."
      ]
    },
    {
      "id": "author-diversity",
      "name": "Make room for different authors",
      "stage": "heuristics-penalties",
      "plainEnglish": "When several posts by one author compete for a place, X reduces the scores of the lower-ranked ones. This leaves more room for other authors.",
      "technicalExplanation": "Candidates are sorted by pre-diversity score, counted per author, and multiplied by a decay-to-floor function.",
      "evidenceRefs": [
        "src-author-diversity",
        "src-ranking-adjustment-flow",
        "src-author-diversity-defaults"
      ],
      "evidenceClass": "direct",
      "confidence": 0.99,
      "controllability": "indirect",
      "downstreamNodes": [
        "semantic-reranking"
      ],
      "caveats": [
        "The mechanism is within a request slate, not a published rule that a fixed posting interval is optimal."
      ]
    },
    {
      "id": "new-author-exploration",
      "name": "Give some authors a chance",
      "stage": "heuristics-boosts",
      "plainEnglish": "X has a rule that can raise one eligible original post’s score. Its checks include follower count, post age, and how many home-feed impressions the post has already received.",
      "technicalExplanation": "The snapshot describes an AuthorColdStart path that checks original-post status, follower cap, experiment corpus, age, position, and impression threshold before sampling a target score; this page does not claim those conditions are current or complete.",
      "evidenceRefs": [
        "src-cold-start-params",
        "src-cold-start-rule",
        "src-ranking-adjustment-flow"
      ],
      "evidenceClass": "direct",
      "confidence": 0.96,
      "controllability": "exogenous",
      "downstreamNodes": [
        "semantic-reranking"
      ],
      "caveats": [
        "Eligibility state and experiment assignment are exogenous at test time. This node is visible for understanding, not an actionable author lever."
      ]
    },
    {
      "id": "semantic-reranking",
      "name": "Avoid a repetitive feed",
      "stage": "reranking",
      "plainEnglish": "X compares posts as a group. A post’s similarity to other candidates can affect which combination it chooses.",
      "technicalExplanation": "VMRanker builds a determinantal point process kernel from normalized scores and embedding cosine similarity, selects a diverse subset, and returns candidates in score order.",
      "evidenceRefs": [
        "src-vm-params",
        "src-vm-dpp"
      ],
      "evidenceClass": "direct",
      "confidence": 0.98,
      "controllability": "indirect",
      "downstreamNodes": [
        "top-k-selection"
      ],
      "caveats": [
        "Content embeddings and competitor similarity are hidden; semantic variety is only a rough author-side proxy."
      ]
    },
    {
      "id": "top-k-selection",
      "name": "Keep the highest-scoring posts",
      "stage": "selection",
      "plainEnglish": "X sorts the remaining posts by score and keeps the top candidates for the next checks.",
      "technicalExplanation": "TopKScoreSelector reads candidate scores and uses the configured TOP_K_CANDIDATES_TO_SELECT value of 50.",
      "evidenceRefs": [
        "src-top-k",
        "src-age-limit"
      ],
      "evidenceClass": "direct",
      "confidence": 0.99,
      "controllability": "exogenous",
      "downstreamNodes": [
        "visibility-filtering"
      ],
      "caveats": [
        "A top-K candidate may still be removed later."
      ]
    },
    {
      "id": "visibility-filtering",
      "name": "Check whether posts can be shown",
      "stage": "visibility-filtering",
      "plainEnglish": "X applies further safety, relationship, and policy checks. A post may be shown, hidden, or placed behind a warning.",
      "technicalExplanation": "The recorded architecture separates ranking from visibility and runs visibility-related post-selection filters after score ordering.",
      "evidenceRefs": [
        "src-overview",
        "src-request-pipeline",
        "src-configuration-caveat"
      ],
      "evidenceClass": "direct",
      "confidence": 0.96,
      "controllability": "indirect",
      "downstreamNodes": [
        "served-history-feedback"
      ],
      "caveats": [
        "Some rules and model prompts are intentionally absent, so this corpus cannot enumerate every visibility cause."
      ]
    },
    {
      "id": "served-history-feedback",
      "name": "Remember what was shown",
      "stage": "feedback",
      "plainEnglish": "X records posts it shows a person. Viewer history also informs later recommendations; the connection between these steps is an inference in this map.",
      "technicalExplanation": "A side effect writes selected items to served history, while the README says Phoenix reads recent viewer engagement history. Connecting these into a specific post-level expansion loop would require additional evidence.",
      "evidenceRefs": [
        "src-served-history",
        "src-overview"
      ],
      "evidenceClass": "inference",
      "confidence": 0.66,
      "controllability": "exogenous",
      "downstreamNodes": [
        "candidate-sourcing"
      ],
      "caveats": [
        "Do not describe this as an immediate viral loop, a threshold, or proof that observed engagement causes broader reach."
      ]
    }
  ],
  "edges": [
    {
      "id": "edge-source-hydrate",
      "from": "candidate-sourcing",
      "to": "candidate-hydration",
      "relationship": "Sourced candidates are enriched with data required by later stages.",
      "evidenceRefs": [
        "src-request-pipeline"
      ],
      "evidenceClass": "direct",
      "confidence": 0.97,
      "relationshipType": "causal",
      "directionality": "forward"
    },
    {
      "id": "edge-hydrate-filter",
      "from": "candidate-hydration",
      "to": "pre-score-eligibility",
      "relationship": "Hydrated fields feed the eligibility filters.",
      "evidenceRefs": [
        "src-request-pipeline",
        "src-filter-order"
      ],
      "evidenceClass": "direct",
      "confidence": 0.97,
      "relationshipType": "causal",
      "directionality": "forward"
    },
    {
      "id": "edge-filter-predict",
      "from": "pre-score-eligibility",
      "to": "engagement-prediction",
      "relationship": "Only candidates that remain eligible proceed through the documented scoring path.",
      "evidenceRefs": [
        "src-request-pipeline"
      ],
      "evidenceClass": "direct",
      "confidence": 0.96,
      "relationshipType": "causal",
      "directionality": "forward"
    },
    {
      "id": "edge-predict-rank",
      "from": "engagement-prediction",
      "to": "weighted-ranking",
      "relationship": "Per-action predictions become inputs to the weighted score.",
      "evidenceRefs": [
        "src-ranking-actions",
        "src-weighted-score"
      ],
      "evidenceClass": "direct",
      "confidence": 0.99,
      "relationshipType": "causal",
      "directionality": "forward"
    },
    {
      "id": "edge-rank-network",
      "from": "weighted-ranking",
      "to": "network-adjustment",
      "relationship": "Network and post-type conditions modify or gate ranked candidates.",
      "evidenceRefs": [
        "src-network-adjustment",
        "src-mutual-boost"
      ],
      "evidenceClass": "direct",
      "confidence": 0.98,
      "relationshipType": "causal",
      "directionality": "forward"
    },
    {
      "id": "edge-rank-author-diversity",
      "from": "weighted-ranking",
      "to": "author-diversity",
      "relationship": "The pre-diversity score determines author ordering before decay multipliers apply.",
      "evidenceRefs": [
        "src-author-diversity"
      ],
      "evidenceClass": "direct",
      "confidence": 0.99,
      "relationshipType": "causal",
      "directionality": "forward"
    },
    {
      "id": "edge-rank-new-author",
      "from": "weighted-ranking",
      "to": "new-author-exploration",
      "relationship": "A conditional exploration rule can raise one eligible candidate toward a target score.",
      "evidenceRefs": [
        "src-cold-start-rule"
      ],
      "evidenceClass": "direct",
      "confidence": 0.96,
      "relationshipType": "causal",
      "directionality": "forward"
    },
    {
      "id": "edge-network-vm",
      "from": "network-adjustment",
      "to": "semantic-reranking",
      "relationship": "Adjusted candidates enter the VM reranking stage.",
      "evidenceRefs": [
        "src-ranking-actions",
        "src-vm-dpp"
      ],
      "evidenceClass": "direct",
      "confidence": 0.94,
      "relationshipType": "causal",
      "directionality": "forward"
    },
    {
      "id": "edge-author-vm",
      "from": "author-diversity",
      "to": "semantic-reranking",
      "relationship": "Author-diversified scores contribute to the candidate values supplied to reranking.",
      "evidenceRefs": [
        "src-author-diversity",
        "src-request-pipeline"
      ],
      "evidenceClass": "direct",
      "confidence": 0.94,
      "relationshipType": "causal",
      "directionality": "forward"
    },
    {
      "id": "edge-explore-vm",
      "from": "new-author-exploration",
      "to": "semantic-reranking",
      "relationship": "The exploration-adjusted score can change which candidate survives later selection.",
      "evidenceRefs": [
        "src-cold-start-rule",
        "src-request-pipeline"
      ],
      "evidenceClass": "direct",
      "confidence": 0.93,
      "relationshipType": "causal",
      "directionality": "forward"
    },
    {
      "id": "edge-vm-topk",
      "from": "semantic-reranking",
      "to": "top-k-selection",
      "relationship": "Reranked candidates proceed to score-based top-K selection.",
      "evidenceRefs": [
        "src-request-pipeline",
        "src-top-k"
      ],
      "evidenceClass": "direct",
      "confidence": 0.98,
      "relationshipType": "causal",
      "directionality": "forward"
    },
    {
      "id": "edge-topk-vf",
      "from": "top-k-selection",
      "to": "visibility-filtering",
      "relationship": "Visibility and conversation filters run after selection.",
      "evidenceRefs": [
        "src-request-pipeline",
        "src-configuration-caveat"
      ],
      "evidenceClass": "direct",
      "confidence": 0.96,
      "relationshipType": "causal",
      "directionality": "forward"
    },
    {
      "id": "edge-vf-history",
      "from": "visibility-filtering",
      "to": "served-history-feedback",
      "relationship": "Selected feed items that survive response construction can be recorded in served history.",
      "evidenceRefs": [
        "src-served-history"
      ],
      "evidenceClass": "inference",
      "confidence": 0.78,
      "relationshipType": "inferred",
      "directionality": "forward"
    },
    {
      "id": "edge-history-source",
      "from": "served-history-feedback",
      "to": "candidate-sourcing",
      "relationship": "Past viewer history is an input to future personalized retrieval and ranking requests.",
      "evidenceRefs": [
        "src-overview",
        "src-served-history"
      ],
      "evidenceClass": "inference",
      "confidence": 0.66,
      "relationshipType": "inferred",
      "directionality": "feedback"
    }
  ],
  "levers": [
    {
      "id": "lever-original-format",
      "name": "Original-post format",
      "controllability": "direct",
      "description": "Publish an original post rather than making the same communication a reply or repost."
    },
    {
      "id": "lever-posting-time",
      "name": "Posting time",
      "controllability": "direct",
      "description": "Choose when a post is published and pre-register the observation window."
    },
    {
      "id": "lever-cadence-spacing",
      "name": "Cadence spacing",
      "controllability": "direct",
      "description": "Choose whether comparable posts are clustered or spaced."
    },
    {
      "id": "lever-interaction-framing",
      "name": "Interaction framing",
      "controllability": "direct",
      "description": "Structure useful content to invite a reply, share, follow, or sustained reading without engagement bait."
    },
    {
      "id": "lever-semantic-variety",
      "name": "Semantic variety",
      "controllability": "direct",
      "description": "Vary the subject or angle of adjacent posts while preserving editorial quality."
    },
    {
      "id": "lever-media-format",
      "name": "Media format",
      "controllability": "direct",
      "description": "Choose text, image, or video when the medium materially improves the idea."
    },
    {
      "id": "lever-audience-relationship",
      "name": "Mutual audience relationship",
      "controllability": "indirect",
      "description": "Build real reciprocal relationships over time; the author cannot set viewer-specific graph state for a test."
    },
    {
      "id": "lever-interest-fit",
      "name": "Viewer-interest fit",
      "controllability": "indirect",
      "description": "Choose topics and framing likely to fit an audience, while the model's viewer-post prediction remains hidden."
    },
    {
      "id": "lever-low-impression-state",
      "name": "Low-impression author state",
      "controllability": "exogenous",
      "description": "Follower count, prior home impressions, and experiment assignment determine exploration eligibility at test time."
    },
    {
      "id": "lever-manipulated-engagement",
      "name": "Manipulated engagement",
      "controllability": "disallowed",
      "description": "Fake, coordinated, purchased, automated, or deceptive interaction is outside the product's experiment space."
    }
  ],
  "baseline": [
    {
      "id": "baseline-hooks",
      "advice": "Write a stronger opening hook.",
      "rationale": "A clear opening can improve attention and comprehension in ordinary post analytics.",
      "leverRefs": [
        "lever-interaction-framing"
      ]
    },
    {
      "id": "baseline-consistency",
      "advice": "Post consistently.",
      "rationale": "A steady publishing habit increases learning opportunities and keeps the audience familiar with the author.",
      "leverRefs": [
        "lever-posting-time",
        "lever-cadence-spacing"
      ]
    },
    {
      "id": "baseline-media",
      "advice": "Use media when it makes the idea easier to grasp.",
      "rationale": "Images and video can improve clarity and stop rate, depending on the subject.",
      "leverRefs": [
        "lever-media-format",
        "lever-interest-fit"
      ]
    },
    {
      "id": "baseline-replies",
      "advice": "Reply thoughtfully to relevant people.",
      "rationale": "Real conversation builds relationships and reveals what the audience values.",
      "leverRefs": [
        "lever-audience-relationship",
        "lever-interaction-framing"
      ]
    },
    {
      "id": "baseline-timing",
      "advice": "Publish when the intended audience is active.",
      "rationale": "Early exposure can make measurement faster and reduce empty observation windows.",
      "leverRefs": [
        "lever-posting-time"
      ]
    },
    {
      "id": "baseline-variety",
      "advice": "Vary topics and formats without losing a clear point of view.",
      "rationale": "A varied editorial mix can serve different reader needs and reduce fatigue.",
      "leverRefs": [
        "lever-semantic-variety",
        "lever-interest-fit"
      ]
    },
    {
      "id": "baseline-value",
      "advice": "Make posts useful enough to share.",
      "rationale": "Specific, self-contained value can create legitimate sharing and return readership.",
      "leverRefs": [
        "lever-interaction-framing",
        "lever-interest-fit"
      ]
    }
  ],
  "hypotheses": [
    {
      "id": "hyp-original-discovery",
      "title": "Try original posts to reach new people",
      "mechanismRefs": [
        "pre-score-eligibility",
        "network-adjustment"
      ],
      "evidenceRefs": [
        "src-oon-reply-filter",
        "src-network-adjustment"
      ],
      "leverRefs": [
        "lever-original-format"
      ],
      "evidenceClass": "inference",
      "implication": "The X post format you choose can determine whether it is considered for For You distribution to people who do not follow you on this path.",
      "controllableVariable": "Publish an idea as a standalone original post rather than only as a reply or repost.",
      "hypothesis": "Original posts may reach more new people because they pass an eligibility check that replies and reposts can fail.",
      "confidence": 0.79,
      "informationValue": 5,
      "potentialImpact": 4,
      "cost": 2,
      "integrityRisk": "low",
      "nonObviousReason": "The code makes format and network status an eligibility condition; replying is not automatically an additive distribution tactic.",
      "surfaceAdvice": "Keep the useful idea self-contained when discovery matters; use a reply when the conversation context is the point.",
      "caveats": [
        "The three formats serve different conversational purposes, so comparable content is difficult.",
        "Standard analytics may not expose For You and follower status with enough precision."
      ]
    },
    {
      "id": "hyp-cadence-collision",
      "title": "Give your posts more space",
      "mechanismRefs": [
        "author-diversity"
      ],
      "evidenceRefs": [
        "src-author-diversity",
        "src-author-diversity-defaults"
      ],
      "leverRefs": [
        "lever-cadence-spacing"
      ],
      "evidenceClass": "inference",
      "implication": "Your posts can compete with one another when X considers them together for the same person’s feed.",
      "controllableVariable": "Leave a longer gap between posts instead of publishing several close together.",
      "hypothesis": "Spacing posts out may increase impressions per post if fewer of your posts compete in the same feed request.",
      "confidence": 0.72,
      "informationValue": 5,
      "potentialImpact": 3,
      "cost": 2,
      "integrityRisk": "low",
      "nonObviousReason": "The mechanism acts on same-author competition inside a viewer request, not a generic platform-wide cadence rule.",
      "surfaceAdvice": "Leave room between related posts when both need attention.",
      "caveats": [
        "The author cannot observe whether both posts entered the same request.",
        "Time-of-day, topic demand, and post quality can dominate the effect."
      ]
    },
    {
      "id": "hyp-mutual-original",
      "title": "Ask a question worth answering",
      "mechanismRefs": [
        "engagement-prediction",
        "weighted-ranking",
        "network-adjustment"
      ],
      "evidenceRefs": [
        "src-mutual-boost",
        "src-weight-defaults",
        "src-weighted-score"
      ],
      "leverRefs": [
        "lever-original-format",
        "lever-interaction-framing",
        "lever-audience-relationship"
      ],
      "evidenceClass": "inference",
      "implication": "For original posts, X gives a predicted reply extra weight when the viewer and author follow each other.",
      "controllableVariable": "End an original post with one specific question that your audience can usefully answer.",
      "hypothesis": "A useful question may earn more replies and more impressions, especially among people who follow you and whom you follow back.",
      "confidence": 0.7,
      "informationValue": 4,
      "potentialImpact": 3,
      "cost": 3,
      "integrityRisk": "low",
      "nonObviousReason": "The rule is conditional on mutual-follow status and original-post type, not simply 'replies are worth more.'",
      "surfaceAdvice": "Ask a useful question when a real answer would improve the post.",
      "caveats": [
        "Predicted reply probability is not observed reply count.",
        "Most analytics cannot isolate viewers who follow both accounts.",
        "Questions must remain useful and non-coercive."
      ]
    },
    {
      "id": "hyp-semantic-variety",
      "title": "Give each post a different angle",
      "mechanismRefs": [
        "semantic-reranking"
      ],
      "evidenceRefs": [
        "src-vm-params",
        "src-vm-dpp"
      ],
      "leverRefs": [
        "lever-semantic-variety"
      ],
      "evidenceClass": "inference",
      "implication": "X considers how similar posts are when choosing a group of posts for the feed.",
      "controllableVariable": "Build a series around different examples, questions, or perspectives instead of repeating the same point.",
      "hypothesis": "A varied series may earn more impressions per post because its posts are less likely to compete as near-duplicates.",
      "confidence": 0.61,
      "informationValue": 4,
      "potentialImpact": 3,
      "cost": 4,
      "integrityRisk": "low",
      "nonObviousReason": "The mechanism evaluates a set using embeddings; ordinary advice usually discusses variety as audience taste rather than candidate redundancy.",
      "surfaceAdvice": "Change the angle, not just the wording.",
      "caveats": [
        "Embedding distance is unobserved.",
        "The competing set includes other authors, making an author-only comparison noisy.",
        "Topic variety can change baseline demand."
      ]
    },
    {
      "id": "hyp-multi-action",
      "title": "Make posts worth passing along",
      "mechanismRefs": [
        "engagement-prediction",
        "weighted-ranking"
      ],
      "evidenceRefs": [
        "src-ranking-actions",
        "src-weight-defaults",
        "src-weighted-score"
      ],
      "leverRefs": [
        "lever-interaction-framing",
        "lever-interest-fit"
      ],
      "evidenceClass": "inference",
      "implication": "X ranks separate predicted actions with different weights. Visible likes alone are an incomplete measure.",
      "controllableVariable": "Turn an insight into a useful checklist, example, or reference that someone would want to send to another person.",
      "hypothesis": "A useful checklist may get more impressions than a hot take even when it gets fewer likes.",
      "confidence": 0.68,
      "informationValue": 5,
      "potentialImpact": 4,
      "cost": 3,
      "integrityRisk": "low",
      "nonObviousReason": "The code models several private and attention actions separately; surface dashboards center visible engagements.",
      "surfaceAdvice": "Make useful information easy to save or send privately, then check whether the predicted action pattern is visible.",
      "caveats": [
        "The weights do not convert observed counts into score points.",
        "Private-share predictions may not be exposed in analytics.",
        "A checklist and a hot take differ in length, purpose, and usefulness."
      ]
    },
    {
      "id": "hyp-freshness-window",
      "title": "Look for a change as posts pass 48 hours",
      "mechanismRefs": [
        "pre-score-eligibility"
      ],
      "evidenceRefs": [
        "src-age-limit",
        "src-filter-order"
      ],
      "leverRefs": [],
      "evidenceClass": "inference",
      "implication": "X’s code includes a 48-hour age check on this candidate path.",
      "controllableVariable": "Observe how older posts perform; there is no author setting to change in this check.",
      "hypothesis": "The rate of new impressions may drop as a post passes 48 hours, although other routes can still bring people to it.",
      "confidence": 0.76,
      "informationValue": 4,
      "potentialImpact": 2,
      "cost": 3,
      "integrityRisk": "low",
      "nonObviousReason": "The source contains a discrete eligibility bound, while ordinary timing advice assumes continuous recency decay.",
      "surfaceAdvice": "Treat post age as an audit question here; do not plan on a guaranteed 48-hour cutoff.",
      "caveats": [
        "Most creator analytics do not expose hourly For You impressions.",
        "Quotes, profile visits, search, notifications, or resurfaced objects can obscure the discontinuity."
      ]
    }
  ],
  "experiments": [
    {
      "id": "exp-original-discovery",
      "hypothesisRef": "hyp-original-discovery",
      "treatment": "Publish a matched idea as a standalone original post.",
      "control": "Publish a comparable idea in the same content family as a reply or repost, using randomized matched pairs over multiple weeks.",
      "primaryMetric": "Fixed-window organic impressions per post within 24 hours.",
      "heldConstant": [
        "author",
        "topic family",
        "day-of-week band",
        "media type",
        "length band",
        "call-to-action policy",
        "observation window"
      ],
      "confounders": [
        "Replies inherit conversation context",
        "topic demand varies",
        "analytics attribution may be incomplete"
      ],
      "expectedIfTrue": "Original-post pairs show a persistent positive difference in non-follower For You impression share.",
      "expectedIfFalse": "The paired difference centers near zero or reverses after context and timing controls.",
      "guardrails": [
        "No duplicate spam",
        "No manufactured engagement",
        "No irrelevant replies",
        "Respect platform policies"
      ],
      "integrityCheck": "Every post must stand on its own as useful communication; the test changes format, not authenticity.",
      "alternativeExplanation": "Original posts may simply be easier to understand without conversation context.",
      "protocol": "Pre-register at least 20 matched pairs, randomize format order, exclude paid or externally promoted posts, and report the full distribution rather than only winners.",
      "studyType": "randomized-paired-content",
      "feasibility": "standard-analytics",
      "dataRequirement": "Post-level fixed-window organic impressions from creator analytics; a follower or For You breakdown would strengthen attribution but is not assumed."
    },
    {
      "id": "exp-cadence-collision",
      "hypothesisRef": "hyp-cadence-collision",
      "treatment": "Publish the second of two matched-quality posts 20–40 minutes after the first.",
      "control": "Publish the second post 5–7 hours after the first on a matched day.",
      "primaryMetric": "Fixed-window organic impressions for the second post in each pair within 12 hours.",
      "heldConstant": [
        "author",
        "two-post topic mix",
        "weekday",
        "time-zone band",
        "media type",
        "quality rubric"
      ],
      "confounders": [
        "Audience availability",
        "first post performance",
        "breaking news",
        "unknown slate overlap"
      ],
      "expectedIfTrue": "Clustered second posts underperform spaced second posts consistently, especially when the first post is still receiving impressions.",
      "expectedIfFalse": "Spacing has no stable paired effect after time and topic controls.",
      "guardrails": [
        "Normal editorial cadence only",
        "No deletion and reposting",
        "No engagement pods"
      ],
      "integrityCheck": "Both schedules must remain reasonable for followers; do not flood the feed to force a result.",
      "alternativeExplanation": "Audience fatigue or notification timing, rather than author-diversity logic, could create the same pattern.",
      "protocol": "Randomize clustered versus spaced days for 6–8 weeks, score content quality before publishing, and analyze the second post separately from total daily reach.",
      "studyType": "randomized-schedule",
      "feasibility": "standard-analytics",
      "dataRequirement": "Post-level organic impressions and exact publish timestamps."
    },
    {
      "id": "exp-mutual-original",
      "hypothesisRef": "hyp-mutual-original",
      "treatment": "Publish an original post that ends with one substantive, answerable question integral to the topic.",
      "control": "Publish a matched original post with the same informational value and no question.",
      "primaryMetric": "For You impressions among mutually following viewers within 12 hours.",
      "heldConstant": [
        "author",
        "topic family",
        "length",
        "media",
        "publish-time band",
        "external promotion"
      ],
      "confounders": [
        "Question quality",
        "mutual-follow share",
        "reply prediction is not reply count"
      ],
      "expectedIfTrue": "Question-led originals show higher distribution within the mutual-follow cohort before any large observed reply difference appears.",
      "expectedIfFalse": "No cohort-level distribution difference remains after post-quality controls.",
      "guardrails": [
        "No engagement bait",
        "No forced binary polls",
        "No reciprocal-engagement agreements"
      ],
      "integrityCheck": "The question must improve the post for a reader even if nobody answers.",
      "alternativeExplanation": "Questions may increase dwell or general reader interest rather than activate the mutual-follow reply weight.",
      "protocol": "Use instrumented cohort data if available; otherwise label follower impressions as a weak proxy and keep the conclusion provisional.",
      "studyType": "randomized-paired-content",
      "feasibility": "requires-instrumentation",
      "dataRequirement": "Viewer-level or cohort-level For You impression data with mutual-follow status; ordinary creator analytics is insufficient."
    },
    {
      "id": "exp-semantic-variety",
      "hypothesisRef": "hyp-semantic-variety",
      "treatment": "Publish a three-post weekly set with deliberately distinct subject angles and vocabulary.",
      "control": "Publish an equally useful three-post set that explores one narrow topic with semantically similar framing.",
      "primaryMetric": "Fixed-window organic impressions per post and retention from post one to post three.",
      "heldConstant": [
        "author",
        "number of posts",
        "quality rubric",
        "format mix",
        "weekday schedule",
        "total word count band"
      ],
      "confounders": [
        "Different topic demand",
        "embedding mismatch with human judgments",
        "competition from other authors"
      ],
      "expectedIfTrue": "Varied sets lose less reach from post one to post three and reach more unique viewers per post.",
      "expectedIfFalse": "Set-level reach depends on topic demand or quality, with no stable advantage for semantic variety.",
      "guardrails": [
        "No off-brand topic hopping",
        "No keyword stuffing",
        "No low-quality filler"
      ],
      "integrityCheck": "Every variant must meet the same editorial usefulness threshold.",
      "alternativeExplanation": "Varied topics may simply address larger or different audiences, independent of DPP reranking.",
      "protocol": "Blind-rate usefulness before publication, alternate treatment weeks, and treat any result as suggestive unless platform-side candidate-set data is available.",
      "studyType": "alternating-period",
      "feasibility": "feasible-with-proxy",
      "dataRequirement": "Post-level fixed-window organic impressions; embeddings or candidate-set data would be required for mechanism attribution."
    },
    {
      "id": "exp-multi-action",
      "hypothesisRef": "hyp-multi-action",
      "treatment": "Publish a self-contained reference post designed for legitimate saving or private sharing.",
      "control": "Publish a matched concise reaction post optimized for immediate visible response.",
      "primaryMetric": "Organic impressions per post within 24 hours; first-hour likes and replies reported separately.",
      "heldConstant": [
        "author",
        "topic family",
        "publish-time band",
        "media type",
        "external promotion",
        "quality threshold"
      ],
      "confounders": [
        "Unobserved private shares",
        "length and utility differences",
        "topic-specific sharing norms",
        "Visible engagement is a post-treatment outcome, so dividing by it would change the comparison and can bias interpretation."
      ],
      "expectedIfTrue": "Reference posts sometimes achieve greater downstream non-follower distribution despite equal or lower visible likes.",
      "expectedIfFalse": "Visible reaction metrics explain distribution as well as or better than the treatment distinction.",
      "guardrails": [
        "No clickbait",
        "No withholding essential information",
        "No artificial sharing requests"
      ],
      "integrityCheck": "The reference must deliver its promised value inside the post or linked artifact.",
      "alternativeExplanation": "Higher-quality or longer posts may earn more dwell, not private-share prediction.",
      "protocol": "Use matched topic pairs and report like, reply, share if available, dwell proxy if available, and reach without converting any action count into ranking points.",
      "studyType": "randomized-paired-content",
      "feasibility": "feasible-with-proxy",
      "dataRequirement": "Post-level organic impressions and visible engagement counts; private-share predictions and most private actions are unavailable."
    },
    {
      "id": "exp-freshness-window",
      "hypothesisRef": "hyp-freshness-window",
      "treatment": "Observe each post after it crosses 48 hours of age.",
      "control": "Use the same post's 36–47 hour window plus matched posts' smooth-decay forecasts.",
      "primaryMetric": "Incremental For You impressions per hour around the 48-hour boundary.",
      "heldConstant": [
        "post identity",
        "no paid promotion",
        "no deliberate resurfacing",
        "hour-of-week adjustment",
        "measurement definition"
      ],
      "confounders": [
        "Low event counts",
        "analytics batching",
        "quotes and search resurfacing",
        "other candidate paths"
      ],
      "expectedIfTrue": "A regression-discontinuity model finds a negative break near 48 hours beyond the smooth age trend.",
      "expectedIfFalse": "Impressions decay smoothly with no reproducible boundary effect.",
      "guardrails": [
        "Observe normal posts only",
        "Do not repost to manipulate the boundary",
        "Publish null results"
      ],
      "integrityCheck": "The test is observational around naturally aging posts and changes no user behavior.",
      "alternativeExplanation": "Analytics batching or a diurnal boundary could mimic a discontinuity.",
      "protocol": "Collect hourly data for at least 50 posts, align by exact creation time, include hour-of-week controls, and separately flag quotes or external traffic spikes.",
      "studyType": "observational-audit",
      "feasibility": "requires-instrumentation",
      "dataRequirement": "Hourly For You impression attribution around exact post age; ordinary creator analytics may batch or omit this data."
    }
  ],
  "exclusions": [
    {
      "id": "exclude-fake-engagement",
      "name": "Fake or purchased engagement",
      "reason": "Manipulates signals, violates the integrity guardrail, and cannot establish a legitimate mechanism effect.",
      "controllability": "disallowed",
      "evidenceRefs": [
        "src-weight-defaults"
      ]
    },
    {
      "id": "exclude-coordinated-blocking",
      "name": "Coordinated blocking or reporting",
      "reason": "Harms users and misreads predicted-action weights as raw count penalties; the source explicitly warns against that interpretation.",
      "controllability": "disallowed",
      "evidenceRefs": [
        "src-weight-defaults"
      ]
    },
    {
      "id": "exclude-bots",
      "name": "Bot amplification",
      "reason": "Inauthentic automation is outside legitimate experimentation and interacts with anti-abuse systems omitted from this corpus.",
      "controllability": "disallowed",
      "evidenceRefs": [
        "src-configuration-caveat"
      ]
    },
    {
      "id": "exclude-sockpuppets",
      "name": "Sockpuppet cold-start testing",
      "reason": "Creating accounts to seek exploration eligibility is deceptive and would confound author, graph, and audience effects.",
      "controllability": "disallowed",
      "evidenceRefs": [
        "src-cold-start-params",
        "src-cold-start-rule"
      ]
    },
    {
      "id": "exclude-runtime-weights",
      "name": "Assumed universal runtime weights",
      "reason": "Feature switches and traffic experiments can override checked-in defaults; runtime values are exogenous to authors.",
      "controllability": "exogenous",
      "evidenceRefs": [
        "src-configuration-caveat",
        "src-weight-defaults"
      ]
    },
    {
      "id": "exclude-model-output",
      "name": "A live viewer-post prediction",
      "reason": "The public snapshot defines heads and scoring arithmetic but does not reveal the live prediction for a particular request.",
      "controllability": "exogenous",
      "evidenceRefs": [
        "src-weighted-score",
        "src-configuration-caveat"
      ]
    }
  ]
}
