免費試讀課程單元 · X 為你推薦演算法

從請求到排序動態

為什麼一次為你推薦請求會觸發來源、過濾器、分數和記錄?

Wondering 課程《X 為你推薦演算法》的第 1 個課程單元

你將學到什麼

你將學到什麼

用 pipeline 視角可以避免把演算法誤當成一次模型呼叫。

The Algorithm is a Pipeline

The X For You timeline is not just a single neural network call. It is a structured sequence of steps managed by a system called Home Mixer.

Home Mixer coordinates the journey from your initial request to the final list of posts you see.

Thinking of it as a pipeline helps you understand how different rules and models work together. It is a flow of data, not a single black box.

Home Mixer 管道流程

Preparing the Request Context

The process begins with the Query Hydrator. This stage adds essential context to your request.

It gathers data about your history, social graph, and interests. It also checks your IP address and cache status.

This step ensures the system knows who is asking before it looks for content. Without this context, the recommendations would not be personal.

Query Hydrator 蒐集的資料類型

Finding and Enriching Candidates

Next, Sources generate a pool of potential posts. For example, a service might pull posts from accounts you follow.

Once found, the Candidate Hydrator adds missing details. It might fetch the author profile or media info.

This data is necessary for the next steps. You cannot score a post or check for safety if you do not have the full details of the content.

來源產生 vs. 候選者補齊
  • Sources (來源)
  • Hydrator (補齊)

Filtering and Scoring

The Filter stage removes items you should not see. This includes muted keywords or blocked accounts.

After filtering, the Scorer assigns a value to each remaining post. This is where models like Phoenix predict how you will interact with a post.

A common mistake is thinking the Scorer does everything. In reality, it only ranks what the previous stages allowed through.

過濾與評分的因果關係

Final Selection and Side Effects

The Selector picks the top items to create the final order. It balances different content types to keep the feed diverse.

Finally, the system executes Side Effects. This logs what was shown to you for future learning and observability.

This complete cycle ensures the feed is safe, relevant, and constantly improving based on what you actually see.

最終選擇與副作用

綜合回顧

X 推薦演算法執行步驟
  • 脈絡補齊: Query Hydrator 確定『是誰』在請求,並抓取其社交與興趣背景。
  • 候選生成: Sources 與 Candidate Hydrator 找出潛在貼文並補全其媒體資訊。
  • 篩選評分: Filter 剔除違規內容,Scorer 則預測用戶互動機率進行排序。
  • 多樣化輸出: Selector 確保內容多樣性,並記錄行為以供模型後續學習。

自我檢測

The X For You timeline is generated by _____.

  • a structured pipeline called Home Mixer
  • a single neural network call

答案: a structured pipeline called Home Mixer

Home Mixer is the system that manages the entire sequence of steps (pipeline) to create the timeline.

The Home Mixer process follows this order: _____ adds context, _____ find candidates, _____ removes items, and _____ ranks them.

答案: The Home Mixer process follows this order: Query Hydrator adds context, Sources find candidates, Filter removes items, and Scorer ranks them.

The pipeline moves from preparing the user context to finding content, cleaning it, and finally ranking it.

Which stage is responsible for fetching the author's profile picture and media details for a post ID?

  • Query Hydrator
  • Candidate Hydrator
  • Filter
  • Selector

答案: Candidate Hydrator

The Candidate Hydrator 'enriches' the simple IDs found by Sources with actual content data needed for scoring.

繼續學習

這是《X 為你推薦演算法》共 12 個課程單元中的第 1 個。接下來:

  1. Pipeline 元件
  2. 混合的動態項目
  3. Thunder 站內網路儲存
  4. Phoenix 來源家族
  5. 來源失敗與備援

免費開始這門課程

Wondering 把任何主題變成可以閱讀、觀看或收聽的短課程單元,並附有練習題和 AI 家教。