← Table of Contents · Page 497 of 868
RETRIEVAL-AUGMENTED GENERATION (RAG)
Part 8 of 9
CHAPTER SUMMARY
Retrieval-Augmented Generation fetches relevant passages and places them in context so the model answers from real sources.
Embeddings are lists of numbers capturing meaning, so similar meanings land close together.
Vector databases store embeddings and find the closest ones, enabling search by meaning, and are often combined with keyword search and reranking.
Chunking splits documents along natural boundaries with sensible size and overlap, and metadata supports filtering and citation.
Retrieval quality is measured with precision and recall.
Grounding reduces hallucination but does not remove it, so require citations, verify claims, treat retrieved text as untrusted, and enforce permissions.
KEY TERMS REVIEW
RAG: fetching relevant documents to ground answers.
Hallucination: a fluent but false statement by a model.
Embedding: a list of numbers representing meaning.
Vector database: a store that finds items closest in meaning.
Chunking: splitting documents into smaller pieces.
Overlap: shared text between neighboring chunks.
Metadata: extra labeled information about a chunk.
Precision and recall: measures of how accurate and how complete retrieval is.
Hybrid search: combining meaning search and keyword search.
Reranker: a model that re-sorts search results by relevance.
Grounding: tying answers to checkable sources.
Advertisement
Read Aloud:
0:00 / 0:00