Lesson 1.2

Anatomy of a RAG pipeline

Ingestion runs offline: load documents, split them, embed the pieces, and index them with their metadata.

7mAdvanced7.1k students

Overview

Two pipelines, not one

Ingestion runs offline: load documents, split them, embed the pieces, and index them with their metadata. The query path runs per request: embed or parse the question, retrieve candidates, re-rank, assemble a prompt, generate.

Keeping them separate matters operationally. Re-indexing a corpus should never happen inside a user request, and changing an embedding model means reprocessing everything on the ingestion side.

When an answer is wrong, find the stage. Was the right passage retrieved at all? If not, it is a retrieval problem. If it was retrieved and the answer still ignored it, it is a generation problem. These have completely different fixes.

In this lesson you will:

  • Trace a query through every stage
  • Separate the ingestion path from the query path
  • Know which stage a bad answer came from

Resources

Previous Lesson
Next Lesson
Anatomy of a RAG pipeline — Retrieval-Augmented Generation in Practice — Vertex