PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/ML System Design/Snapchat

Design real-time top-K POI retrieval on maps

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's ability to design scalable, low-latency real-time retrieval and personalized ranking systems for geospatial data, testing competencies in spatial indexing and tiling, candidate generation versus re-ranking pipelines, caching and freshness strategies, latency and availability SLOs, deduplication and pagination, and model/ANN decision-making; the domain is ML system design for map-based POI retrieval and it assesses both high-level architectural reasoning and practical engineering trade-offs. Such problems are commonly asked to assess how an engineer balances consistency, stability and freshness under strict latency and availability targets while reasoning about operational concerns like load shedding, offline versus online evaluation, instrumentation and cost.

  • hard
  • Snapchat
  • ML System Design
  • Machine Learning Engineer

Design real-time top-K POI retrieval on maps

Company: Snapchat

Role: Machine Learning Engineer

Category: ML System Design

Difficulty: hard

Interview Round: Onsite

Design a real-time system to show the top-K points of interest (POIs) within a user’s current map viewport as they freely pan and zoom. Specify: functional and latency requirements (e.g., p95 <150 ms end-to-end), architecture (client, edge, and backend services), spatial indexing and tiling strategy (e.g., geohash, quadtrees, R-trees), candidate generation (range queries, cell unions), retrieval vs. re-ranking pipeline, caching at client/edge (tile- or viewport-level), freshness and incremental updates, and metrics. Discuss when to use approximate nearest neighbor search for candidate retrieval versus a learned ranking model for ordering; outline decision criteria (latency, recall, data sparsity, personalization) and how to combine ANN prefiltering with model-based re-ranking. Cover load shedding, pagination while panning, deduplication across tiles, cold start, evaluation (offline vs. online), and cost considerations.

Quick Answer: This question evaluates a candidate's ability to design scalable, low-latency real-time retrieval and personalized ranking systems for geospatial data, testing competencies in spatial indexing and tiling, candidate generation versus re-ranking pipelines, caching and freshness strategies, latency and availability SLOs, deduplication and pagination, and model/ANN decision-making; the domain is ML system design for map-based POI retrieval and it assesses both high-level architectural reasoning and practical engineering trade-offs. Such problems are commonly asked to assess how an engineer balances consistency, stability and freshness under strict latency and availability targets while reasoning about operational concerns like load shedding, offline versus online evaluation, instrumentation and cost.

Related Interview Questions

  • Design User Embedding Semantic Search - Snapchat (medium)
  • Design a Family-Friendly Listing Classifier - Snapchat (medium)
  • Design a video recommendation system - Snapchat (medium)
  • Design an ads ranking ML system - Snapchat (medium)
  • Design short-video retrieval with sparse text - Snapchat (medium)
Snapchat logo
Snapchat
Sep 6, 2025, 12:00 AM
Machine Learning Engineer
Onsite
ML System Design
4
0

Real-Time Top-K POIs in Viewport: System Design

Context

Design a real-time system for a mobile map that continuously shows the top-K points of interest (POIs) within the user’s current viewport as they pan and zoom. The system must feel instant, remain stable while the viewport moves, and support personalization.

Requirements

Functional

  1. Return top-K POIs for the current viewport rectangle and zoom level, with stable ordering during small pans/zooms.
  2. Support filters (e.g., category, open-now), and pagination/infinite scroll for lists.
  3. Deduplicate POIs across tiles and avoid flicker when moving.
  4. Personalize ordering per user when available; provide sensible defaults for cold start.

Latency/SLOs

  • End-to-end p95 latency < 150 ms (from gesture end to POIs rendered), p99 < 250 ms.
  • Freshness: most POI attribute updates visible within 1–5 minutes; critical updates (closures) < 30 seconds.
  • Availability ≥ 99.9%.

Specify

  • Architecture across client, edge, and backend services.
  • Spatial indexing and tiling strategy (e.g., quadtree/S2, R-tree), cell covering, and range queries.
  • Candidate generation and cell unions.
  • Retrieval vs. re-ranking pipeline.
  • Caching (client/edge): tile-level and viewport-level.
  • Freshness and incremental updates.
  • Metrics (latency, quality, stability, freshness, cost).
  • When to use approximate nearest neighbor (ANN) for retrieval vs. learned models for ranking; decision criteria and hybrid approach.
  • Load shedding, pagination while panning, dedup across tiles, cold start, offline vs. online evaluation, and cost considerations.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More ML System Design•More Snapchat•More Machine Learning Engineer•Snapchat Machine Learning Engineer•Snapchat ML System Design•Machine Learning Engineer ML System Design
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.