Part III - RAG: Supplying external evidence

Many questions depend on private records, recent changes, or sources that the answer must cite. A model’s parameters do not provide a dependable way to retrieve those records or their source locations. Retrieval-Augmented Generation (RAG) searches approved sources and adds selected passages to the request before generation.

This Part builds two linked paths. The preparation path parses documents, preserves their source and page information, divides them into useful pieces, and indexes them. The answering path forms a query, retrieves permitted passages, may rerank them, adds them to the request, generates a cited answer, and records enough detail to locate a retrieval or generation failure.

Chapter 6 follows documents from preparation through retrieval and ranking to an answer supported by the selected passages. Chapter 7 uses the resulting record to test whether the right evidence was found, whether the answer used it faithfully, and whether the complete response solved the user’s task.

Chapter 6 shows source-tagged chunks stored in an index, permission and query filters before retrieval, an optional reranker, and selected context and the question entering generation with fixed model weights. The output document is labelled Citations; the run trace identifies the answer with citations. The application checks that cited records exist and are accessible; citation ID presence is not proof of support. Chapter 7 compares ranked candidates with labelled evidence, checks claims against actual passages, checks task criteria, and records the run. A lower strip compares a baseline with one change on fixed cases using component and final-answer checks. There is no direct index-to-answer bypass.
Figure 1: Part III builds a preparation path and an answering path, then tests whether the right evidence was found and used faithfully. Open full-size map (new tab).

Chapters in this part