RAG & Retrieval · Ground answers in evidence

What are the stages of a RAG pipeline?

EasyragarchitecturepipelineUpdated Oct 2026
Quiz this track

Short answer

Ingest, parse, chunk, embed, index, retrieve, rerank, pack context, generate and cite. Offline stages build the index; online stages answer a query.

RAG is two pipelines that meet at the index. The offline pipeline prepares documents; the online pipeline serves a question. Keeping them separate makes it clear where freshness, latency and quality problems belong.

  • Offline: ingest, parse, clean, chunk, attach metadata, embed and index.
  • Online: analyse or rewrite the query, retrieve candidates, filter by permission, rerank, pack context.
  • Generation: answer from the packed evidence with citations.
  • Feedback: log traces and user signals, then turn failures into eval cases.
A change to chunking invalidates the index. Treat ingestion configuration as versioned infrastructure, not a one-off script.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1Which stage would you monitor most closely?
  2. 2Where would you add a cache?
  3. 3What happens to the index when a document is deleted?

Say it in the interview

I think of RAG as an offline pipeline and an online pipeline. Offline we parse, chunk, embed and index documents with metadata. Online we take the query, retrieve candidates, filter permissions, rerank and pack the best evidence into the prompt. Then we generate with citations and log the trace. Separating the two helps me decide whether a bug is about freshness and indexing or about retrieval and generation.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live RAG & Retrieval mock interview and get scored feedback on depth, clarity and confidence.