Learning on Web Dev Open is free for all.

Interview Prep · ML System DesignDesign search ranking
← ML System Design

Design search ranking

Medium45 minFree, no account

Retrieval and ranking are different problems, and relevance has no ground truth.


The question

Design search for a large e-commerce catalogue: a user types a query, they get an ordered list of products.

Say how you would know whether it got better.

Functional
  • Free-text queries, including misspellings and synonyms.
  • Filters and facets applied alongside relevance.
  • Results in under 300ms.
Non-functional
  • 50M products, 10k queries/sec at peak.
  • New products searchable within minutes.
45:00Commit to an answer before you open the solution. Reading it first teaches you to recognise good answers, which is not the skill being tested.

Stuck?

0 of 3 hints taken

The worked solution

written by a person · not a grade

Score yourself

0 of 5 marked
  • Two stages with the right objective for each20
  • Hybrid retrieval with what each half misses20
  • Training signal chosen and position bias confronted25
  • Named interleaving or an equivalently sensitive online method20
  • Segmented evaluation by query frequency15

We run no AI here and nothing on this page grades you. The score is yours, and the useful number is the one you get on the same problem a month from now, cold.

kept in this browser only