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.