跟讀練習: Recommendation System Infra Basics 1 - 通過影片學習英語口語

選擇練習模式

每種模式都會開啟全屏練習室。

131 句
如果句子過短或過長,請點選 Edit 進行調整。
1
Hey everyone, we're trying something new with shorter form content to teach you important concepts.
2
This is a bit different than our longer form problem breakdowns or deep dives, but I'm hoping you learned something new and it helps you to grow as an engineer.
3
Let us know what you think in the comments if we should be doing more of this.
4
Today, I want to make a quick video to walk you through some of the architecture behind recommendation systems.
5
This isn't going to be an ML focus video, we'll get to those later, but I wanted to share a few of the techniques used in modern systems
6
because they end up being broadly useful in designing systems that both operate at scale and don't necessarily have correct answers.
7
Just to be clear, I'm focusing on the software engineering side here.
8
If you think about recommendation systems, they usually have a pretty simple objective.
9
You have a user and you want to find all the things that we might think the user is going to want.
10
This might be YouTube videos or a buyable item on an e-commerce platform or social media posts or whatever.
11
There's really two big challenges here.
12
First, how can we know what the user wants?
13
That seems ill-defined and might require a bunch of different input.
14
What do we know about the items?
15
What do we know about the user?
16
What about their relationships?
17
Fundamentally, this is an ML problem and I'm going to skip it for now
18
because it's not the thrust of what we want to focus on for this video.
19
But the second item is pressing.
20
How do we make this system scale?
21
If we have billions of videos or trillions of posts, how can we possibly find the one the user actually wants in a reasonable amount of time?
22
This seems like an especially hard needle in a haystack problem, and it is.
23
But this isn't about making machine learning models run fast.
24
There's more to it.
25
Let me illustrate the problem quickly for video recommendations and then we'll move on to some solutions.
26
If you were to approach this problem, you might start with a blackbox ml function, which takes a user and a video and tells me how likely the user is to watch the video.
27
In this case, my black box outputs a score after several milliseconds.
28
This is an important building block which will tell me that a given user will hate this particular cat video, but love Evan's Ticketmaster breakdown.
29
Great!
30
With this function available, I can now try to make my recommendation system.
31
Let's apply this function to every video in the catalog.
32
This will give us a score for every possible video.
33
We can then sort the scores and return the video which is most likely to be watched.
34
But wait, billions of videos means I need to run through my ML black box billions of times.
35
This means I need a ton of time, maybe two weeks to figure out the best video for them to watch.
36
Crap, that's not going to work.
37
Since this is really slow, maybe we take it offline.
38
Let's pre-calculate our recommendations for each user and then when they come online we can feed them out of a cache.
39
Easy, right?
40
No, if we have billions of items and billions of users, suddenly we need a data center the size of Texas in order to make recommendations.
41
This is untenable and it's slow.
42
I don't want to wait two weeks after I register for my TikTok videos to start streaming in.
43
Okay, okay, you get the gist.
44
So we need to do a little trickery here and the naive approach won't work.
45
Modern recommendation systems really have three stages.
46
Candidate generation, ranking and re-ranking.
47
What we've been talking about so far is ranking.
48
Taking a bunch of videos and applying an ML model to score them, which results in an ordering for us to return to our clients.
49
But ranking can't really scale to billions of possibilities, as we've just seen.
50
It's just too time consuming and resource intensive.
51
We need a better way.
52
Enter candidate generation.
53
Candidate generation is a simple idea.
54
We know some classes of videos are much more likely to be watched than others.
55
As an example, if I'm subscribed to MrBeast, it's likely that I'm going to watch other videos he creates.
56
Similarly, the most viewed videos on the platform have very broad appeal.
57
If you wanted a dead simple recommendation system, you'd just take the top videos in the platform and feed those to users on a loop.
58
That's still how radio works today.
59
But we can do a bit better now that we have our ranker.
60
We'll take each of these heuristics that we just talked about and call them candidate generators.
61
A candidate generator will take in some information about the user to generate a list of candidates
62
or videos we think the user will want to watch.
63
We can union together all of the candidates from each of the candidate generators.
64
Then we'll take our ML function we had earlier, which we now call a Ranker, to score each of these candidates.
65
Since we now have order a thousand rather than a billion items, this is much more tractable.
66
The videos that emerge with the highest scores are the ones that we want to recommend.
67
And as long as our candidate generators are reasonably exhaustive, this approximates the much more expensive system.
68
I'll say it again for emphasis here.
69
we're taking some heuristics to cut the problem down and make it more feasible.
70
We don't have to rank every video ever to get good results.
71
That's the essence of candidate generation.
72
Before we move on, there's one other type of candidate generator which is worth discussing.
73
The top videos on the platform or videos from channels I've subscribed to are pretty easy to get.
74
We can do this with basic database queries.
75
But how can I build candidate generators for things like a video similar to the one I just liked
76
or videos watched by users like me?
77
The answer to this is to use what are called embeddings or vector of numbers.
78
I'm going to simplify a bit and invoke the black box of ML here.
79
But let's pretend we have a function which takes in an input, in this case a video, and outputs an embedding or a series of numbers.
80
These numbers are special in that videos with smaller distance, you could think of this like distance in 3D space here, have some property.
81
It could be that we've trained our model, our black box, so that videos which are liked by similar users are clustered together.
82
Or we could try to group them semantically based on their content, like I've done here.
83
Or we could try to find videos which irritated the same people, the options are literally What we can see is that the cat video and dog video have smaller distance.
84
If you calculate the Euclidean distance in 3D space, then the cat video and a chess match,
85
they aren't as semantically similar as the cat video and the dog video.
86
Just like before, if we want to find the smallest distance, our most naive approach is to calculate the distance between our input video and every other video in the catalog.
87
This is way too slow, but it's going to find the video that is most semantically similar or liked by similar users or whatever.
88
A more efficient way to do this is we can generate embeddings for our entire catalog of videos, including the new ones that are created.
89
Once we have embeddings, we store them in a vector database.
90
Popular options here include commercial offerings like Pinecone or open source solutions like Face or In this case,
91
I want all my videos together with their embeddings in this database.
92
Vector databases are optimized with algorithms like hierarchical navigable small worlds, which enable very fast approximate nearest neighbor search.
93
Basically, they're much, much faster than trying to calculate distances on each item.
94
With my database constructed, I can query it.
95
So for videos similar to the one I just liked,
96
I'll grab the embedding for that video I just liked and query the database for the nearest neighbors of that embedding.
97
This will return to me the IDs of all the videos which have embeddings with small distance to my input.
98
In effect, my database now answers which videos are similar to this one.
99
Those are my candidates, which I can feed to my ranker just like I fed the top 100 most viewed platform videos.
100
I can have separate tables or databases for each style of embedding.
101
So I can have a separate database of users to answer questions about videos liked by users similar to me.
102
It's common inside ranking and recommendation systems to have dozens of these indexes
103
or candidate generators and managing them is an important problem for the software engineers working on these systems.
104
That's candidate generation.
105
Now that we've completed candidate generation and hand-waved past ranking, we'll get to that later, let's talk briefly about re-ranking.
106
There are a lot of behaviors of recommendation systems that we want to tweak.
107
We probably want to give new videos a boost so
108
that they get a chance to get exposure and for us to learn about them.
109
This is fundamental to the trade-off between exploration and exploitation.
110
We not only want to show you the video you're most likely to like, but we also want to expand your horizons a bit.
111
We also want to make sure we're not recommending videos that a user has blocked or they might be sensitive to.
112
Adjusting the full recommendation stack for each of these use cases would be really expensive.
113
If we needed special indexes that don't contain videos from creators the user is blocked, that candidate generator is much less efficient.
114
Instead, in the re-ranking phase, we're going to apply tweaks post hoc.
115
If we need to provide the user with 10 ordered recommendations,
116
our ranking stage might produce 25 and our re-ranking stage can reorder or remove based on business rules,
117
privacy settings, etc. This is actually an implementation of a very common pattern you'll see in real-world system design
118
and it applies to search engines, privacy solutions, ranking systems and more.
119
Sometimes it's easier to design for the 99% case
120
and have a layer to fudge the final results
121
and make them how you want rather than build a system which solves 100% of the problem.
122
I'm going to stop there from going too long.
123
There's obviously a lot more we can get into.
124
Let me know if you want to see more in the comments.
125
But just to recap some key points here, we've covered how a multi-stage architecture, in this case using candidate generation,
126
enables scalability for massive systems and makes seemingly impossible problems possible.
127
Next, we showed how you can use embeddings and vector search to solve fuzzy problems cheaply.
128
And finally, we showed how production systems are often layered with fine-grained adjustments applied at the last level.
129
This makes problems more tractable.
130
I hope you found this video valuable and if you'd like more please subscribe.
131
Otherwise until next time talk to you later.

下載應用

流利口語所需的一切

AI 發音評分逐句打分
音標練習掌握每個音
詞彙學習建立你的詞庫
詞彙遊戲邊玩邊學

同頻道

FOR YOU

推薦影片

你能學到什麼

這段影片不僅能幫你瞭解推薦系統的基本架構,還能提升你的英語口語實用技能。通過模仿影片中的對話,你可以練習清晰表達複雜概念的能力,比如用簡單語言解釋“候選生成”“排序”等技術術語;同時,還能學會自然的口語節奏,像影片中那樣在快速講解時保持邏輯連貫。此外,影片裡大量使用的連線詞(如“但是”“所以”)也能幫助你提升口語的流暢度,讓對話更有層次感。

注意這些發音現象

影片中的口語有不少值得關注的連讀和弱讀現象。比如“trying something new”中,“trying”和“something”之間會發生連讀,聽起來像“tryingsomething”;“a bit different”裡的“a”會弱讀成/ə/,而不是/eɪ/。另外,“it helps you to grow”中的“to”常常會弱讀為/tə/,甚至省略,變成“it helps you grow”。這些發音細節能讓你的口語更接近母語者。

像母語者一樣表達

要模仿影片中說話者的語氣和重音,關鍵在於抓住節奏和強調點。比如在提到“現代推薦系統有三個階段”時,“三個階段”需要重讀,突出重要性;而在解釋“候選生成、排序和重新排序”時,每個術語之間要稍作停頓,讓聽眾清晰理解。此外,說話者在遇到複雜概念時(如“資料中心的大小堪比得克薩斯州”),會放慢語速,並用生動的比喻,這一點也可以借鑑到你的口語練習中。

為什麼這個影片適合影子跟讀?

影子跟讀(shadowspeak)是提高英語發音和口語的有效方法,而這個影片的內容兼具實用性和挑戰性。它包含了技術術語(如“推薦系統”“機器學習模型”)和日常表達,能幫助你同時提升專業詞彙和日常口語能力。影片中的對話節奏適中,適合反覆練習,尤其是其中的邏輯連線詞(如“但是”“所以”“然而”),能讓你學會如何自然地組織語言。無論是備考雅思口語練習,還是日常英語口語練習,這個影片都能為你提供豐富的素材。

通過模仿影片中的發音、節奏和重音,結合影子跟讀的方法,你能在短時間內顯著提高英語口語水平。記得每天堅持練習,逐漸適應母語者的表達習慣,讓你的口語更流利、更自然。

影片中的語法

說話人最常用的結構,並附上影片中的原話:

結構影片中的用法
被動語態 be + 過去分詞 — 強調發生了什麼,而不是誰做的be watched · are called · are liked
現在完成時 have/has + 過去分詞 — 過去發生但與現在仍有關聯的事we've just seen · I've subscribed · we've trained
定語從句 who / which + 從句 — 補充說明人或事物block which will · video which is · generator which is

什麼是跟讀法?

跟讀法 (Shadowing) 是一種有科學依據的語言學習技巧,最初開發用於專業口譯員的培訓,並由多語言者Alexander Arguelles博士普及。這個方法簡單而強大:您在聽英語母語原聲的同時立即大聲重複——就像是一個延遲1-2秒緊跟說話者的影子。與被動聽力或語法練習不同,跟讀法強迫您的大腦和口腔肌肉同時處理並模模擬實的講話模式。研究表明它能顯著提高發音準確性,語調,節奏,連讀,聽力理解和口語流利度——使其成為雅思口語備考和真實英語交流最有效的方法之一。

影子跟讀法: 閱讀完整分步指南 →