AI Interviews · Question

Walk through a RAG project you built: sources, retrieval, evaluation and what broke. Follow-ups: how you detect answers drawn from stale documents, and what the system does when the docs don't cover the question.

Hiring-manager round / Behavioral question reported at Amazon / AWS (Oct 2026). Sources, confidence and an answer card.

Researched · updated

eng-099 AI Engineer Project deep dive Hiring-manager roundBehavioral Medium confidence
On this page

What they’re really asking

If you only remember one thing, say this in the first minute: “The assistant answered customer questions from about 3,000 help-center articles. It searched the articles, picked the best three passages, and had the model answer only from them, with links. I owned retrieval and the eval: 85% right on 200 real questions, give or take 5 points. Every passage carries its article version, so a stale answer is a log query, not a guess. And when the articles don’t cover a question, it says so, and we measure how often it gets that right.”

The rest of this page explains each part of that answer.

The interviewer wants to know whether you have actually built and run a retrieval system, or only read about one. The walk-through tests ownership and measurement. The two follow-ups test operations.

What makes this different from a normal search feature

You may have built search before. A normal search box returns a list of links, and the user decides which one to trust. If the results are a bit off, the user scrolls.

A RAG system takes that decision away from the user. RAG (retrieval-augmented generation) means: search your own documents first (retrieval), then hand the best passages to a large language model (an LLM) and let it write one answer from them. The user sees a confident paragraph, not a list. That changes three things:

  1. A retrieval mistake becomes a wrong answer. If search returns the wrong passage, the model writes a fluent answer from it. So retrieval quality has to be measured, not eyeballed.
  2. Old documents become wrong answers. If the index holds last week’s version of an article, the model quotes last week’s facts. That is the “stale documents” follow-up.
  3. Missing documents become invented answers. If no passage answers the question, the model may answer anyway. That is the “uncovered questions” follow-up.

Only the title of this question is candidate-reported, from an Amazon-tagged PracHub page; the two follow-ups are listed on the same page (PracHubaggregator · Oct 2026).

Words you need first

  • Token: a small piece of text, roughly ¾ of a word. Models read and write tokens, and are priced by them.
  • Chunk: a passage of a few hundred tokens cut from a longer document. The index stores chunks, not whole documents.
  • Embedding: a list of numbers representing a text’s meaning; similar meanings get similar lists. Searching by embedding is dense retrieval. Searching by words is keyword search (usually scored with BM25). Using both is hybrid retrieval.
  • Eval set: a fixed list of test questions with known good answers, used to score the system.

Clarify first

Ask two or three short questions before you start:

  • Which kind of round is this? A hiring-manager or Bar Raiser (Amazon’s interviewer from outside the hiring team) conversation wants story and judgment. A technical deep dive wants design. The page says the questions come from both kinds of round.
  • How long do you have? Assume 10 to 15 minutes for the walk-through if you aren’t told.
  • Can you abstract confidential numbers? Say up front which numbers are exact (eval results) and which are relative (business metrics).

Say it like this: “I’ll take about ten minutes for the walk-through and then go wherever you want. The eval numbers are exact; revenue numbers I’ll give as relative.”

Answer

Tell it in the order the question asks, one or two sentences each, then stop for questions. The example below is illustrative (a help-desk assistant for a software product); replace it with your own project.

The system, as one picture

Help-center articles (about 3,000, edited daily)
   │  ingestion job, every hour
   ▼
Chunker ── passages of a few hundred tokens, each tagged with article id + version
   │
   ▼
Index ── embeddings (meaning) + words (keywords) + article id, version, indexed_at
   ▲
   │  search with the customer's question
Question ──► Retriever (hybrid, top 20) ──► Reranker (keeps best 3)
                                               │
                                               ▼
                         LLM: answer only from these 3 passages, link them,
                              or say "I don't know"
                                               │
                                               ▼
                         Log: question, passages, article versions, answer

The ingestion job re-reads changed articles every hour and cuts them into chunks. The index keeps each chunk’s embedding, its words and the article id and version it came from. The retriever runs dense and keyword search together and returns 20 candidates. The reranker is a slower model that reads the question and each candidate together and keeps the best 3. The LLM writes the answer from those 3, with links. The log records which article versions each answer used; that one design choice answers the stale-document follow-up.

Walk it in four steps

StepWhat to coverWhat to say in the interview
1. SourcesWhat the corpus was, how big, how often it changed, who owned it”About 3,000 articles, edited daily by the support team. They owned the content; I owned getting it into the index.”
2. RetrievalChunking, embedding model, dense or hybrid, reranking, prompt with citations. One choice you made and the option you rejected”Dense-only was simpler, but it missed error codes and product names. I added keyword search after the eval showed that.”
3. EvaluationThe eval set (size, where questions came from, who labelled them), the metric, the baseline, the result with its error bar”200 real tickets, labelled with two support leads. 85%, so about plus or minus 5 points.”
4. What brokeOne production failure and the design change it caused”We quoted an old price after the pricing article changed. That’s why every chunk now carries its version.”

For the metric, name one for retrieval and one for answers. For retrieval, hit@k or recall@k: the share of questions where a relevant passage appears in the top k results. For answers, a groundedness check: does every claim in the answer come from the retrieved passages?

Give the error bar with the number. An eval set is a sample, so the score could move if you picked different questions. With 50 questions at 85%, the 95% error bar is about ±10 points; with 200 it is about ±5. If your before-and-after gap is smaller than that, say so and say how you handled it (a bigger set, or a paired comparison on the same questions).

Follow-up 1: stale documents

A stale answer comes from an old version of a document. Don’t answer with “re-index more often”; that shrinks the problem but doesn’t let you see it. Make staleness observable at three levels:

  1. Index lag. Store the source version and ingestion time on every chunk. Alert on the gap between a document changing and being re-indexed, and on documents deleted at the source but still in the index.
  2. Answer provenance. Log the document id and version in every citation. Then “answered from an old version” is a query over logs.
  3. Canary questions. When a key document changes, add a question whose answer changed, and run it against the live system on a schedule.

Say it like this: “Every answer logs the article versions it used, so finding stale answers is a query. Index lag is a metric with an alert, and changed articles get a canary question.”

Follow-up 2: questions the documents don’t cover

State the behaviour first: abstain (decline to answer), say what the documents do cover, and route to a human or a search link. Then enforce it with an instruction to answer only from the retrieved passages, plus a retrieval-score threshold below which the system abstains.

Then measure it. Put unanswerable questions in the eval set and track two rates: the abstain rate (it said “I don’t know” when it should have) and the false-abstain rate (it said “I don’t know” when the answer was there). Without those items you can’t tell whether the abstain path works at all.

Say it like this: “Twenty of our eval questions have no answer in the help center. We track how often it declines on those, and how often it wrongly declines on the rest.”

If your RAG experience is the site’s lab

Say so. The Build Your Own RAG System lab’s measured results on two public BEIR test sets (with paired intervals between versions) are honest material for the evaluation step. But a public benchmark has no stale documents, so describe what you would measure in production instead.

The arithmetic behind the numbers (for a Staff-level follow-up)
  • 95% error bar for a pass rate: ± 1.96 × √(p × (1 − p) ÷ n).
  • p = 0.85, n = 50: 1.96 × √(0.85 × 0.15 ÷ 50) ≈ ± 9.9 points.
  • p = 0.85, n = 200: ± 4.9 points.
  • The 3,000 articles, 200 questions and 85% are illustrative.

Senior vs Staff

RAG project walk-through

Senior

  • Describes the pipeline, one rejected alternative, an eval number with its size, and a concrete fix for staleness.

Staff

  • Treats freshness and abstention as measured properties with alerts and eval items, and explains the cost and ownership of keeping the index correct as sources grow.

Small-team version

At a small company you probably built all of it: ingestion from Drive or a wiki, retrieval in Postgres with pgvector (a Postgres extension for storing and searching embeddings) or a hosted store, the prompt, the eval and the dashboard. Present that breadth as ownership.

The small-team answers to the follow-ups are cheap:

  • a source_version and indexed_at column on the chunks table;
  • a nightly job that compares them with the source;
  • citations that carry the version;
  • 20 to 30 unanswerable questions in the eval set.

Bring the cost per question and the monthly bill. With an assumed 2,000 questions a day, at the family walkthrough’s example of about $0.0064 per question on Claude Sonnet 5, the bill is about $384 a month. Re-embedding everything is cheap too: about $10 per full re-index of 1M chunks with text-embedding-3-small. Revisit the managed-API default only if a data-residency rule or a much larger bill appears.

The arithmetic behind the numbers (for a Staff-level follow-up)
  • Per question: 1,000 uncached input tokens × $2 per million + 2,000 cached input × $0.20 per million + 400 output × $10 per million = $0.002 + $0.0004 + $0.004 = $0.0064 (Claude Sonnet 5 list prices fetched 2026-10-11; token counts assumed).
  • Monthly: 2,000 × $0.0064 × 30 ≈ $384.
  • Re-index: 1M chunks × 500 tokens = 500M tokens; at $0.02 per million tokens (text-embedding-3-small) ≈ $10.

Pitfalls

  • A pipeline tour with no eval number. The interviewer can’t tell whether it worked, so they assume it was tuned by feel.
  • A number with no sample size. “85%” on 50 questions and on 1,000 questions mean very different things.
  • “We” for every decision. The interviewer can’t tell what you did.
  • “Re-index more often” as the stale-document answer. It gives no way to detect the problem when it happens.
  • An abstain path that was never measured. Without unanswerable eval questions, you don’t know it works.

Go deeper

Family