Capacity Planning
Build the suggestion service behind a search box. As a user types a prefix, the service
returns the top few completions of that prefix, ranked by how popular each completion is.
A user typing car should see cardigan, car rental, cards — the most-searched
continuations, not a random match.
In scope: returning the top-K completions of a prefix, ranking them by popularity, and ingesting the search and click signals that popularity is built from. Out of scope: the full search results page, the search engine that answers the chosen query, spell correction, and per-user personalization. Those last two return as variants at the end.
K and top-K. K is the size of the suggestion list — usually 5 to 10. "Top-K" means the K highest-ranked completions of a prefix, e.g. the 10 most-searched queries that start with
car.
What a strong answer sounds like
State the decision, connect it to a requirement, and name the tradeoff. Keep the design focused on the workload in the prompt.
The AI interviewer asks about this part of Design Typeahead / Autocomplete. The interviewer guides you through topics one by one.