Interview with a Google engineer.

Design YouTube Recommendation System

Watch someone solve the design youtube recommendation system problem in an interview with a Google engineer and see the feedback their interviewer left them. Explore this problem and others in our library of interview replays.

Interview Summary

Problem type
Design YouTube Recommendation System

Interview question
Design a machine learning system for YouTube's home feed recommendations that maximizes user engagement through personalized video suggestions. The system must handle 2 billion users and 10 billion videos, serve recommendations within 1 second, and use a two-stage approach with candidate generation and ranking while considering scalability, feature engineering, and model training at massive scale.

Interview Feedback

Feedback about Hyper Taco (the interviewee)
Advance this person to the next round?
Yes

How were their technical skills?
2/4

How was their problem solving ability?
3/4

What about their communication ability?
4/4

Strengths
Strong clarification skills
Asked thoughtful questions early on, helping ground the discussion.
Consideration of fairness and constraints
Brought up factors like fairness and language, showing awareness beyond pure modeling.
Understanding of training data design
Demonstrated a solid grasp of positive vs. negative samples, even though depth could be improved.
Clear communication
Communicated ideas in a structured and easy-to-follow manner.

Areas for Improvement
Lack of strong high-level system thinking
High-level design was not sufficiently structured or comprehensive. Needed a clearer end-to-end view before diving into components.
Missing key product surface distinctions
Did not differentiate between important contexts (e.g., Watch Next vs. Home Feed, long-lived vs. short-lived content), leading to a less tailored solution.
Be more proactive in defining key metrics
Could take more ownership by proposing metrics and discussing trade-offs without relying on prompts.
Drive the discussion more assertively
Relied on interviewer prompts to go deeper; should proactively expand and lead the solution.

Interview Transcript

Hyper Taco: Hello. Hello. Hey, how's it going?
Doctor Malamute: Good, good. Let's get started. So first of all, I want to understand your current status. Yeah, basically like what level are you right now, what level are you interviewing for, and when is the next interview, and what area, by the way.
Hyper Taco: So I'm actually— the reason I picked you is because I'm in terms of [REDACTED] Cloud AI, interviewing at L5, possibility to B down on L4, so between L5 and L4. Ideally L5, but I think it's a long shot, to be honest. Uh, interview is on Monday, uh, again Cloud AI. Uh, yeah, so that, that's about it.

Doctor Malamute: Wait, so it's L4, then you're still holding this machine learning system design interview?
Hyper Taco: Yeah.
Doctor Malamute: Okay, okay.
Hyper Taco: Um, I mean, okay, so I think like the idea is they want to like do the leveling. I think they want, so it's a boomerang. So they're trying to, and I left [REDACTED] as an L4. So I think they want to do the leveling and for this, they're going to do like the ML system design.

Doctor Malamute: Oh, so you worked at [REDACTED] before?
Hyper Taco: Yeah.
Doctor Malamute: So the thing is I was a data scientist. Full disclaimer, was laid off 3 years ago in January 2023. I'm trying to bounce back as a SWE. I passed coding and AI, coding and AI. Now they're just like, [REDACTED] AI System Design Committee.
Doctor Malamute: Oh, cool, cool. Glad to see a [REDACTED]-er here. OK, so let's get started. I think we just do the traditional machine learning system design here.

Hyper Taco: Something I want to flag, sorry if it wasn't clear, was I'm interviewing for L4, maybe L5. So I think like this is going to determine the leveling.
Doctor Malamute: But to be honest, like, I haven't seen upleveling once during my time in [REDACTED]. Like most of the time they say this is like, it can be either— this is probably like some bloody truth, like a recruiter wants you say, oh, we can decide your level during interview. If you do good, uh, we can uplevel you, uh, something like that. But, but it never happened to me before.
Hyper Taco: I see a friend to which it happens, but, uh, I'll take your word for it.

Doctor Malamute: So basically, there are only two major parts. One is the think big. Basically means like you have to have understanding like end-to-end structure, like some high-level perspective. And once the criteria goes higher for the rest of the part is the dive deep. Basically once you finish the high-level design, which basically is just like a connection between components, we will dive deep into certain component.
Hyper Taco: Something I want to flag, sorry if it wasn't clear, was I'm interviewing for L4, maybe L5. So I think like this is going to determine the leveling.
Doctor Malamute: Exactly.

Hyper Taco: So, I mean, I'm going to be eventually essentially evaluated for both L5 and L4 from what I'm understanding.
Doctor Malamute: So let's get started on increasing watch time, increasing engagement. So if we increasing engagement and watch time, I guess we can also place more advertisements, because there's advertisements on YouTube.

High Level Approach
The modeling approach that I want to take is fairly standard in recommendation, and it's called candidate generation and ranking. So the idea is you have a two-step approach. First step is content generation, which selects, let's say, 1,000 or maybe 10,000, something of this ballpark. And then from these 1K videos, you just rank the different videos.

Conclusion

The conversation emphasizes the importance of understanding the high-level design before diving into specific components, highlighting the iterative nature of improving interview techniques and system design knowledge for better performance in future interviews.