Interview with a Google engineer.
An Interview with a Google engineer
Interview Summary
Problem type
Design a personalized news feed system
Interview question
Case Study :
A news feed is a feature of social network platforms that enable user engagement by showing friends’ recent activities on their timelines.
Many social networks - Facebook, Twitter, and LinkedIn - personalize their news feeds to maintain user engagement.
I want you to design a personalized news feed system.
Assumptions of Safety
- We build only for an American population ( I18N Internationalization is out of scope )
- Your system should be highly scalable.
- You may leverage pre-existing ML technologies, algorithms, and architectures. But we will not discuss them in significant depth for the sake of time.
- Type out your thoughts / explain your thought process
Interview Feedback
Feedback about Fluorescent Torch (the interviewee)
Advance this person to the next round?
Yes
How were their technical skills?
4/4
How was their problem-solving ability?
3/4
What about their communication ability?
4/4
Feedback:
- TC clarified the question strongly.
- TC did well on sections before pipelines: fEng, dataEng
- TC discussed several models and learning strategies: TTNN and MTDNN
(GROWTH AREAS)
- TC can review pipelines/systems portions: data prediction and data generation.
- TC can work on proactively drawing boxes-and-arrows.
- TC can study offline metrics.
Feedback about Purple Brontosaurus (the interviewer)
Would you want to work with this person?
Yes
How excited would you be to work with them?
4/4
How good were the questions?
4/4
How helpful was your interviewer in guiding you to the solution(s)?
4/4
Interview Transcript
Purple Brontosaurus: All right. I really wanted to get started on the case study question. Let me know if you have or have not seen this question before. I've taken this from Alex Zhu's book. It's called the Machine Learning System Design An Insider's guide from chapter 10 on designing out a Personalized Newsfeed.
Fluorescent Torch: I didn't study that one. I read the book, but I literally stopped before this chapter.
Purple Brontosaurus: Yeah, that's fine then. Let's go do this. If you haven't done it, that means that you haven't done this question, so I can quickly read this out for you. So if you're familiar with Newsfeed, it's a social network platform feature that enables user engagement by showing friends' recent activities on their timelines. Many social networks, Facebook, Twitter, and LinkedIn, personalize their news feeds to maintain user engagement. I want you to design a personalized newsfeed system. All right. Does this make sense?
Fluorescent Torch: Yes.
Purple Brontosaurus: Perfect. ...
Fluorescent Torch: Yes, of course. ...
Feature Engineering and Data Engineering
Fluorescent Torch: For that one we need features from both sides and actually three sides. Firstly is user information. We have information about the user's age, user's gender, last time he engaged with this kind of topic, topics he likes to engage with. Secondly, the features about items which are posted in our system. We must have embeddings of those items as well.
Machine Learning Modeling
Fluorescent Torch: In this one, assuming we decided to use the binary classification task, the machine learning model methods I will consider are random forests and deep learning-based models. Random forests are very simple models, easy to implement and interpretable. On the other hand, deep learning has a very high representational learning ability.
Evaluation Metrics
Fluorescent Torch: For offline metrics, we can evaluate rankings with metrics like ROC AUC, NDGC, F1 score, precision, and recall. For online metrics, I will analyze click rate, time spent, and the frequency of returning users.
Conclusion
Fluorescent Torch: I think I did well on question clarification and on the pipelines. Areas to improve include my presentation of the prediction pipeline. Overall, I would rate my performance as a three out of five.