Katkat

Design a Work-Together Distance Between Any Two Employees of a Company

GleanMachine Learning Engineer · Onsite

Last updated

Design a learned distance between any two employees of a company that reflects how much they actually work together. Tests ML framing without ground-truth labels, collaboration signals and their normalization, link-prediction training, evaluation, privacy and serving at company scale.

Design a "people distance" d(u1, u2) between any two users in a company that quantifies how much the two of them work together. A smaller distance should mean a closer working relationship. This was a 60-minute ML design round for a machine learning engineer role.

The prompt gives no more detail, so you drive the framing: decide what the distance is for, which signals it can use, how to learn and evaluate it, and how to serve it for every pair of employees.

Clarifying Questions

  • What consumes the distance: ranking search results or documents, people suggestions, expertise finding, or something else? Does the consumer need a true metric (symmetric, satisfying the triangle inequality) or only a ranking score?
  • Which signals is the system permitted to use (org chart, calendar metadata, document co-editing, comments and mentions, chat or email metadata), and is message content off limits?
  • How large are the companies, in employees per customer, and how fresh must the distance be?
  • Should the distance be symmetric, and should recent collaboration count more than old collaboration?

Hints

Hint 1

Define "working together" first: Before choosing a model, list the observable events inside a company that show two people work together, and decide whether you have any labels at all or must build proxy labels.

Hint 2

Evaluating without ground truth: Think about which future behaviour a good distance computed today should predict, and how you would hold that behaviour out in time.

Follow-up questions

  • How do you assign distances for a new hire with no interactions yet?
  • Two people never interact directly, but both work closely with the same third person. How does your design handle that?
  • How do you keep the distance from exposing private relationships, such as a confidential one-on-one or a private channel?
  • After a reorganization, how quickly does your distance adapt, and how would you detect that it has gone stale?