SevyDevy

Design people you may know

PremiumML systemMedium

  • Link prediction
  • Friends of friends
  • Graph features

Quick answer

This ML system interview question asks you to design people you may know. Aim for a design that turns data into useful predictions in production, then explain the data, training, serving and monitoring. Interviewers want to see how you frame the problem, measure success and keep the model healthy after launch.

The problem

Design People You May Know, the friend suggestion feature in social networks like Facebook and LinkedIn: suggest people a user knows and will connect with. The hard parts are a huge graph where friends-of-friends explode in number, optimising for accepted requests rather than sent ones, and never revealing private information through a suggestion.

Suggestions appear in a module on the home page and on the friends tab. Each shows a reason, such as "12 mutual friends". A user can send a request, remove the suggestion or ignore it.

What must the system do?

  • Suggestions: Return the top 20 people for a user, each with a short reason.
  • Fresh after changes: After a user adds a friend, new suggestions from that friend's network appear within 1 hour.
2 more requirementsUnlock to see all

How well must it do it?

  • Privacy: Never use profile views, private messages or location visits as signals; uploaded contacts only with consent.
  • Safety: Never suggest blocked users, and never suggest adults to minors unless they have mutual friends from the same school.
2 more requirementsUnlock to see all

What scale should you design for?

Use these numbers in your estimates.

The scale numbers unlock with this questionUnlock

Key concepts

  • Link prediction
  • Friends of friends
  • Graph features
  • Candidate generation
  • Privacy
  • Feedback loop

How you’ll practise

6 short steps · save and come back any time
  1. Problem framing
  2. Data and labels
  3. Features and model
  4. Training and evaluation
  5. Serving and monitoring
  6. Wrap-up

Lala, personalized to you, gives a hint when you ask and reviews your design when you are ready.

What do interviewers look for?

In any ML system design round.

  • Frames the product goal as a clear ML problem
  • Defines offline and online success metrics
  • Explains where the data and labels come from
  • Separates training from serving and keeps features consistent
  • Plans for drift, retraining and rollbacks
  • Weighs model quality against latency and cost

Questions people ask about this interview question

Which design type is this question?
It is an ML system question. You design people you may know and explain your choices the way you would in an interview.
Is this question asked at entry level?
It is marked Medium. Entry-level engineers can practise it, but it expects you to reason about requirements and trade-offs, not only list components.
What should I cover first?
Start with the product goal, how success is measured and what data is available. Agree on scope with the interviewer before you design anything.
Can I practise it for free?
It is a premium question. Sign up and unlock it once for 10 credits; it then stays unlocked. When you finish, Lala, your personalized AI mentor, can review your design for 30 credits.

Related questions

Updated · Written by the SevyDevy team

Premium questionSign up free, then unlock it