All jobs / AI engineer / RAG — Retrieval-Augmented Generation
AI engineer interview question · 5+ years
A teammate changed the chunk size and swapped the embedding model. Their pull request says the answers “feel better” on the five questions they tried.
You own the RAG system. What do you ask for before this merges?
The strongest answer
A run against a golden set: real questions with their known source passages, including unanswerable ones. Retrieval metrics and answer quality reported separately, before and after — and if that set does not exist, building it comes first
Why it works
Exactly — with labelled source passages you can see whether retrieval found the right text, separately from whether the answer used it. Without a fixed set, every change is an opinion.
What a good answer covers
- No golden set, no retrieval change.
- Label questions with their source passages.
- Include questions with no answer.
- Report retrieval and answers separately.
Answers that fall short
- Close, but not the strongest: A larger sample — have them try thirty or so questions across topics and report how the answers look
More questions beats five, but “how the answers look” is still unlabelled and unrepeatable. The next change cannot be compared with this one. - Weak: An A/B test in production; real user behaviour is the only evaluation that counts
Online tests matter, but as the second gate. Users should not be the first to find out that a re-index broke retrieval. - Red flag: Nothing more; they are a senior engineer, and blocking on process slows the team down
Seniority is not evidence. A re-chunk and a new embedder change every vector in the index; merging that on five anecdotes is how regressions ship.
Who gets asked this
More RAG — Retrieval-Augmented Generation questions
- Leadership wants one assistant over all internal documents — HR, legal, finance, engineering — for every…
- Since you added “answer only from the retrieved context, otherwise say you don’t know”, the assistant refuses…
- Walk me through a RAG system, from a document being uploaded to a user getting an answer.
- Why do we split documents into chunks before embedding them, instead of making one vector per document?
- What is chunk overlap for, and what does too much of it cost?
- Users paste the error code “E-4012” into the support assistant. It returns passages about errors in general…
- A policy document was updated yesterday and the assistant still quotes the old text, with a citation. Where…
- Why does that happen, and what do you do about it?