PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Machine Learning/Etsy

Design ML ranking for query suggestions

Last updated: May 20, 2026

Quick Overview

This question evaluates a candidate's competency in designing a production-grade machine learning ranking system for re-ranking autocomplete suggestions, encompassing label definition for long-term success, counterfactual bias correction, feature engineering (including multilingual and Unicode handling), model selection, serving constraints, and evaluation strategies. It is commonly asked in the Machine Learning domain to assess practical application-level understanding of offline/online evaluation, bias mitigation, latency and memory trade-offs, and robustness to feedback loops and distributional drift.

  • hard
  • Etsy
  • Machine Learning
  • Data Scientist

Design ML ranking for query suggestions

Company: Etsy

Role: Data Scientist

Category: Machine Learning

Difficulty: hard

Interview Round: Technical Screen

Given query/click logs with fields {user_id, timestamp, locale, device, typed_prefix, suggested_term, position, clicked, dwell_time, downstream_query, eventual_success}, design an ML system to re-rank candidate suggestions for each prefix. Specify: (1) label(s) that best reflect long-term user success (e.g., success within session vs. click) and how to create time-respecting train/validation splits to avoid leakage; (2) how you will correct position/selection bias (e.g., counterfactual logging, inverse propensity weighting, randomized interleaving); (3) feature sets (contextual, lexical, popularity time series, embeddings/LM semantics) and how to handle multilingual text and Unicode normalization; (4) model class and serving constraints (latency/memory) and a fallback for cold-start terms/users; (5) strategies to limit feedback loops, drift, and unsafe/low-quality suggestions; and (6) an offline/online evaluation plan with rollback criteria.

Quick Answer: This question evaluates a candidate's competency in designing a production-grade machine learning ranking system for re-ranking autocomplete suggestions, encompassing label definition for long-term success, counterfactual bias correction, feature engineering (including multilingual and Unicode handling), model selection, serving constraints, and evaluation strategies. It is commonly asked in the Machine Learning domain to assess practical application-level understanding of offline/online evaluation, bias mitigation, latency and memory trade-offs, and robustness to feedback loops and distributional drift.

Etsy logo
Etsy
Oct 13, 2025, 9:49 PM
Data Scientist
Technical Screen
Machine Learning
3
0

Re-rank Query Suggestions for Autocomplete

Context

You are building a re-ranking system for search autocomplete. For each keystroke, a candidate generator proposes suggestions; your job is to re-rank them to maximize user success. You have impression-level logs with fields:

  • user_id, timestamp, locale, device
  • typed_prefix, suggested_term, position (original rank shown)
  • clicked (0/1), dwell_time
  • downstream_query (what the user typed/clicked next)
  • eventual_success (binary indicator of success later in the session)

Assume suggestions are shown as a slate (top K suggestions) each time a prefix changes.

Tasks

Design the ML system and specify:

  1. Labels for training that best reflect long-term user success (e.g., success within session vs. click), and how to create time-respecting train/validation/test splits to avoid leakage.
  2. How you will correct position/selection bias (e.g., counterfactual logging with propensities, inverse propensity weighting, randomized buckets/interleaving, click models).
  3. Feature sets: contextual, lexical/matching, popularity and time series, embeddings/LM semantics; and how to handle multilingual text and Unicode normalization.
  4. Model class, serving constraints (latency/memory), and fallbacks for cold-start terms/users.
  5. Strategies to limit feedback loops, distribution drift, and unsafe/low-quality suggestions.
  6. Offline and online evaluation plan, including rollback criteria.

Solution

Show

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Machine Learning•More Etsy•More Data Scientist•Etsy Data Scientist•Etsy Machine Learning•Data Scientist Machine Learning
PracHub

Master your tech interviews with 8,000+ 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.