Free sample lesson ยท X For You Algorithm

Request to Ranked Feed

Why can one For You request trigger sources, filters, scores, and logs?

Lesson 1 of the Wondering course X For You Algorithm

What You Will Learn

What You Will Learn

The pipeline view prevents the mistake of treating the algorithm as a single model call.

The Home Mixer Orchestrator

The X For You feed is not a single neural network call. It is a complex pipeline managed by a service called Home Mixer.

Home Mixer coordinates the entire request flow. It starts with your request and ends with a ranked list of posts.

Think of it as a conductor. It ensures every component, from data sources to safety filters, runs in the correct sequence.

The Orchestration Pipeline

Preparing the Request Context

Before finding posts, the system must understand who is asking. This happens during query hydration.

Query hydrators attach your history and social graph data to the request. They also look at your IP address and topics of interest.

This context is vital. It allows the pipeline to customize the search for candidates based on your specific profile and current state.

Query Context Components

From Candidates to Hydration

Next, candidate sources gather potential posts. A post from someone you follow might come from a source like Thunder.

Once gathered, candidate hydrators add missing details. They fetch author profiles and post metadata.

You cannot score a post without knowing its contents. This stage provides the data needed for the ranking models to make informed decisions later.

Sourcing vs. Hydration
  • Candidate Sources
  • Candidate Hydrators

Filtering and Scoring

Not every candidate is suitable. Filters remove posts that you have muted or that violate safety rules.

After filtering, scorers like Phoenix assign a numerical value to each remaining post. This value predicts how likely you are to engage.

It is a common mistake to think the scorer does everything. In reality, it only ranks what the filters and sources allow through.

The Funnel: Filter to Score

Final Selection and Side Effects

The selector chooses the final items for your screen. It arranges them to ensure a diverse and engaging mix.

Finally, the system runs side effects. This stage logs what you saw to improve future recommendations.

This loop ensures the algorithm learns from every request. It records the state of the feed for observability and future training data.

The Feedback Loop

Putting It All Together

The Request-to-Ranked-Feed Lifecycle
  • Hydrate: Gather user context and social graph data to personalize the request.
  • Source: Pull thousands of potential candidates from various internal databases.
  • Refine: Filter for safety and hydrate candidates with full metadata for scoring.
  • Rank: Apply ML models to score candidates and select the best mix for the user.
  • Log: Execute side effects to record the interaction for future model training.

Check yourself

The _____ service is responsible for coordinating the entire feed request flow from start to finish.

  • Home Mixer
  • Grok

Answer: Home Mixer

Home Mixer acts as the 'conductor' or orchestrator that manages every stage of the pipeline.

The feed pipeline follows a specific sequence: first _____ gathers user context, then _____ find potential posts, followed by _____ to rank them, and finally _____ to log the results.

Answer: The feed pipeline follows a specific sequence: first Query Hydration gathers user context, then Candidate Sources find potential posts, followed by Scoring to rank them, and finally Side Effects to log the results.

The pipeline moves from understanding the user (context) to finding content (sourcing), evaluating it (scoring), and recording the interaction (side effects).

What is the primary difference between candidate sourcing and candidate hydration?

  • Sourcing retrieves post IDs, while hydration fetches the actual content and metadata.
  • Sourcing removes unwanted posts, while hydration assigns them a final score.
  • Sourcing adds user history, while hydration removes safety violations.

Answer: Sourcing retrieves post IDs, while hydration fetches the actual content and metadata.

Sourcing is about finding 'which' posts to show (IDs), while hydration is about gathering the 'details' (text/author) needed to evaluate those posts.

Keep going

This is lesson 1 of 12 in X For You Algorithm. Next up:

  1. Pipeline Components
  2. Blended Feed Items
  3. Thunder In-Network Store
  4. Phoenix Source Families
  5. Source Failures and Fallbacks

Start this course free

Wondering turns any topic into short lessons you can read, watch, or listen to, with practice questions and an AI tutor.