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