← Amazon Interview Insights

Amazon·Data Scientist·Technical Phone Screen·Senior

Senior
Jun 2026

Summary

Amazon Data Scientist interview that was basically a deep dive into LLM system design. The whole session revolved around one big scenario: building a client chatbot and figuring out the right architecture. More technical than I expected for a DS role, felt closer to an MLE interview.

Questions Asked (6)

Q1

How would you decide between fine-tuning and RAG when building an LLM application for a client?

Technical Trade-offsSystem Design
Author's notes

This was the anchor question for the whole interview.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the client's requirements, including data availability, latency, cost, and accuracy needs. Then compare fine-tuning and RAG across these dimensions, and recommend a hybrid approach if appropriate. Emphasize that the decision should be driven by the specific use case and constraints.

Pro tip: Highlight that RAG is often preferred for dynamic knowledge and quick iteration, while fine-tuning excels at style, format, and domain-specific reasoning. Mention that a hybrid approach can leverage the strengths of both.

1. Understand Requirements

Gather client needs: data volume, update frequency, latency, cost, and accuracy targets. Determine if the task requires external knowledge or just style adaptation.

2. Evaluate Data and Resources

Assess available data for fine-tuning and the infrastructure for RAG (e.g., vector database). Consider computational resources and expertise.

3. Compare Trade-offs

Analyze fine-tuning vs. RAG on dimensions like cost, latency, maintenance, and scalability. Fine-tuning is better for static, domain-specific tasks; RAG for dynamic, knowledge-intensive tasks.

4. Consider Hybrid Approach

Explore combining both: fine-tune for style and reasoning, and use RAG for up-to-date facts. This can offer the best of both worlds.

5. Recommend and Iterate

Propose a solution with clear rationale, and plan for evaluation and iteration based on performance metrics.

Key Points to Mention

  • Data availability and quality for fine-tuning
  • Frequency of knowledge updates and need for real-time information
  • Cost and latency considerations (fine-tuning requires training and hosting; RAG adds retrieval overhead)
  • Task complexity: fine-tuning for style/format, RAG for factual recall
  • Hybrid approaches and when they make sense
  • Evaluation metrics and iterative improvement

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Walk through the different fine-tuning approaches including full fine-tuning, instruction tuning, LoRA, and embedding fine-tuning, and compare them.

Technical Trade-offsAlgorithms & Data Structures
Author's notes

Knew this well enough.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining each fine-tuning approach clearly, then compare them along dimensions like computational cost, memory requirements, performance, and use cases. Use a structured comparison to highlight trade-offs and conclude with guidance on when to use each, tailored to Amazon's scale and production needs.

Pro tip: Emphasize that the choice often depends on the specific task, data availability, and deployment constraints—showing you understand real-world trade-offs beyond just technical definitions. Mention that at Amazon's scale, parameter-efficient methods like LoRA can significantly reduce costs while maintaining performance.

1. Define each approach

Briefly explain full fine-tuning, instruction tuning, LoRA, and embedding fine-tuning, including their core mechanisms and typical use cases.

2. Compare on key dimensions

Discuss computational cost, memory footprint, training time, and performance for each method, highlighting relative advantages and disadvantages.

3. Discuss trade-offs and constraints

Analyze scenarios where each approach excels or falls short, considering factors like dataset size, task specificity, and infrastructure limitations.

4. Provide practical recommendations

Offer guidance on selecting the appropriate method based on business goals, resource availability, and deployment requirements, with examples.

Key Points to Mention

  • Full fine-tuning updates all model parameters, requiring significant compute and memory but can achieve high performance with large datasets.
  • Instruction tuning adapts a pre-trained model to follow instructions, often using a diverse set of tasks, and can be combined with other methods.
  • LoRA (Low-Rank Adaptation) freezes pre-trained weights and injects trainable low-rank matrices, drastically reducing trainable parameters and memory usage.
  • Embedding fine-tuning only updates the embedding layer, useful for domain adaptation but may not capture complex task-specific patterns.
  • Trade-offs include training cost, inference latency, model size, and the risk of catastrophic forgetting.
  • Parameter-efficient methods like LoRA are preferred when compute is limited or when deploying many task-specific models.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

Explain how LoRA works mechanically and what advantages it gives you at inference time.

Technical Trade-offsSystem Design
Author's notes

LoRA was my strongest answer.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by explaining the core mechanism of LoRA: freezing the pre-trained weights and injecting trainable low-rank decomposition matrices into each layer. Then, highlight the inference-time advantages: no additional latency because the low-rank matrices can be merged with the base weights, and reduced memory footprint. Finally, connect these benefits to practical scenarios like deploying multiple adapters efficiently.

Pro tip: Emphasize that LoRA's inference benefits are not just about speed but also about operational flexibility—you can swap adapters for different tasks without reloading the base model, which is crucial for A/B testing or multi-tenant systems.

1. Explain the core mechanism

Describe how LoRA freezes the pre-trained model weights and adds trainable low-rank matrices A and B to approximate weight updates, reducing the number of trainable parameters.

2. Detail the low-rank decomposition

Clarify that for a weight matrix W, the update ΔW is represented as BA, where B and A are much smaller matrices, significantly reducing parameter count.

3. Discuss training implications

Mention that only A and B are trained, which lowers memory and compute requirements during fine-tuning, enabling training on smaller GPUs.

4. Highlight inference advantages

Explain that at inference, the low-rank matrices can be merged into the base weights (W + BA), resulting in no additional latency compared to the original model.

5. Connect to deployment benefits

Emphasize that LoRA enables efficient storage and swapping of multiple task-specific adapters, reducing memory overhead and allowing dynamic task switching.

Key Points to Mention

  • LoRA freezes pre-trained weights and injects trainable low-rank matrices.
  • The low-rank decomposition reduces trainable parameters by orders of magnitude.
  • At inference, LoRA weights can be merged with base weights, eliminating extra latency.
  • Multiple LoRA adapters can be stored and swapped efficiently for different tasks.
  • LoRA reduces GPU memory requirements during both training and inference.
  • LoRA maintains model quality while being parameter-efficient.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

If the documents your RAG system retrieves are consistently low relevance, what would you do to improve retrieval quality?

Root Cause AnalysisSystem Design
Author's notes

Blanked for a second on where to start.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Structure your answer around a systematic root cause analysis: first diagnose whether the issue lies in data, embeddings, or retrieval algorithm, then propose targeted improvements. Emphasize iterative evaluation and metrics to validate changes, aligning with Amazon's data-driven culture.

Pro tip: Mention the importance of establishing a baseline and using A/B testing to measure retrieval improvements, as Amazon values measurable impact. Also, highlight trade-offs between precision and recall, and how you'd prioritize based on business needs.

1. Diagnose the Root Cause

Analyze retrieval logs and relevance scores to identify patterns: are queries poorly formed, documents misindexed, or embeddings inadequate? Segment by query type to isolate issues.

2. Evaluate and Improve Data Quality

Check for noisy, outdated, or missing documents in the corpus. Consider data cleaning, deduplication, and enrichment with metadata to enhance relevance.

3. Optimize Embeddings and Indexing

Experiment with different embedding models (e.g., domain-specific, fine-tuned) and indexing strategies (e.g., hierarchical, hybrid). Ensure embeddings capture semantic meaning effectively.

4. Refine Retrieval Algorithm

Tune retrieval parameters (e.g., top-k, similarity threshold) and consider hybrid approaches (e.g., combining BM25 with dense retrieval). Implement re-ranking with cross-encoders if needed.

5. Iterate with Evaluation Metrics

Define relevance metrics (e.g., NDCG, MRR) and set up A/B tests to measure improvements. Continuously monitor and iterate based on feedback.

Key Points to Mention

  • Root cause analysis: differentiate between data, embedding, and algorithm issues
  • Data quality: cleaning, deduplication, and metadata enrichment
  • Embedding models: fine-tuning, domain adaptation, and evaluation
  • Hybrid retrieval: combining sparse and dense methods
  • Re-ranking: using cross-encoders for precision
  • Evaluation metrics: NDCG, MRR, and A/B testing for validation

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q5

If the embedding model itself is the retrieval bottleneck, how would you fine-tune it? What data do you need and what does the training process look like?

Technical Trade-offsAlgorithms & Data Structures
Author's notes

This one was harder than I expected.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by confirming that the embedding model is indeed the bottleneck through retrieval metrics and error analysis. Then outline a fine-tuning strategy using contrastive learning with hard negatives mined from the corpus, and describe the data requirements and training loop. Finally, discuss evaluation and deployment considerations.

Pro tip: Emphasize that fine-tuning the embedding model is often a last resort after exhausting cheaper options like hybrid search or re-ranking; showing this trade-off awareness demonstrates maturity.

1. Diagnose the bottleneck

Measure retrieval quality (e.g., recall@k, MRR) and compare against a re-ranker or BM25 to confirm the embedding model is the limiting factor. Analyze failure cases to see if they are due to semantic gaps or domain-specific vocabulary.

2. Define training data

Collect query-document pairs from user logs or generate synthetic queries from documents. Mine hard negatives using the current model or a cross-encoder to create challenging examples.

3. Choose fine-tuning objective

Use contrastive learning (e.g., triplet loss, InfoNCE) with in-batch negatives and hard negatives. Consider multiple negatives ranking loss for stability.

4. Training process

Fine-tune a pre-trained bi-encoder (e.g., Sentence-BERT) with a small learning rate, warm-up, and early stopping. Use large batch sizes to increase in-batch negatives, and monitor validation retrieval metrics.

5. Evaluate and deploy

Evaluate on a held-out set with retrieval metrics and end-to-end task performance. If gains are marginal, consider alternative approaches like hybrid search or re-ranking. Deploy with A/B testing and monitor for drift.

Key Points to Mention

  • Contrastive learning objectives (triplet loss, InfoNCE, MultipleNegativesRankingLoss)
  • Hard negative mining strategies (using current model, cross-encoder, or BM25)
  • Data requirements: query-document pairs, relevance labels, and domain-specific data
  • Training details: batch size, learning rate, warm-up, and early stopping
  • Evaluation metrics: recall@k, MRR, NDCG, and end-to-end task metrics
  • Trade-offs: cost of fine-tuning vs. alternative solutions like re-ranking or hybrid search

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q6

How would you design a chatbot architecture that can handle questions spanning multiple knowledge domains?

System DesignProduct Sense & Ideation
Author's notes

Went with a router layer that classifies the query domain before hitting domain-specific retrievers.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then propose a modular architecture with a router that classifies queries and directs them to domain-specific models or knowledge bases. Discuss how you would handle multi-domain queries, ensure scalability, and evaluate performance, emphasizing trade-offs and Amazon-specific considerations like AWS services.

Pro tip: Highlight the importance of a fallback mechanism and continuous learning from user feedback to handle out-of-domain queries and improve over time, showing you think about production robustness.

1. Clarify Requirements

Ask about expected query volume, latency requirements, domains covered, and whether the system needs to handle multi-domain queries simultaneously.

2. Design Modular Architecture

Propose a high-level architecture with a query router, domain-specific knowledge bases or models, and an aggregator to combine responses for multi-domain queries.

3. Detail Components

Explain the router (e.g., intent classifier), domain experts (e.g., fine-tuned LLMs or retrieval systems), and how they integrate, including fallback and disambiguation strategies.

4. Address Scalability and Deployment

Discuss scaling with AWS services (e.g., SageMaker, Lambda, API Gateway), caching, and monitoring for performance and cost.

5. Evaluate and Iterate

Outline metrics (accuracy, latency, user satisfaction) and a feedback loop for continuous improvement, including A/B testing and retraining.

Key Points to Mention

  • Query routing/classification using NLP techniques (e.g., intent recognition, embeddings).
  • Domain-specific models or retrieval-augmented generation (RAG) for knowledge grounding.
  • Handling multi-domain queries via decomposition and response aggregation.
  • Fallback mechanisms for out-of-domain or low-confidence queries.
  • Scalability and cost considerations using AWS services (e.g., SageMaker, Lambda).
  • Evaluation metrics and continuous learning from user feedback.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.