Retrieval-augmented generation (RAG) depends on several independently versioned components. The relevant facts must survive ingestion, chunking, vector and lexical retrieval, reranking and context selection. Search quality and knowledge freshness deserve separate diagnostics.
In this chapter
- From source documents to grounded answersFollow parsing, hybrid search, ranking, context assembly and large-corpus scaling.
- Document chunking, revisions and incremental indexingKeep source changes, chunk hashes, citations and active revisions consistent.
- Vector indexes, ranking and retrieval metricsCompare HNSW, IVF, BM25, reranking, MRR, nDCG and evidence coverage.
- Embedding versions, index migration and cache invalidationBuild and publish compatible embedding releases without mixing vector spaces.
- Choosing embeddings, rerankers and generation modelsRun controlled experiments and compare end-to-end quality, p95 latency and cost.
- Embedding dimensions, corpus size and retrieval costEstimate storage, index memory, vector count and generation-model resource costs.
- Retrieving tables, images, code and structured evidenceLayout, source spans, AST chunks and multimodal evidence.
- Query planning, multi-hop retrieval and GraphRAGDecomposition, relationships and complete-evidence evaluation.
Continue into AI evaluation to locate the point where required evidence disappears.