RAG interview question · Most asked

Your RAG assistant gives confident but wrong answers about company policy. How do you find and fix the cause?

Scenario Asked in Native AI Engineer · Forward Deployed Engineer (FDE) interviews

Members can save this page, take notes and track progress. See membership · Sign in

Summary

Split the pipeline and measure each part: did retrieval return the right passages (retrieval quality), and did the model answer faithfully from them (generation quality)? Most wrong answers come from retrieval: stale or duplicate documents, bad chunking, missing metadata filters, or the right passage ranked too low. Fix with an evaluation set of real questions so improvements are measured, not guessed.

Longer Answer

  1. Collect failures into an evaluation set: question, expected answer, the document that should be cited.
  2. Retrieval metrics: recall@k and MRR for those questions. If the right chunk isn't in the top k, the model never had a chance.
  3. Retrieval fixes: remove outdated policy versions (or filter by effective date), chunk by section with headings kept, hybrid search (BM25 + vectors) for exact terms and codes, a reranker, query rewriting.
  4. Generation fixes: instruct the model to answer only from the context and say when it doesn't know, require citations, lower temperature, check faithfulness with an LLM-as-judge or NLI model.
  5. Guardrails: show sources to users; refuse when retrieval confidence is low.
  6. Monitor: thumbs-down rate, unanswered questions, citation clicks; add new failures to the eval set.

Key Points

  • Separate retrieval from generation.
  • Build an eval set from real failures.
  • Most errors are retrieval: stale docs, chunking, ranking.
  • Hybrid search and reranking help.
  • Answer only from context; cite; refuse when unsure.

Explanation

What interviewers look for

A measurement-driven approach that isolates retrieval from generation.

More RAG questions

← All RAG questions

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake