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
Machine Learning
Machine Learning Engineer
Amazon
November 29, 2026
Machine Learning Engineer
Onsite
Machine Learning
Hard

0

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
Retrieval-augmented generation
Hybrid retrieval
Reranking
Hallucination
Faithfulness evaluation
How to Approach This
  1. Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
  2. Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
  3. Feature engineering is often more impactful than model selection.
  4. Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
  5. 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 Prep
Sample 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
  1. Index each source as chunks with metadata (source type, date, helpful votes). Structured attributes become short text facts.
  2. Retrieve top 50 with BM25 plus a dense embedding retriever, then rera...

Submit Your Answer
Markdown supported