Design AI-Powered Search for an Online Store
The interviewer asksDesign an AI search for an online store with 2 million products, so customers can type things like 'warm waterproof jacket for hiking under $200'.
AI Product EngineerApplied AI PMForward Deployed Engineer (secondary)CoreSystem design roundRepresentative15–20 min
On this page
The 30-second version
- Latency matters: search must feel instant.
- Use the model to understand the query: turn it into filters (price, waterproof) and a search phrase.
- Retrieve with hybrid search over product data; apply filters; rerank top results.
- Cache common queries; use a small fast model for query understanding.
- Measure offline relevance on labelled queries and online conversion and refinement rates.
What it's really testing
- Search design with LLMs
- Latency budgets
- Relevance evaluation
How to structure your answer
- Requirements.
- Query understanding.
- Retrieval and ranking.
- Latency.
- Measurement.
The interview, played out
- InterviewerDesign an AI search for an online store with 2 million products, for queries like "warm waterproof jacket for hiking under $200".
- CandidateHow fast must results appear, and how is search quality measured today?
- Revealed when askedUnder half a second; they track clicks and purchases from search.
- CandidateHalf a second rules out a big model writing results. So use a small, fast model just to understand the query: extract filters, price under $200, waterproof, category jackets, and a search phrase, "warm hiking jacket".
- Strong moveKeeps the model to the part where it adds most, within the latency budget.
- CandidateThen hybrid search over product titles, descriptions and attributes, apply the filters, and rerank the top hundred with a ranking model that uses popularity and relevance.
- CandidateCache the understanding of common queries; most search traffic repeats.
- InterviewerHow do you know it's better than keyword search?
- CandidateOffline: a set of real queries with labelled relevant products, comparing top results. Online: an A/B test on purchases from search and how often people rephrase.
The strong answer, distilled
- Budget: under 0.5 s.
- Query understanding: small model extracts filters and a search phrase; cached for common queries.
- Retrieval: hybrid search, filters, reranking of top results.
- Measurement: offline relevance on labelled queries; online A/B on purchases and rephrasing.
This is one strong answer, not the only one.
How it's scored
| Dimension | Weak (2) | Passable (3) | Strong (5) |
|---|---|---|---|
| Latency | Ignored | Mentioned | Drives the design |
| Design | LLMLarge language model. A model trained to predict the next token of text, used to generate and reason over language. Read the full explanation answers everything | Embeddings search | Query understanding, hybrid retrieval, reranking |
| Measurement | None | Clicks | Offline relevance and online A/B |
Round scorecard: FDE: AI system design round, filled in for the mock candidate
| Dimension | Weak | Passable | Strong | The mock candidate |
|---|---|---|---|---|
| Requirements | Assumes them. | Asks about scale. | Users, data, scale, latency, cost and risk, before drawing anything. | Strong. Asked about latency and how results are judged today. |
| Architecture | One component. | A reasonable flow. | Full skeleton, then depth on the parts this system depends on. | Strong. Query understanding into filters, hybrid retrieval, reranking. |
| Quality and evals | None. | Mentions testing. | Evals per component and end to end, and how they're built. | Strong. Offline relevance labels and online conversion. |
| Failure and cost | Ignored. | Mentions one. | Fallbacks, guardrails, latency and cost levers, tied to requirements. | Strong. Kept the model off the hot path where possible; caching. |
How the answer changes by role
| Role | What to emphasise |
|---|---|
| AI Product Engineer | Pipeline and latency |
| Applied AI PMProduct Manager. Decides what a product should do, for whom, and why. Read the full explanation | Search experience and A/B design |
| Forward Deployed EngineerForward Deployed Engineer. An engineer embedded with customers who scopes, builds and ships AI solutions into production. Read the full explanation | Adapting to a retailer's catalogue |
Common mistakes
- A large model on every search
- Ignoring structured filters like price
- No baseline comparison
More follow-ups to practise
- "Product data is messy." Hint: enrich attributes offline with a model.
- "Users want a chat-style shopping assistant." Hint: a separate, slower surface.
Go deeper
- Module: AI system design
- Framework: AI System Design Framework
- Framework: Opening Any Interview Answer
- Lesson: The shape of an AI system
- Lesson: Designing for latency and cost
- Also tests: RAG and retrieval
- Also tests: AI numbers: serving, cost and latency
Sources
Representative question: written to match system design rounds for AI product roles, not a specific reported interview.