Shadowing-Übung: Recommendation System Infra Basics 1 - Englisch Sprechen Lernen mit Video

Lektion wird erstellt...
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.

Kontext und Hintergrund

Das Video beschäftigt sich mit den Grundlagen der Architektur von Empfehlungssystemen, die in modernen Plattformen wie YouTube, E-Commerce-Seiten oder sozialen Medien verwendet werden. Der Sprecher erklärt, dass es sich nicht um ein Machine-Learning-fokussiertes Video handelt, sondern um die Software-Engineering-Seite. Das zentrale Problem: Wie man Empfehlungssysteme skalierbar gestaltet, um billionen von Items (z. B. Videos, Produkte) für Benutzer*innen in kurzer Zeit auszuwählen.

Top 5 Phrasen für den täglichen Sprachgebrauch

  • "This is a bit different than..." – Nützlich, um Unterschiede zu beschreiben. Beispiel: "Dieses Video ist ein bisschen anders als unsere längeren Tutorials."
  • "Let us know what you think..." – Perfekt für Feedback einzuholen. Beispiel: "Lasst uns wissen, was ihr denkt, ob wir mehr solcher Inhalte machen sollten."
  • "Just to be clear..." – Hilfreich, um Missverständnisse zu vermeiden. Beispiel: "Um es klar zu stellen: Wir konzentrieren uns hier auf die Software-Engineering-Seite."
  • "You get the gist..." – Um auszudrücken, dass der Kern verstanden wurde. Beispiel: "Ihr versteht den Kern: Die naive Herangehensweise funktioniert nicht."
  • "It's just too time consuming..." – Um auf Zeit- oder Ressourcenprobleme hinzuweisen. Beispiel: "Es ist einfach zu zeitaufwendig, um billionen von Möglichkeiten zu verarbeiten."

Schritt-für-Schritt-Shadowing-Anleitung

Shadowing (auch "shadow speech" oder "shadowspeak" genannt) ist eine effektive Methode, um Englisch sprechen zu üben. Hier ist, wie du das Video optimal nutzt:

Schritt 1: Höre zu und analysiere die Rhythmus

Spiele den ersten 30 Sekunden-Abschnitt des Videos ab. Achte auf die Betonung und die Pausen. Wiederhole die Sätze langsam nach, um den Rhythmus zu kopieren. Konzentriere dich auf Phrasen wie "Hey everyone, we're trying something new..." – beachte, wie "trying something new" flüssig gesprochen wird.

Schritt 2: Fokussiere auf Schlüsselbegriffe

Wähle Abschnitte mit technischen Begriffen wie "Empfehlungssysteme", "Skalierbarkeit" oder "ML-Modell". Wiederhole diese Begriffe nach, um die Aussprache zu üben. Nutze Sätze wie "Modern recommendation systems really have three stages" – sage "stages" langsam und deutlich, um die Aussprache zu verinnerlichen.

Schritt 3: Übe die intonation

Achte auf die Intonation in Fragen oder Betonungen. Zum Beispiel: "But wait, billions of videos means I need to run through my ML black box billions of times." Die Frage "But wait?" hat eine steigende Intonation – kopiere dies, um die Emphase zu verstehen.

Schritt 4: Kombiniere Hören und Sprechen

Spiele den gesamten Abschnitt über die drei Stufen (Candidate generation, ranking, re-ranking) ab. Pausiere nach jedem Satz und wiederhole ihn sofort nach. Versuche, die Geschwindigkeit und die Flüssigkeit des Sprechers nachzuahmen. Das hilft dir, "shadowing site"-Übungen zu vertiefen und dein Englisch sprechen zu verbessern.

Durch diese Schritte trainierst du nicht nur die Aussprache, sondern auch das Verständnis von komplexen Inhalten – ideal für alle, die Englisch in technischen Kontexten üben wollen.

Was ist die Shadowing-Technik?

Shadowing ist eine wissenschaftlich fundierte Sprachlerntechnik, die ursprünglich für die professionelle Dolmetscherausbildung entwickelt und durch den Polyglotten Dr. Alexander Arguelles populär gemacht wurde. Die Methode ist einfach aber wirkungsvoll: Du hörst englisches Audio von Muttersprachlern und wiederholst es sofort laut — wie ein Schatten, der dem Sprecher mit nur 1–2 Sekunden Verzögerung folgt. Anders als passives Hören oder Grammatikübungen zwingt Shadowing dein Gehirn und deine Mundmuskulatur, gleichzeitig echte Sprachmuster zu verarbeiten und zu reproduzieren. Studien zeigen, dass es Aussprachegenauigkeit, Intonation, Rhythmus, verbundene Sprache, Hörverständnis und Sprechflüssigkeit signifikant verbessert — was es zu einer der effektivsten Methoden für die IELTS Speaking-Vorbereitung und reale englische Kommunikation macht.

Shadowing-Technik: die vollständige Schritt-für-Schritt-Anleitung lesen →