Dataford
Interview QuestionsInterview GuidesExperiencesCoaching
New
Pricing
Get started
Dataford
Popular roles
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Browse
Browse All RolesEvery role hub, from analyst to MLBrowse All CompaniesCompany-specific interview loopsAll Interview GuidesThe full guide library
Top questions by role
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Top questions by skill
SQLPythonStatisticsMachine LearningA/B TestingSystem DesignGenerative AIProduct SenseMetricsBehavioral
Browse all questions →Try a mock interview
Experiences
Practice
Mock InterviewsTimed interview simulations with feedbackCoaching1:1 coaching with people at your target companiesSuccess PathYour 6-week structured planModulesCurated lessons by topicWebinarsTalks from ex-Big Tech data leadsPlaygroundA free-form scratch editor
Learn
BlogInterview strategy and career adviceTech Job Market ReportHiring trends across data and AI rolesFor UniversitiesDataford for career centersAbout DatafordWho we are and how we build
Pricing
Build my plan

Choose Retrieval vs Ranking Stack

HardSystem Design00:00
Practice interviewer
In session
5 left
00:00

Your question is Choose Retrieval vs Ranking Stack. Take a moment with it on the right.

Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).

You need to log in / sign up to chat or submit.

Problem

Product Context

ShopNow is a large e-commerce marketplace with a personalized home feed and search result page. The team is debating whether to introduce a two-tower retrieval model or continue scaling a more traditional learning-to-rank stack built on hand-engineered candidate generation and a pointwise ranker.

Scale

SignalValue
DAU45M
Peak recommendation/search QPS180K
Active catalog120M SKUs
New or updated items/day4M
Candidates scored today~3K per request
End-to-end p99 latency budget150ms

Task

Design the end-to-end recommendation/ranking system and explain when you would choose a two-tower model vs a traditional ranking approach for this product.

  1. Clarify the product objective and define success metrics for home feed and search-like surfaces.
  2. Propose a multi-stage architecture, including candidate generation, ranking, and optional re-ranking, and explain where a two-tower model fits.
  3. Compare at least two design options: (a) traditional retrieval + ranker and (b) learned two-tower retrieval + downstream ranker. State the tradeoffs in recall, latency, freshness, cost, and maintainability.
  4. Design the training and serving stack, including online vs batch features, feature store usage, index refresh, and fallback behavior.
  5. Define offline and online evaluation, including how you would detect if retrieval improves recall but hurts business metrics downstream.
  6. Identify key failure modes such as feature drift, training-serving skew, cold start, and stale embeddings, with mitigations.

Constraints

  • New items must become eligible for recommendation within 10 minutes of catalog ingestion.
  • 35% of traffic comes from anonymous or weak-history users.
  • Serving cost must stay under $0.001 per request at peak.
  • Some seller and pricing features are restricted and can only be used in aggregated form for compliance reasons.
  • The system must support both personalized browsing and high-intent query sessions without maintaining separate infrastructure unless clearly justified.