Agent-readable docs

X For You Algorithm Documentation

Technical reference for the X For You recommendation stack: Phoenix retrieval and ranking, Home Mixer orchestration, Thunder in-network storage, Grox content understanding, and the Candidate Pipeline framework.

Pages

  1. OverviewPublic surfaces of the For You stack, who can run what from this checkout, and the first docs routes to follow.
  2. InstallationPython 3.11+, uv or pip, Git LFS for the Phoenix artifact archive, and the extract layout required before inference.
  3. QuickstartExtract oss-phoenix-artifacts, run run_pipeline.py, and recognize the ranked table as the success signal.
  4. Runtime boundariesWhat this checkout can execute locally versus production Home Mixer, Thunder, and Grox snapshots that depend on unpublished crates.
  5. For You request lifecycleCandidatePipeline.execute stages from query hydration through side effects, and how ForYouCandidatePipeline wraps PhoenixCandidatePipeline.
  6. In-network and out-of-networkThunder followed-author lookup versus Phoenix retrieval, enable predicates, and how in_network_only changes sourcing and served_type.
  7. Candidate isolationmake_recsys_attn_mask rules: candidates attend to user and history plus self, never to other candidates, so scores stay batch-independent.
  8. Hash embeddingsHashConfig, linear-congruential ID hashing, pad-offset unified tables, and how RecsysBatch hashes are looked up before the transformer.
  9. Multi-action scoringPer-action logits, demo weighted sums in run_pipeline.py, and production WeightedScorer versus RankingScorer weight tables.
  10. Run the inference pipelineLoad retrieval and ranker checkpoints, encode example_sequence.json, retrieve from sports_corpus.npz, and rank with the published action weights.
  11. Customize a user sequenceexample_sequence.json fields, ActionName indices, history padding to history_seq_len, and --top_k_retrieval / --top_k_display knobs.
  12. Assemble a Home Mixer requestHomeMixerServer CLI flags, QueryBuilder.viewer_id validation, ScoredPostsQuery construction, and For You versus ScoredPosts entry points.
  13. Blend ads into the feedAdsSource intake, SafeGapAdsBlender versus PartitionOrganicAdsBlender, AdsBlenderType selection, and prompt / who-to-follow / push-to-home insertion.
  14. Execute Grox content plansEngine, Dispatcher, and GrpcServer startup, PlanMaster fan-out, TaskEligibility gating, and merged TaskResult fields.
  15. Add a pipeline componentSource, Hydrator, Filter, Scorer, Selector, QueryHydrator, and SideEffect contracts, including length-match and no-drop rules.
  16. Phoenix model configurationPhoenixModelConfig and PhoenixRetrievalModelConfig fields, TransformerConfig, RecsysBatch, RecsysEmbeddings, and published config.json keys.
  17. Action indicesActionName indices used in example_sequence.json, run_pipeline.py IDX_* constants, runners.ACTIONS labels, and scorer weight keys.
  18. ScoredPostsQuery and gRPCScoredPostsQuery fields, QueryBuilder defaults, TEST_USER_IDS empty responses, and ScoredPost / ForYouFeed / URT response mapping.
  19. Candidate sourcesPhoenixCandidatePipeline and ForYouCandidatePipeline sources, enable predicates, cluster resolution, and served_type assignment.
  20. Filters and hydratorsPre-score and post-selection filters, query hydrators that fill ScoredPostsQuery, and candidate hydrators that must preserve order and length.
  21. Scorers and weightsPhoenixScorer cluster and egress fallback, WeightedScorer and RankingScorer formulas, AuthorDiversityScorer decay, OON and VM rankers, TopKScoreSelector.
  22. Thunder GetInNetworkPostsInNetworkPostsService RPC fields, PostStore timelines and retention, Kafka ingest, semaphore capacity, and Strato following-list fallback.
  23. Grox plans and tasksPlanMaster.ALL_PLANS, TaskEligibility values, DAG TASK_DEPENDENCIES, ContentClassifier, and TaskResult merge rules.
  24. Test Phoenixuv run pytest targets, attention-mask and retrieval assertions, and the success criteria encoded in the Phoenix test modules.
  25. TroubleshootingLFS and artifact-path failures, viewer_id must be specified, TEST_USER_IDS empty feeds, Thunder RESOURCE_EXHAUSTED, missing retrieval_sequence, and unpublished Grox modules.

Complete Markdown

The complete agent-readable Markdown files are published separately from this HTML page.