Practiced one out loud? Paste your answer into the free self-check and get a score in 30 seconds
What the interviewer is testing
Whether you can describe both halves of a RAG system (indexing and query time), name the parts that decide quality (chunking, hybrid search, re-ranking, metadata), and know that retrieval, not the generator, is usually where it fails first.
Answer framework
- Define it in one line: retrieve relevant chunks from your own documents at query time and put them in the prompt, so the model answers from them and cites sources.
- Indexing path: parse documents, split them into chunks, embed each chunk, and store the vectors with metadata (source, date, permissions).
- Query path: optionally rewrite the query, embed it, retrieve top-k by vector and/or keyword search, apply metadata filters, then re-rank.
- Generation: put the best chunks in the prompt with instructions to answer only from them and cite sources; make declining an acceptable answer.
- Close with evaluation: measure retrieval and generation separately, because retrieval usually fails first.
Sample answer
RAG has two paths. At indexing time I parse documents, split them into chunks, embed each chunk and store the vectors with metadata such as source, date and permissions. At query time I optionally rewrite the query, embed it, retrieve the top-k chunks by vector and/or keyword search, apply metadata filters and re-rank, then put the best chunks in the prompt with instructions to answer only from them and cite sources.
For chunking I follow document structure (headings, paragraphs, code blocks, table rows) rather than fixed character counts, typically a few hundred tokens with modest overlap. I use hybrid search when queries contain exact identifiers, product codes or error messages that embeddings blur, and a cross-encoder re-ranker on a wide candidate set (for example top 50) to keep the best 5 to 10.
I evaluate retrieval and generation separately. When RAG fails, it usually fails first at retrieval: the wrong chunk or a missing chunk, not the generator.
Likely follow-ups
Common mistakes
- Describing RAG as only "a vector database plus an LLM" and skipping parsing, chunking, metadata and re-ranking.
- Using fixed character counts for chunks by default instead of following document structure and measuring recall on real questions.
- Relying on vector search alone when users search for exact identifiers, names or error messages.
- Blaming the model first when answers are wrong; most issues are parsing, chunking or retrieval.
- Leaving no path for the system to decline when nothing relevant was retrieved.
The 0 to 1 AI Engineer Interview Playbook covers the answer frameworks, system-design walkthroughs and an 8-week plan.
Get the playbook 40% off with code EARLYBF until Nov 3, 11:59 PM PTEARLYBF: 40% off until Nov 3Smaller start: Score your answers against 50 rubrics, $9. 50 AI engineer questions, one rubric each, PDF on Gumroad.
Interviewing for PM or TPM? See the full PM package, $59 on Gumroad: a resume system, a PM, TPM and PGM interview handbook, a 1:1 cheat sheet and a PM playbook. PM and TPM content, not AI engineer prep.
Related questions
Based on question #26, #27, #28, #29, #33 in the full question bank.