Layer 3 · Go deeper · 8 min
Go deeper
Size it, build it, then make the calls an interviewer will push you on.
Back of the envelope
Size it up
Tap through each step of the arithmetic.
Judges mark 400 products relevant; the engine returns 500. Precision and recall?
Hybrid search: B ranks 2nd and 1st, A 1st and 3rd. Which wins?
Build-up · 7 steps
Pick the machinery, one question at a time
A real search box blends several kinds. Ask these questions in order and each answer names its machinery, then decide whether precision or recall matters more.
Step 1 of 7
Does the user know the key?
Product P-48213 has one right answer, or none. A B-tree over Bazaar’s 50 million products is about four levels deep, so a lookup is four page reads, mostly from memory.
4 interview moments
You’re the candidate
The interviewer pushes on the hard parts. Pick an approach and see how it holds up.
Deep dive 1 of 4
Interviewer
“Bazaar needs order history and product search over 50 million products. Where does each one run?”
Your move. Pick an approach:
Deep dive 2 of 4
Interviewer
“Bazaar shoppers type “kurtha”, “panir” and “chapal” and see empty pages. How do you forgive typos?”
Your move. Pick an approach:
Deep dive 3 of 4
Interviewer
“In an incident, engineers paste fragments like ullPointerExcep and user_id=48213 into log search. Which machinery do you use?”
Your move. Pick an approach:
Deep dive 4 of 4
Interviewer
“Shoppers type “light office wear for May” and BM25 finds little. How do you add semantic search?”
Your move. Pick an approach: