Skip to main content

Classic design · Senior

People You May Know

Classic interview design. Key points: link prediction, GNN, friends of friends, batch precomputation, and fairness.

16 min read · Content reviewed on October 23, 2026

Short answer

Classic interview design. Key points: link prediction, GNN, friends of friends, batch precomputation, and fairness. The goal of PYMK is to help members connect with people who may be relevant additions to their professional network. The feature is old on the platform and is driven by some of the company's earliest ML algorithms.

01 · CONTEXT

Suggesting people worth connecting with

The goal of PYMK is to help members connect with people who may be relevant additions to their professional network. The feature is old on the platform and is driven by some of the company's earliest ML algorithms.

A connection only forms after the invitation is accepted. That is why the source says you must ensure both members benefit from the connection, not just the one who sends the invitation.

02 · SCORING

Scoring pairs and sorting by P(connect)

PYMK extracts attributes from the Economic Graph and from interactions on the platform and uses ML algorithms to generate recommendations. The model combines linear and nonlinear approaches to estimate the propensity to connect between two members.

  1. The diagram starts with the member and the recommendation service they query.

    Architecture diagram: PYMK: scoring and re-ranking
    CLMembro
    CPPYMK service
    CPP(connect) model
    DBGraph and interaction signals
    CPRe-ranker
    CHInvitations received
  2. The model estimates the connection propensity between two members, with attributes extracted from the Economic Graph and from interactions on the platform.

    Architecture diagram: PYMK: scoring and re-ranking
    CLMembro
    CPPYMK service
    CPP(connect) modelpropensity
    DBGraph and interaction signals
    CPRe-ranker
    CHInvitations received
  3. The propensity becomes a P(connect) score, and the list of new connections follows the order of that score.

    Architecture diagram: PYMK: scoring and re-ranking
    CLMembro
    CPPYMK service
    CPP(connect) modelP(connect)
    DBGraph and interaction signals
    CPRe-ranker
    CHInvitations received

03 · POPULAR RECIPIENTS

When the recommended person receives too many invitations

Some members, such as influencers, executives, and recruiters at large companies, receive many connection requests. A member flooded with invitations may miss relevant networking opportunities.

The fix was to add a re-ranker on top of the P(connect) score that discounts the score of recipients with too many invitations. The more invitations a recipient receives, the higher the original score must be for them to appear in the results.

  1. The re-ranker sits on top of the P(connect) score and discounts the score of recipients with too many invitations.

    Architecture diagram: PYMK: scoring and re-ranking
    CLMembro
    CPPYMK service
    CPP(connect) model
    DBGraph and interaction signals
    CPRe-rankerdesconto
    CHInvitations received
  2. The new score is the score times a decay factor df in the range [0,1].

    Architecture diagram: PYMK: scoring and re-ranking
    CLMembro
    CPPYMK service
    CPP(connect) model
    DBGraph and interaction signals
    CPRe-rankerscore x df
    CHInvitations received
  3. In production, the factor comes from a piecewise linear function applied to the number of invitations received.

    Architecture diagram: PYMK: scoring and re-ranking
    CLMembro
    CPPYMK service
    CPP(connect) model
    DBGraph and interaction signals
    CPRe-ranker
    CHInvitations received

In the source's example, the discount applies to anyone who received more than 10 invitations in the previous week.

04 · MEASUREMENT

Measuring the effect on both sides of the invitation

In A/B tests, members are randomly assigned to treatment groups and see recommendations from different models. If a model recommends better, members send more invitations, and this sender-side effect comes straight out of the test.

  1. The diagram starts with the sender, who receives suggestions from the recommendation service.

    Architecture diagram: PYMK: A/B test and attribution
    CLRemetente
    CPPYMK service
    CLRecipient
    QInvitation and session events
    CPSession attribution
    NWA/B test metrics
  2. Each member is randomly assigned to a treatment group and sees recommendations from different models.

    Architecture diagram: PYMK: A/B test and attribution
    CLRemetente
    CPPYMK servicetreatment groups
    CLRecipient
    QInvitation and session events
    CPSession attribution
    NWA/B test metrics
  3. The sender-side effect, more invitations sent, comes straight out of the A/B test result.

    Architecture diagram: PYMK: A/B test and attribution
    CLRemetenteinvitations sent
    CPPYMK service
    CLRecipient
    QInvitation and session events
    CPSession attribution
    NWA/B test metrics
  4. The recipient-side effect is harder to measure, because a recipient may receive invitations from several senders.

    Architecture diagram: PYMK: A/B test and attribution
    CLRemetente
    CPPYMK service
    CLRecipientseveral senders
    QInvitation and session events
    CPSession attribution
    NWA/B test metrics
  5. The attribution framework links recipients' sessions to the correct senders.

    Architecture diagram: PYMK: A/B test and attribution
    CLRemetente
    CPPYMK service
    CLRecipient
    QInvitation and session events
    CPSession attributionattribution
    NWA/B test metrics

Traditional metrics such as invitations sent were expected to fall, but there was a net engagement gain. The table summarizes what the source reports for the discount by invitations received.

MetricReported result
Overloaded recipients50% reduction
Connection requests sent1% drop
Recipient-side sessions1% increase
Sender-side sessionsNeutral impact

05 · FAIRNESS

The cycle that favors those already active

Frequent members tend to be more represented in the training data than infrequent members. They are recommended to others at a higher rate and thus make even more connections and gain even more representation in the training data.

The source argues, intuitively, that a member with few connections may get more incremental utility from adding a connection than a member with hundreds or thousands.

  1. The diagram starts with the two groups of members and the service that returns the suggestion list.

    Architecture diagram: PYMK: training cycle and fairness
    CLFrequent members
    CLInfrequent members
    CPPYMK service
    CPFairness re-ranker
    QInvitations and acceptances
    DBTraining data
    CPP(connect) model
  2. Frequent members are recommended to others at a higher rate, make even more connections, and gain even more representation in the training data.

    Architecture diagram: PYMK: training cycle and fairness
    CLFrequent membersmore represented
    CLInfrequent members
    CPPYMK service
    CPFairness re-ranker
    QInvitations and acceptances
    DBTraining data
    CPP(connect) model
  3. A fairness re-ranker reorders the suggestions according to equality of opportunity and equalized odds, giving equal representation to qualified members of both groups.

    Architecture diagram: PYMK: training cycle and fairness
    CLFrequent members
    CLInfrequent members
    CPPYMK service
    CPFairness re-rankerequidade
    QInvitations and acceptances
    DBTraining data
    CPP(connect) model
  4. The reported result is a 5.44% increase in invitations sent to infrequent members and a 4.8% increase in connections made by them, with neutral metrics for frequent members.

    Architecture diagram: PYMK: training cycle and fairness
    CLFrequent membersneutro
    CLInfrequent membersinvitations and connections
    CPPYMK service
    CPFairness re-ranker
    QInvitations and acceptances
    DBTraining data
    CPP(connect) model

06 · TO PRACTICE

What a complete design still needs to decide

This case focuses on scoring, re-ranking, and measurement. A complete interview design still needs an earlier step that generates the candidates, and a split between what is computed before the request and what is computed on the spot.

Frequently asked questions

What is People You May Know?

Classic interview design. Key points: link prediction, GNN, friends of friends, batch precomputation, and fairness.

What does the People You May Know design cover?

It is organized in these sections: Suggesting people worth connecting with, Scoring pairs and sorting by P(connect), When the recommended person receives too many invitations, Measuring the effect on both sides of the invitation, The cycle that favors those already active, and What a complete design still needs to decide.

How long is People You May Know and what level is it?

It takes about 16 minutes to read and is rated Senior level.

Now design it yourself

Run this case as an interview in the System Design school: you make the decisions, the tutor challenges them and you see how your design scores.