32/39
Part 6 of 6 · Trade-offs, reviews and evaluationLearn and do

Presenting a trade-off and taking pushback

Every design round makes you choose between options, and the interviewer will push back on your choice.

A choice has four parts

Here is one choice, made for a billion vectors of 256 numbers.

An index for a billion vectors of 256 numbersMemoryWhy
HNSW~1.3 TBevery full vector, plus its graph
IVF with PQ40 GBthe choice: rescore the top 500 in full
what would change itat 5 million items, a graph, no compression

A choice made well has four parts:

  1. Name two or three real options. Not a straw man next to your favorite.
  2. Name the axis that decides it, with a number. Memory, latency, freshness, cost, label quality.
  3. Choose, for this problem. Say it plainly.
  4. Say what would change your mind.

The table is one such choice. Say it in that order, with the numbers: two options and their memory, the choice, and what would change it.

Airbnb made the IVF call for its own listings, for its own reasons: it found IVF offered the best trade-off between speed and quality (1 source). Reasons that fit your numbers beat a choice copied from a blog.

Pushback comes in three kinds

Interviewers push on purpose. One OpenAI candidate described a deep dive where, whatever they had said, the interviewers grabbed onto it and kept pushing further (1 report).

  • A new constraint. What if p99 has to be 50 ms? Accept it, and redesign the piece it breaks: Then the heavy model can't run per request. I'd precompute its scores offline and serve a small model online.
  • A test of conviction. Are you sure about that? Recheck the assumption out loud. If it holds, hold your position and show the number: The index is 40 GB. It fits with room to spare, so I'll keep it on one machine and replicate.
  • A real flaw. They've spotted something you missed. Say so in one sentence, and fix it: You're right, the retries would double the load during an outage. I'd add a retry budget.

Folding at the first question reads as having no reasons. Defending a broken idea reads as not listening. The move between them is to separate the assumption from the conclusion: If that's true, then X changes and Y doesn't.

In the editor, write missing_parts(choice). A choice is a dict with the keys options, axis, number, choice and change: the four parts, with the axis and its number kept apart. Return the names of the parts it leaves out, in order, from "options", "axis with a number", "choice" and "what would change it". One option counts as missing, and so does an axis with no number.