Interview Q&A · questions with model answers
RAG Interview Questions
Part of the study plan for: Native AI Engineer · Forward Deployed Engineer (FDE)
Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.
-
Most asked RAG leaf: Explain query rewriting and multi-query retrieval.
Query rewriting uses an LLM to expand, clarify, or reformulate the user's original query before retrieval. Multi-query retrieval generates several reformulations, retrieves documents for each, and…
-
RAG leaf: How do citations should be mapped back to sources?
Citations in RAG are mapped back to sources by tracking chunk-level provenance metadata (document ID, page number, section, character offsets) through the retrieval and generation pipeline, and by…
-
RAG leaf: How do you handle stale documents in a knowledge base?
Stale documents in a RAG knowledge base are handled by versioning documents, storing freshness metadata alongside embeddings, applying time-decay scoring to retrieval results, re-indexing on change…
-
RAG leaf: Explain corrective RAG / self-reflective retrieval loops.
Corrective RAG (CRAG) and self-reflective retrieval loops add a verification step after retrieval where the system evaluates whether the retrieved documents are actually relevant to the query, and…
-
RAG leaf: Describe a failure mode when context is contradictory.
When retrieved context contains contradictory information, the RAG system can produce a confidently wrong answer by arbitrarily choosing one version, hallucinate a synthesis that matches neither…
-
How do you handle follow-up questions in conversational RAG?
Follow-up questions in conversational RAG are handled by maintaining conversation history, rewriting follow-up queries to be self-contained (resolving pronouns and references), and deciding whether…
-
How can documents in a RAG index attack your system, and how do you defend?
Documents in a RAG index can attack your system through indirect prompt injection: malicious content embedded in indexed documents that instructs the LLM to ignore its system prompt, leak…
-
Where does the time and money go in a RAG pipeline, and how do you reduce it?
In a RAG pipeline, the majority of time goes to LLM generation (50-70% of latency) and the majority of money goes to LLM input tokens (retrieved chunks are expensive at scale). Reduction strategies…
-
Explain how a typical RAG pipeline works end to end.
A RAG pipeline (1) ingests and chunks documents, (2) embeds chunks into vectors and stores them in a vector index, (3) embeds the user query (optionally rewritten), (4) retrieves top-k similar…
-
How do you handle access control and multi-tenancy in a RAG knowledge base?
Filter retrieval by tenant and document ACLs at query time—never retrieve then hope the LLM hides forbidden content.