Ground a Shopping Assistant's Product Answers With Retrieval
Last updated: November 29, 2026
Quick Overview
Design the ML approach for answering customer questions on a product detail page ('Does this fit a 2019 Honda Civic?') with an LLM, so that answers are grounded in the listing, reviews and Q&A and do not hallucinate.
Amazon
November 29, 20260
0
0 solved
Design the ML approach for answering customer questions on a product detail page ('Does this fit a 2019 Honda Civic?') with an LLM, so that answers are grounded in the listing, reviews and Q&A and do not hallucinate.
Amazon's generative shopping assistant experiences make grounded product answers a high-stakes ML problem: a wrong compatibility answer causes returns and erodes trust. The interviewer probes retrieval quality, prompt grounding, abstention, and evaluation, not just 'use RAG'.
What the Interviewer Expects
- Identify the sources and chunk them sensibly
- Use hybrid retrieval (lexical plus dense) and a reranker
- Constrain generation to cite retrieved evidence
- Add an abstention path when evidence is missing or conflicting
- Define offline and online evaluation, including faithfulness
Key Topics to Cover
How to Approach This
- Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
- Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
- Feature engineering is often more impactful than model selection.
- Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
- Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
- How do you handle seller-provided content that contradicts reviews?
- How would you evaluate faithfulness at scale without humans on every answer?
- What changes for questions comparing two products?
- How do you keep latency under one or two seconds?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Explore ML Interview PrepSample Answer
Clarify
Sources: structured attributes (dimensions, compatibility tables), title and bullets, the description, reviews, and community Q&A. Ask latency budget, whether answers must cite sources, and the policy...
Approach
- Index each source as chunks with metadata (source type, date, helpful votes). Structured attributes become short text facts.
- Retrieve top 50 with BM25 plus a dense embedding retriever, then rera...