← Glean Interview Insights

Glean·Machine Learning Engineer·Onsite - System Design / Architecture·Senior

Senior
Jun 2026

Summary

Did an ML design round at Glean for an MLE role. One question, 60 minutes, focused entirely on computing employee-to-employee distance. Not a ton to say but it was a solid problem that made me think harder than I expected.

Questions Asked (1)

Q1

Design a system to compute the distance between any two employees in an organization.

System DesignData ModelingTechnical Trade-offs
Author's notes

This sounds like a graph problem at first and I went straight to org chart traversal, but the more we talked the more it became clear they probably wanted something richer than shortest path on a hierarchy tree.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the definition of 'distance' (e.g., graph hops, shortest path, or semantic similarity) and the data sources (org chart, collaboration logs). Then propose a scalable architecture that precomputes distances using graph algorithms or embeddings, and discuss trade-offs between accuracy, latency, and update frequency.

Pro tip: Mention that distance can be multi-dimensional (reporting, collaboration, communication) and that a hybrid approach (graph + embeddings) often works best in practice. Also, emphasize the need for incremental updates to handle organizational changes efficiently.

1. Clarify Requirements

Ask questions to define 'distance' (e.g., shortest path in org chart, collaboration frequency, or embedding similarity) and non-functional requirements like latency, scale, and update frequency.

2. Data Modeling

Identify data sources (HR org chart, email/calendar logs, code commits) and represent employees as nodes in a graph with weighted edges based on relationship strength or hierarchy.

3. Algorithm Selection

Choose algorithms: BFS for unweighted graphs, Dijkstra for weighted, or graph embeddings (e.g., Node2Vec) for approximate distances; consider precomputation for frequent queries.

4. System Architecture

Design a scalable system: graph database (e.g., Neo4j) or distributed graph processing (e.g., GraphX), with caching and incremental updates to handle dynamic org changes.

5. Trade-offs & Evaluation

Discuss trade-offs between exact vs. approximate distances, precomputation vs. on-the-fly, and evaluate using metrics like query latency, accuracy, and update cost.

Key Points to Mention

  • Definition of distance: graph hops, shortest path, or semantic similarity
  • Data sources: org chart, collaboration tools, communication logs
  • Graph algorithms: BFS, Dijkstra, or graph embeddings
  • Scalability: distributed graph processing, caching, incremental updates
  • Trade-offs: accuracy vs. latency, precomputation vs. dynamic computation
  • Evaluation metrics: query latency, accuracy, update frequency

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.