Skip to content
RED SAGSkills
easyAI Engineer (LLM & Generative AI) interview question

Explain retrieval-augmented generation (RAG) to a new team member. Why do we use it?

What the interviewer wants to hear

  • Retrieve relevant documents for the question
  • Add them to the prompt as context
  • Model answers grounded in the context, can cite sources
  • Works for private and fresh data without retraining

Model answer

RAG means we look things up before the model answers. When a user asks a question, we search our own knowledge base, usually by turning the question into an embedding and finding similar document chunks in a vector database, sometimes combined with keyword search. We take the best few chunks and put them into the prompt with instructions like "answer only using these sources and cite them". The model then writes an answer grounded in that context. We use it because the base model does not know our private documents and its knowledge has a cutoff date. RAG lets us use fresh and private data without retraining the model, reduces hallucinations, and lets users check citations. The quality of the answer depends heavily on the quality of retrieval, so we measure that separately.

Can you answer it under time pressure?

Take a timed easy round and get scored on every answer.

Start mock interview

More easy AI Engineer (LLM & Generative AI) questions