30 RAG Interview Questions and Answers (2026): Chunking, Retrieval, Evaluation

Banner: 30 RAG interview questions and answers 2026

Quick answer: these are the 30 RAG (Retrieval-Augmented Generation) interview questions that matter most in 2026, from what RAG is to chunking, embeddings, hybrid search, re-ranking, prompting, evaluation, security, agentic RAG and GraphRAG. Every question has a 30-second answer, a deeper answer, what the interviewer is really testing and the likely follow-up.

Part of our free AI Interview Prep Hub. Tick questions as you master them, and your progress shows up on the hub.

How to use this page: read the question, answer it out loud first, then click Show answer. Tick I know this when you can answer confidently. Your progress is saved in this browser. Use the filters to revise only what you haven’t mastered.

Last updated: December 2026

Your progress: 0/30 mastered

RAG fundamentals

Q1Easy

What is Retrieval-Augmented Generation (RAG), in simple terms?

Show answer

⏱ 30-second answer: RAG means the model first retrieves relevant text from your own sources, then writes its answer using that text. It turns a closed-book exam into an open-book exam.

📖 Deeper answer: An LLM only knows what it saw in training. RAG adds a search step: the user question is used to find the most relevant chunks from a knowledge base (documents, tickets, policies), and those chunks are placed in the prompt. The model answers from them and can cite them. You get fresher, company-specific and checkable answers without retraining the model.

🎯 What they’re testing: Whether you can explain the idea without jargon and know why it exists.

↪ Likely follow-up: Why not just fine-tune the model on the documents instead?

Q2Easy

What problems does RAG solve that a plain LLM cannot?

Show answer

⏱ 30-second answer: Stale knowledge, no access to private data, made-up answers and no sources. RAG fixes these by grounding answers in retrieved documents.

📖 Deeper answer: A plain LLM has a training cut-off, has never seen your internal wiki, and may produce fluent but wrong answers. RAG supplies current and private context at question time, lets you show citations, and lets you control which data the model can use, for example only documents a user is allowed to see.

🎯 What they’re testing: Whether you understand the business value, not just the architecture.

↪ Likely follow-up: Which of these problems does RAG not fully solve?

Q3Easy

Walk me through the main components of a RAG pipeline.

Show answer

⏱ 30-second answer: Ingest and chunk documents, create embeddings, store them in an index, retrieve the top matches for a query, then generate an answer with those chunks in the prompt.

📖 Deeper answer: Offline (indexing): load files, clean and parse them, split into chunks, embed each chunk, store vectors plus metadata. Online (query time): embed or rewrite the question, retrieve and filter candidates, optionally re-rank, build a prompt with instructions and the chunks, call the LLM, return the answer with citations. Logging and evaluation sit around both paths.

🎯 What they’re testing: Whether you can separate the indexing path from the query path.

↪ Likely follow-up: Where would you add a re-ranker, and why?

Q4Easy

RAG vs fine-tuning: when would you choose each?

Show answer

⏱ 30-second answer: Use RAG when the model needs your knowledge, especially if it changes. Use fine-tuning when you need consistent behaviour, style or format. Many systems use both.

📖 Deeper answer: RAG is easy to update (re-index a document), gives citations and respects access control, but quality depends on retrieval. Fine-tuning changes the model’s behaviour, which helps with tone, output structure or a narrow task, but it is a poor way to store facts that change and gives no sources. A common pattern: prompt first, add RAG for knowledge, fine-tune only if behaviour still falls short.

🎯 What they’re testing: Judgement about trade-offs, not a single ‘right’ answer.

↪ Likely follow-up: How would you decide with data rather than opinion?

Q5Easy

What is an embedding, and why does RAG need it?

Show answer

⏱ 30-second answer: An embedding is a list of numbers that captures the meaning of text. Similar meanings get nearby vectors, so we can find relevant chunks even when the words differ.

📖 Deeper answer: An embedding model maps text to a vector. ‘Reset my UPI PIN’ and ‘forgot UPI PIN’ land close together even with few shared words. RAG embeds every chunk once and each question at query time, then finds the nearest vectors, usually with cosine similarity. The same model must be used for documents and queries.

🎯 What they’re testing: Whether you understand semantic search, not just the buzzword.

↪ Likely follow-up: What happens if you change the embedding model later?

Q6Medium

With very long context windows, is RAG still needed?

Show answer

⏱ 30-second answer: Usually yes. Long context helps for small, static document sets, but RAG is still better for large or changing data, access control, cost, speed and citations.

📖 Deeper answer: Stuffing everything into the prompt costs more tokens per question, is slower, and models can miss details in very long inputs. It also ignores permissions. RAG sends only the relevant parts. For a handful of fixed documents, long context can be simpler; for an enterprise knowledge base, retrieval remains the practical design. Hybrids also exist: retrieve larger sections and let the long window hold them.

🎯 What they’re testing: Whether you follow current trends without being swept away by them.

↪ Likely follow-up: How would you measure which approach is better for a given use case?

Q7Medium

What is the difference between naive RAG and advanced RAG?

Show answer

⏱ 30-second answer: Naive RAG is embed, retrieve top-k and generate. Advanced RAG adds steps like query rewriting, hybrid search, re-ranking, metadata filtering and answer checks.

📖 Deeper answer: Naive RAG works for demos but fails on vague questions, exact terms, multi-part questions and noisy chunks. Advanced patterns improve each stage: better parsing and chunking, rewriting or expanding the query, combining keyword and vector search, re-ranking with a stronger model, compressing context, and verifying that the answer is supported. Agentic RAG goes further and lets the model decide when and what to retrieve.

🎯 What they’re testing: Whether you have moved beyond tutorials.

↪ Likely follow-up: Which advanced step usually gives the biggest gain first?

FREE DOWNLOAD

Want all 30 answers as a printable cheat sheet?

The 30 GenAI questions as a cheat sheet, a system-design framework, a 30-day plan, the STAR method and mock-interview prompts. Printable, and works on mobile.

No spam. Unsubscribe anytime.

Chunking & embeddings

Q8Easy

Why do we split documents into chunks?

Show answer

⏱ 30-second answer: Embeddings and prompts work best on focused pieces of text. Chunks let us retrieve only the relevant part of a long document and fit it into the prompt.

📖 Deeper answer: A whole 50-page policy has one blurry embedding and would waste the context window. Smaller chunks give sharper embeddings and precise retrieval. Too small, though, and a chunk loses the context needed to answer. Chunking is a balance between precision and completeness.

🎯 What they’re testing: Whether you know that chunking quality drives retrieval quality.

↪ Likely follow-up: How do you choose a chunk size?

Q9Medium

How do you choose chunk size and overlap?

Show answer

⏱ 30-second answer: Start from the content and the questions: a few hundred tokens with a small overlap is a common starting point, then tune using an evaluation set.

📖 Deeper answer: Short, factual Q&A works with smaller chunks; reasoning over procedures needs larger ones. Overlap (for example 10–20%) keeps sentences that cross a boundary from being cut off. Respect structure: split on headings, sections and paragraphs rather than raw character counts. Then measure retrieval recall on real questions and adjust rather than guessing.

🎯 What they’re testing: Whether you tune with evidence.

↪ Likely follow-up: What would you do for a document full of tables?

Q10Medium

What is semantic or structure-aware chunking?

Show answer

⏱ 30-second answer: Splitting by meaning or document structure, such as headings, sections, list items or topic shifts, instead of fixed character counts.

📖 Deeper answer: Fixed-size chunks can split a step from its explanation. Structure-aware chunking uses headings, HTML or Markdown structure, or sentence-similarity drops to find natural boundaries. Adding the section title or document title to each chunk (‘contextual headers’) also helps retrieval, because a chunk like ‘Step 3: submit the form’ is meaningless without knowing which process it belongs to.

🎯 What they’re testing: Practical experience with messy real documents.

↪ Likely follow-up: How would you handle scanned PDFs?

Q11Medium

How do you handle tables, PDFs and scanned documents in RAG?

Show answer

⏱ 30-second answer: Parse carefully: use layout-aware PDF parsers, OCR for scans, keep tables as structured text or Markdown, and store page numbers for citations.

📖 Deeper answer: Most RAG failures start at ingestion. Plain text extraction can scramble columns and break tables into nonsense. Use parsers that understand layout, run OCR on images, convert tables to Markdown or row-wise text with headers repeated, and keep metadata like file name, page and section. Always spot-check parsed output before indexing.

🎯 What they’re testing: Whether you have actually built a pipeline on real enterprise data.

↪ Likely follow-up: What metadata would you store with each chunk, and why?

Q12Medium

How do you choose an embedding model?

Show answer

⏱ 30-second answer: Check quality on your own data, language support, dimensions, speed, cost and whether data can leave your network. Benchmarks are a starting point, not the answer.

📖 Deeper answer: Public leaderboards such as MTEB compare models, but your domain may differ. For Indian users, test Hindi, regional languages and Hinglish queries. Larger models may be more accurate but slower and costlier. Hosted APIs are easy; self-hosted models keep data private. Build a small labelled set of query-to-correct-chunk pairs and compare recall.

🎯 What they’re testing: Whether you evaluate instead of following hype.

↪ Likely follow-up: What is the cost of switching embedding models after launch?

Q13Hard

What is parent-child (small-to-big) retrieval, and when does it help?

Show answer

⏱ 30-second answer: Index small chunks for precise matching, but return the larger parent section to the LLM so it has enough context to answer.

📖 Deeper answer: Small chunks embed precisely but may lack surrounding context; big chunks carry context but match poorly. Small-to-big retrieval searches over small ‘child’ chunks, then expands each hit to its parent (section or neighbouring chunks) before generation. It helps with procedures, legal clauses and technical docs where the answer depends on nearby text.

🎯 What they’re testing: Depth in retrieval design.

↪ Likely follow-up: How do you avoid sending duplicate parents for several child hits?

Retrieval & ranking

Q14Easy

What is a vector database, and do you always need one?

Show answer

⏱ 30-second answer: It stores embeddings and finds the nearest ones quickly using approximate search. For small projects an in-memory index is enough; use a vector database as data, users and filtering needs grow.

📖 Deeper answer: Comparing a query with every vector is slow at scale, so vector databases build approximate nearest-neighbour indexes (HNSW is common). They also handle metadata filters, updates and persistence. Options range from libraries like FAISS to databases such as pgvector on PostgreSQL, Qdrant, Weaviate, Milvus or managed services. Pick based on scale, existing stack and operations skills.

🎯 What they’re testing: Pragmatism: not over-engineering.

↪ Likely follow-up: What does ‘approximate’ mean, and why is it acceptable?

Q15Medium

What is hybrid search, and why is it used in RAG?

Show answer

⏱ 30-second answer: It combines keyword search (like BM25) with vector search, so you catch both exact terms and meaning.

📖 Deeper answer: Vector search is great for paraphrases but weak on exact strings: product codes, error IDs, names, section numbers. Keyword search is the opposite. Hybrid search runs both and merges the results, often with reciprocal rank fusion (RRF) or weighted scores. In enterprise data full of IDs and acronyms, hybrid usually beats either alone.

🎯 What they’re testing: Whether you know vector search’s blind spots.

↪ Likely follow-up: How does reciprocal rank fusion combine two ranked lists?

Q16Medium

What is a re-ranker, and why add one?

Show answer

⏱ 30-second answer: A re-ranker is a stronger model that rescores the top candidates against the question, so the best chunks go to the LLM first.

📖 Deeper answer: First-stage retrieval is fast but rough. A cross-encoder re-ranker reads the question and each candidate together and scores relevance more accurately. Typical flow: retrieve 30–100 candidates, re-rank, keep the top 3–8. It often gives a large quality jump for modest extra latency.

🎯 What they’re testing: Knowledge of two-stage retrieval.

↪ Likely follow-up: Where does the latency come from, and how would you keep it low?

Q17Medium

How do you choose top-k, and what goes wrong if it is too high or too low?

Show answer

⏱ 30-second answer: Too low misses needed facts; too high adds noise, cost and confusion. Tune k with an evaluation set, ideally retrieving more and re-ranking down to a few.

📖 Deeper answer: With low k, recall drops and the model says ‘not found’ or guesses. With high k, irrelevant chunks dilute the prompt, raise token cost and can mislead the model. A good pattern is a high first-stage k for recall, then a re-ranker and a smaller final k for precision.

🎯 What they’re testing: Whether you think in terms of recall vs precision.

↪ Likely follow-up: How would you measure retrieval recall?

Q18Medium

What are query rewriting and query expansion?

Show answer

⏱ 30-second answer: Improving the user’s question before retrieval: rewriting vague or conversational questions into clear search queries, or generating several variants to search with.

📖 Deeper answer: Users ask ‘and what about for freshers?’ after a previous turn. Rewriting uses chat history to produce a standalone query. Expansion techniques include generating multiple paraphrases (multi-query) or a hypothetical answer to embed (HyDE). These raise recall, especially for short or ambiguous questions, at the cost of extra LLM calls.

🎯 What they’re testing: Handling real conversational traffic.

↪ Likely follow-up: When could query expansion hurt results?

Q19Hard

How do you enforce access control (permissions) in a RAG system?

Show answer

⏱ 30-second answer: Store permission metadata with every chunk and filter by the user’s rights at query time, before anything reaches the LLM.

📖 Deeper answer: Never rely on the prompt to hide data. Each chunk carries its source document’s access list (groups, roles, departments). At query time, the retriever applies a filter for the signed-in user, so forbidden chunks are never retrieved. Sync permission changes from the source system, and test with users who should not see certain documents. For multi-tenant apps, isolate tenants by index or namespace.

🎯 What they’re testing: Enterprise readiness and security thinking.

↪ Likely follow-up: How do you handle a document whose permissions changed yesterday?

Want 120 more questions like these, with model answers? The AI Interview Pro Kit has 150 Q&A + 8 system-design walkthroughs.See the Pro Kit (₹99) →

Generation & prompting

Q20Easy

How do you write the prompt that combines retrieved chunks with the question?

Show answer

⏱ 30-second answer: Give clear instructions, clearly separated context with source labels, the question, and rules: answer only from the context, cite sources, and say when the answer is not there.

📖 Deeper answer: A good RAG prompt has a role and task, delimited context blocks each tagged with an ID or title, the user question, and constraints: use only the provided context, quote or cite chunk IDs, keep a set format, and reply ‘not found in the documents’ if unsupported. Putting the most relevant chunks first helps.

🎯 What they’re testing: Whether you know grounding instructions matter.

↪ Likely follow-up: How do you stop the model using its own knowledge when it shouldn’t?

Q21Medium

What is the ‘lost in the middle’ problem?

Show answer

⏱ 30-second answer: Models tend to use information at the start and end of a long context better than information buried in the middle.

📖 Deeper answer: Research such as the 2023 ‘Lost in the Middle’ study showed answer accuracy drops when the key passage sits mid-context. Practical fixes: send fewer, better chunks; place the most relevant ones first (or first and last); compress or summarise context; and evaluate with the answer placed at different positions.

🎯 What they’re testing: Awareness of known LLM limitations.

↪ Likely follow-up: How would re-ranking help here?

Q22Medium

How do you add citations to RAG answers?

Show answer

⏱ 30-second answer: Label each chunk with an ID and source, ask the model to cite the IDs it used, then map IDs back to links, page numbers or titles in the UI.

📖 Deeper answer: Citations build trust and let users verify. Keep source metadata (URL, file, page, section) with every chunk. Instruct the model to cite after each claim, validate that cited IDs actually exist in the provided context, and drop or flag answers whose citations don’t support them. Show clickable sources in the interface.

🎯 What they’re testing: Product sense plus reliability.

↪ Likely follow-up: What if the model cites a chunk that doesn’t support the claim?

Q23Hard

How do you reduce hallucinations in a RAG system?

Show answer

⏱ 30-second answer: Improve retrieval first, then constrain generation: strict grounding instructions, ‘not found’ behaviour, citations, lower temperature and an answer-check step.

📖 Deeper answer: Many ‘hallucinations’ are retrieval failures: the right chunk was never sent. So measure retrieval recall, use hybrid search and re-ranking, and clean the data. On the generation side: ground strictly, allow refusals, require citations, and optionally run a verifier that checks each claim against the context. Track groundedness in evaluation and in production logs.

🎯 What they’re testing: Root-cause thinking, not just prompt tweaks.

↪ Likely follow-up: How would you measure groundedness automatically?

Evaluation, production & security

Q24Medium

How do you evaluate a RAG system?

Show answer

⏱ 30-second answer: Evaluate retrieval and generation separately: did we fetch the right chunks, and is the answer correct and supported by them? Use a golden test set plus automated and human checks.

📖 Deeper answer: Build 50–100 real questions with expected answers and the source documents. Retrieval metrics: recall@k, MRR or nDCG. Generation metrics: correctness, faithfulness or groundedness, answer relevance, citation accuracy. Frameworks such as Ragas offer metrics like context precision and faithfulness; LLM-as-judge works with clear rubrics, spot-checked by humans. Run the set on every change.

🎯 What they’re testing: Engineering discipline: measuring instead of guessing.

↪ Likely follow-up: An answer is wrong. How do you tell if retrieval or generation caused it?

Q25Medium

How do you keep a RAG index fresh as documents change?

Show answer

⏱ 30-second answer: Re-index incrementally: detect new, changed and deleted documents, re-chunk and re-embed only those, and remove stale chunks.

📖 Deeper answer: Use change events or scheduled syncs with the source systems, store a content hash per document to skip unchanged files, delete chunks of removed documents, and track index version and last-sync time. Show the source date in answers so users can judge freshness. Full re-embedding is needed when you change the embedding model or chunking strategy.

🎯 What they’re testing: Operational maturity.

↪ Likely follow-up: How would you roll out a new embedding model without downtime?

Q26Medium

How do you reduce cost and latency in a production RAG app?

Show answer

⏱ 30-second answer: Retrieve fewer, better chunks, cache frequent queries and embeddings, use smaller models where quality allows, and stream responses.

📖 Deeper answer: Latency comes from query rewriting, retrieval, re-ranking and generation. Options: cache embeddings and popular answers, use approximate indexes, keep final context small with a re-ranker, route simple questions to a cheaper model, run steps in parallel, and stream the answer. Track cost per query and p95 latency as first-class metrics.

🎯 What they’re testing: Production trade-off thinking.

↪ Likely follow-up: Which of these would you do first for a chatbot serving lakhs of users?

Q27Hard

What security risks are specific to RAG?

Show answer

⏱ 30-second answer: Indirect prompt injection hidden in documents, data leaks across permissions, poisoned or outdated sources, and sensitive data exposure in prompts and logs.

📖 Deeper answer: Retrieved text is untrusted input: a document can contain instructions like ‘ignore previous rules’. Treat context as data, not instructions; filter by permissions before retrieval; restrict which sources can be indexed; scan for PII; limit what tools an agent can call based on retrieved content; and log carefully without storing secrets. Read our prompt injection explainer for agent-specific risks.

🎯 What they’re testing: Security awareness beyond the happy path.

↪ Likely follow-up: How would you test your system against prompt injection?

Q28Hard

What is agentic RAG, and when is it worth it?

Show answer

⏱ 30-second answer: The model decides when to retrieve, which source or tool to use, and whether to search again, instead of one fixed retrieve-then-answer step.

📖 Deeper answer: Agentic RAG handles multi-step questions: break the question down, retrieve for each part, check if the evidence is enough, and search again or use a different tool (SQL, API, web) if not. It improves hard questions but adds latency, cost and unpredictability. Use it when questions genuinely need multiple hops; keep a simple pipeline for FAQs.

🎯 What they’re testing: Judgement about complexity vs value.

↪ Likely follow-up: How would you stop an agentic RAG loop from running forever?

Q29Hard

What is GraphRAG, and how is it different from vector RAG?

Show answer

⏱ 30-second answer: GraphRAG builds a knowledge graph of entities and relationships from documents and uses it for retrieval, which helps with questions that connect many facts or ask for themes across a corpus.

📖 Deeper answer: Vector RAG finds passages similar to the question, which struggles with ‘how are these suppliers connected?’ or ‘what are the main themes across 10,000 reports?’. GraphRAG extracts entities and relations, often builds community summaries, and retrieves through graph structure. It costs more to build and maintain, so it fits relationship-heavy or global-summary questions, not simple lookups.

🎯 What they’re testing: Awareness of newer retrieval patterns and their trade-offs.

↪ Likely follow-up: How would you combine graph and vector retrieval?

Q30Hard

Design a RAG assistant for a bank’s internal policy documents used by 20,000 employees.

Show answer

⏱ 30-second answer: Secure ingestion of policies with metadata, hybrid retrieval with permission filters and re-ranking, grounded answers with citations, an evaluation set, monitoring and a clear update process.

📖 Deeper answer: Ingestion: connectors to the document store, layout-aware parsing, section-based chunks with titles, effective dates and access groups. Retrieval: hybrid search, filters for role and region, re-ranker, top 5 chunks. Generation: strict grounding, citations with policy name and section, ‘not found’ plus escalation path. Ops: SSO, audit logs, PII redaction, latency and cost dashboards, golden test set run on every release, feedback buttons, and an owner per policy area to keep documents current.

🎯 What they’re testing: End-to-end system design with security and operations.

↪ Likely follow-up: How would you handle two policy versions that contradict each other?

FREE · 2-MINUTE SIGNUP

Finished? Take all 30 RAG questions with you

Get the free AI Interview Kit: a printable cheat sheet of every answer, a system-design framework and a 30-day plan for revision the night before your interview.

No spam. Unsubscribe anytime.

PRO KIT · NOW LIVE · ₹99 ₹349

Go deeper with the AI Interview Pro Kit

150 questions with model answers and follow-ups, plus 8 full GenAI system-design walkthroughs. Plus 5 portfolio project playbooks, a resume & LinkedIn kit, company-style rounds and a 30-day plan. PDF + web.

🤖 Practice with AI: free mock interview

Copy this prompt into Claude or ChatGPT and get interviewed. Answer by typing or voice.

Act as a senior interviewer for a GenAI / AI Engineer role at an Indian product company, focused on RAG (Retrieval-Augmented Generation). Ask me one question at a time from these topics: RAG basics, chunking and embeddings, vector databases, hybrid search and re-ranking, prompting and citations, evaluation, security and production design. Start easy and increase difficulty based on my answers. After each answer: score it out of 10, tell me what was missing, and show a model answer in under 120 words. After 8 questions, give me my strongest and weakest areas and a 7-day study plan.

How to prepare in 7 days

  1. Day 1: RAG fundamentals (Q1-Q7). Explain RAG vs fine-tuning out loud in one minute.
  2. Day 2: Chunking and embeddings (Q8-Q13). Parse one real PDF and inspect the chunks.
  3. Day 3: Retrieval and ranking (Q14-Q19). Build a tiny RAG app with our free guide and try hybrid search.
  4. Day 4: Generation and prompting (Q20-Q23). Add citations and a “not found” answer.
  5. Day 5: Evaluation and production (Q24-Q26). Write 20 test questions and measure recall.
  6. Day 6: Security, agentic RAG and GraphRAG (Q27-Q29).
  7. Day 7: Practise the design question (Q30) and do two AI mock interviews with the prompt above.

Tips that make you stand out

  • Tell project stories: one real project with numbers beats any textbook definition.
  • Talk trade-offs: cost, latency, quality and safety. Senior interviewers listen for this.
  • Say “it depends”, then explain on what: it shows judgement, not indecision.
  • Show you build safely: mention evaluation, guardrails and monitoring without being asked.

Keep going

Next, build your first RAG app with our free guide What is RAG? (with Python code), read Prompt Injection Explained for the security side, and practise the GenAI system design questions and the 30 Agentic AI & MCP questions.