RAG Reference Pipeline

RAG Reference Pipeline

Key jargon

Term Plain-language meaning
Retrieval-augmented generation (RAG) Generating an answer with evidence retrieved from an external knowledge collection.
Retriever The component that selects candidate passages for a query.
Reranker A second-stage model or rule that reorders retrieved candidates by relevance.
Grounding Constraining an answer to supplied evidence and making support inspectable.

Key concepts

Concept map

flowchart LR
    A["Ingest and index sources"] --> B["Retrieve candidates"]
    B --> C["Rerank and assemble evidence"]
    C --> D["Generate grounded answer"]

Retrieval-augmented generation supplies selected external evidence to a generator. It can improve freshness and grounding, but it does not guarantee either.

flowchart LR
    D[Sources] --> I[Parse and normalize]
    I --> C[Chunk and enrich metadata]
    C --> X[Index]
    Q[Question] --> R[Retrieve]
    X --> R
    R --> K[Rerank and filter]
    K --> P[Construct grounded prompt]
    P --> M[Model]
    M --> V[Validate answer and citations]

Two evaluation planes

Exercise

Create five short documents and ten questions with known supporting passages. Record retrieved passages separately from generated answers so failure location is visible.

Primary source