RAG glossary
142 key terms, each in one sentence, with the lesson that teaches it.
A
- A/B testing
- comparing two system variants by routing real traffic to each and measuring an outcome metric.
- A-B and Online Evaluation of RAG
- Adaptation strategy
- the general choice of mechanism (retrieval, fine-tuning, long-context, or some combination) used to close a gap between a model's default behavior and what a task needs.
- RAG vs. Fine-Tuning vs. Long-Context
- Aggregate
- a computed value (count, sum, average) across multiple rows, as opposed to a single retrieved record.
- Retrieval over Structured Data
- Answer relevancy
- how closely a generated answer's embedding matches the question's embedding.
- Faithfulness and Answer Relevancy Metrics
- Approximation trade-off
- accepting a small risk of missing the true closest results in exchange for a large reduction in search cost.
- Exact Nearest Neighbor Search
- Assembly
- arranging retrieved passages into the prompt the model will actually generate from.
- Anatomy of a RAG Pipeline
- Assembly order
- the specific sequence in which retrieved passages are placed within the assembled context.
- Context Assembly and Ordering
B
- Bi-encoder
- an encoder applied independently to the query and to each document, enabling document vectors to be precomputed.
- Bi-Encoders and Dense Embeddings
- BM25
- a smoothed, saturating refinement of TF-IDF widely used as a strong sparse-retrieval baseline.
- Sparse Retrieval with TF-IDF and BM25
- Boilerplate
- text that repeats across a document's pages or sections without carrying page-specific content (headers, footers, page numbers).
- Parsing Documents for Retrieval
- Boundary-straddling fact
- a piece of information that falls across where a chunk boundary happens to land, risking being split and lost.
- Chunk Overlap and Size Trade-offs
- Budget collapse
- the point at which growing conversation history leaves too little room for retrieved content to contribute meaningfully.
- Context-Window Budgeting for RAG
C
- Cache hit rate
- the fraction of requests that can be served from the cache rather than requiring full computation.
- Caching and Incremental Indexing
- Caching
- storing and reusing the result of a previous computation (a query's answer, an embedding) instead of recomputing it.
- Caching and Incremental Indexing
- Centroid
- the representative center point of a cluster, used to decide which cluster a query or vector belongs to.
- Approximate Nearest Neighbor Search with IVF and Product Quantization
- Citation
- linking a specific claim in a generated answer to the retrieved passage that supports it.
- Citation and Source Attribution
- Citation threshold
- the minimum similarity a claim's best-matching passage must reach to be cited rather than flagged unsupported.
- Citation and Source Attribution
- Confidence decay
- the gradual drop in reliability of a model's unretrieved answers as a question moves further past its training cutoff.
- Hallucination and Knowledge Cutoff
- Conflicting context
- two or more retrieved passages that answer the same question with different, incompatible information.
- Handling Noisy or Conflicting Retrieved Context
- Context assembly
- arranging retrieved passages into the final prompt sent to the generating model.
- Context Assembly and Ordering
- Context budget
- the fixed total token capacity available for a single request's prompt.
- Context-Window Budgeting for RAG
- Context noise
- retrieved content that is irrelevant, contradictory, or otherwise unhelpful once it reaches generation.
- Handling Noisy or Conflicting Retrieved Context
- Context precision/recall
- retrieval-side metrics measuring how much of the retrieved context is relevant, and how much of the relevant content was retrieved.
- End-to-End RAG Evaluation Frameworks
- Corrective RAG
- classifying a retrieval's overall quality and routing to different corrective actions based on that classification.
- Corrective RAG
- Coverage
- the fraction of a corpus that has at least one associated evaluation question.
- Synthetic Test-Set Generation for RAG
- Cross-encoder
- a model that jointly processes a query and a document together to produce a single relevance score.
- Cross-Encoders and Re-Rankers
- Cross-modal similarity
- a similarity score computed between embeddings from two different modalities.
- Multimodal RAG
D
- Data leakage
- unauthorized content reaching a user through a system that wasn't supposed to grant them access to it.
- Security and Data Leakage in RAG
- Dense embedding
- a vector representation (as opposed to a sparse, word-count-based one) produced by an encoder like a bi-encoder.
- Bi-Encoders and Dense Embeddings
- Dense retrieval
- ranking documents by embedding (cosine) similarity to a query, rather than exact vocabulary overlap.
- Dense Retrieval
- Domain adaptation
- fine-tuning a general-purpose model on data from a specific domain so it better reflects that domain's vocabulary and conventions.
- Domain-Adapting Embedding Models
E
- End-to-end evaluation framework
- a combined scorecard covering both retrieval-side and generation-side metrics.
- End-to-End RAG Evaluation Frameworks
- End-to-end trace
- following one request through every stage of a pipeline in order, rather than examining each stage in isolation.
- Capstone: A Question Answered, Traced from Query to Grounded Answer
- Entity extraction
- identifying entities and relationships from raw documents to build a knowledge graph in the first place.
- Graph-Based RAG
- Exact nearest neighbor search
- finding the true closest vectors to a query by comparing against every vector in the collection.
- Exact Nearest Neighbor Search
F
- Failure mode
- a recurring, recognizable way a RAG system produces a bad result.
- Common RAG Failure Modes
- Faithfulness
- the fraction of a generated answer's claims that are supported by retrieved context.
- Grounded Generation and Faithfulness
- the fraction of an answer's claims grounded in retrieved context (covered in depth in Grounded Generation and Faithfulness).
- Faithfulness and Answer Relevancy Metrics
- Fallback action
- an alternative strategy (query refinement, broader search) triggered when a retrieval is judged too weak to generate from directly.
- Corrective RAG
- Fixed-size chunking
- splitting text at a constant character or token count, regardless of word or sentence boundaries.
- Fixed-Size and Recursive Chunking
- Flattening
- converting structured content into unstructured prose, discarding the structure in the process.
- Handling Tables, Code and Structured Content
- Freshness
- how quickly a change in the real world can be reflected in a system's answers.
- RAG vs. Fine-Tuning vs. Long-Context
- Freshness filter
- a metadata-based filter that excludes chunks older than a given cutoff date.
- Metadata Extraction and Enrichment
- Freshness-based resolution
- resolving a conflict by keeping the most recently dated passage and discarding the others.
- Handling Noisy or Conflicting Retrieved Context
- Fusion constant (k)
- a smoothing parameter in RRF that softens the effect of small rank differences near the top.
- Hybrid Retrieval Fusion
G
- Graded relevance
- a relevance score with more than two levels (not just relevant/irrelevant), as NDCG uses.
- Retrieval Metrics: Precision, Recall, MRR and NDCG
- Graph traversal
- following edges from one entity to the next to answer a question spanning multiple relationships.
- Graph-Based RAG
- Greedy search
- repeatedly moving to whichever linked neighbor is closest to the query, stopping once no neighbor improves on the current position.
- Approximate Nearest Neighbor Search with HNSW
- Grounded answer
- a generated answer whose claims are verifiably supported by retrieved context.
- Capstone: A Question Answered, Traced from Query to Grounded Answer
- Grounded generation
- generation that draws its claims from retrieved context rather than unretrieved, pretrained knowledge.
- Grounded Generation and Faithfulness
H
- Hallucination
- a model producing a confident, fluent answer that is factually wrong.
- Hallucination and Knowledge Cutoff
- HNSW (Hierarchical Navigable Small World)
- an approximate nearest-neighbor method based on greedy search over a graph of linked vectors.
- Approximate Nearest Neighbor Search with HNSW
- Hybrid index
- an index combining metadata filtering with vector similarity search, supporting efficient pre-filtering.
- Metadata Filtering and Hybrid Indexes
- HyDE (Hypothetical Document Embeddings)
- embedding a generated hypothetical answer instead of the bare query, to better match the phrasing of real documents.
- Hypothetical Document Embeddings (HyDE)
- Hypothetical answer
- a plausible, not-necessarily-correct generated response used only to improve retrieval, not shown to the user.
- Hypothetical Document Embeddings (HyDE)
I
- In-domain training pairs
- (query, relevant passage) examples drawn from the specific domain a model is being adapted to.
- Domain-Adapting Embedding Models
- Incremental indexing
- adding new documents to an existing index at a cost proportional to what's added, not the whole collection.
- Caching and Incremental Indexing
- Independent failure modes
- two ways an answer can go wrong that don't imply or predict each other.
- Faithfulness and Answer Relevancy Metrics
- Index persistence
- storing a built index to disk so it survives a restart without being rebuilt from scratch.
- Vector Databases and Index Management
- int8
- an 8-bit (1-byte) integer representation, commonly used as a quantization target for embeddings originally stored as 32-bit floats.
- Embedding Quantization for Retrieval
- Intermediate fact
- a piece of information retrieved not because it directly answers the question, but because it's needed to form the next search.
- Multi-Hop and Iterative Retrieval
- IVF (inverted file index)
- an index that clusters vectors ahead of time and searches only the clusters nearest a query.
- Approximate Nearest Neighbor Search with IVF and Product Quantization
J
- Joint encoding
- processing two inputs together, allowing interactions between them, as opposed to encoding each independently.
- Cross-Encoders and Re-Rankers
K
- Knowledge graph
- a structure of entities and labeled relationships (edges) between them.
- Graph-Based RAG
L
- Late interaction
- comparing query and document representations at the token level at query time, after both were encoded independently.
- Multi-Vector and Late-Interaction Retrieval
- Latency breakdown
- how a request's total time is divided among its constituent stages.
- Production RAG Pipeline Architecture
- Linear scan
- checking every item in a collection one by one, with cost proportional to collection size.
- Exact Nearest Neighbor Search
- Long-context
- supplying potentially relevant information directly in the prompt rather than searching for it, limited by the context window and its per-request cost.
- RAG vs. Fine-Tuning vs. Long-Context
- Long-range link
- a graph edge connecting distant regions, letting a search cross large distances in a single hop.
- Approximate Nearest Neighbor Search with HNSW
- Lost-in-the-middle effect
- the tendency for information in the middle of a long context to be used less reliably than information at the start or end.
- Context Assembly and Ordering
M
- MaxSim
- scoring by summing, for each query token, its single highest similarity to any document token.
- Multi-Vector and Late-Interaction Retrieval
- Metadata
- structured information about a chunk (date, source, section, permissions) kept separate from its searchable text.
- Metadata Extraction and Enrichment
- MRR (mean reciprocal rank)
- the reciprocal of the position of the first relevant result in a ranking.
- Retrieval Metrics: Precision, Recall, MRR and NDCG
- Multi-hop retrieval
- chaining multiple retrieval passes, where a later search uses an earlier search's result as its query.
- Multi-Hop and Iterative Retrieval
- Multi-vector retrieval
- representing a document as multiple token-level embeddings instead of one pooled vector.
- Multi-Vector and Late-Interaction Retrieval
- Multimodal RAG
- retrieval where the query and the retrieved content are in different modalities (text and images, for instance).
- Multimodal RAG
N
- NDCG (normalized discounted cumulative gain)
- a ranking metric using graded relevance, discounted by position, normalized against the ideal ordering.
- Retrieval Metrics: Precision, Recall, MRR and NDCG
- Near-duplicate chunks
- chunks with very similar or identical text that differ in some attribute, such as when they were last updated.
- Metadata Extraction and Enrichment
- NL-to-query translation
- converting a natural-language question into a structured query's filter and operation.
- Retrieval over Structured Data
- Noise fraction
- the share of a raw extraction that turns out to be boilerplate rather than real content.
- Parsing Documents for Retrieval
- Non-parametric knowledge
- information kept in an external, searchable store, updatable immediately without touching the model.
- Parametric vs. Non-Parametric Knowledge
O
- Online evaluation
- measuring a system against real user behavior, as opposed to a fixed offline test set.
- A-B and Online Evaluation of RAG
- Overlap
- the number of characters (or tokens) repeated between the end of one chunk and the start of the next.
- Chunk Overlap and Size Trade-offs
P
- Parametric confidence
- the model's own estimate of how likely its unretrieved answer is to be correct.
- Self-RAG and Reflective Retrieval
- Parametric knowledge
- information implicitly stored in a model's trained weights, updatable only by retraining.
- Parametric vs. Non-Parametric Knowledge
- Parsing
- converting a document's native format into clean text suitable for chunking.
- Parsing Documents for Retrieval
- Permission filtering
- restricting retrieval to only chunks a given user is authorized to see.
- Security and Data Leakage in RAG
- Phrasing mismatch
- the stylistic gap between how a question is phrased and how its answer is phrased, which hurts a bare query's embedding similarity to the real answer.
- Hypothetical Document Embeddings (HyDE)
- Pipeline architecture
- the overall design of how a RAG system's stages connect and hand off to each other.
- Production RAG Pipeline Architecture
- Post-filtering
- applying a metadata filter after an ANN search has already produced its top-k results by similarity.
- Metadata Filtering and Hybrid Indexes
- Pre-filtering
- applying a metadata filter before similarity search, ranking only among already-eligible candidates.
- Metadata Filtering and Hybrid Indexes
- Precision/recall trade-off
- the cost of expansion — more matching terms can mean more irrelevant matches too.
- Query Expansion and Rewriting
- Precomputation
- computing and storing document vectors once, ahead of any specific query.
- Bi-Encoders and Dense Embeddings
- Product quantization
- compressing vectors within a cluster to speed up and shrink the memory of searching inside it.
- Approximate Nearest Neighbor Search with IVF and Product Quantization
- Production pipeline
- the full chain of stages (embed, search, re-rank, assemble, generate) a real RAG system runs per request.
- Production RAG Pipeline Architecture
- Prompt injection via retrieved content
- a retrieved document containing text designed to redirect the generating model's behavior.
- Security and Data Leakage in RAG
Q
- Quantization
- representing each value in a vector with fewer bits, trading precision for reduced memory.
- Embedding Quantization for Retrieval
- Query expansion
- adding related terms to a query before retrieval, to compensate for exact-vocabulary matching limitations.
- Query Expansion and Rewriting
- Question-answer triple
- a generated question paired with its expected answer and the source chunk it was derived from.
- Synthetic Test-Set Generation for RAG
R
- RAG overhead
- the added latency a RAG pipeline introduces on top of a plain generation call.
- Cost and Latency of RAG Systems
- Re-ranker
- a (typically cross-encoder) model applied to a short list of already-retrieved candidates to reorder them more accurately.
- Cross-Encoders and Re-Rankers
- Re-ranking
- applying a more accurate (and more expensive) scoring method to a shortlist a cheaper method already produced.
- Re-Ranking Retrieved Results
- Reciprocal rank fusion (RRF)
- a fusion method that combines rankings using each candidate's rank position, not its raw score.
- Hybrid Retrieval Fusion
- Recursive chunking
- splitting on structural units (paragraphs, sentences) and packing them up to a size limit without ever cutting one in half.
- Fixed-Size and Recursive Chunking
- Redundancy
- the fraction of total stored characters that are duplicates caused by overlap.
- Chunk Overlap and Size Trade-offs
- Relative overhead
- added latency expressed as a percentage of the baseline (plain call) latency, which shifts as the baseline itself changes.
- Cost and Latency of RAG Systems
- Relevance check
- a self-assessment of whether a retrieved passage actually bears on the question asked.
- Self-RAG and Reflective Retrieval
- Replication
- maintaining copies of an index across multiple machines for availability and scale.
- Vector Databases and Index Management
- Retrieval verdict
- the bucket (correct, ambiguous, incorrect) a retrieval is classified into.
- Corrective RAG
- Retrieval-augmented generation (RAG)
- combining a model's parametric knowledge with non-parametric knowledge fetched from a document store at answer-time.
- Parametric vs. Non-Parametric Knowledge
- Retrieval-side latency
- the time spent on embedding, searching, and re-ranking, as opposed to generation itself.
- Cost and Latency of RAG Systems
- Root cause
- the underlying pipeline stage responsible for a surface-level symptom.
- Common RAG Failure Modes
- Row-preserved chunking
- keeping each structural unit (a table row, a function) as its own chunk.
- Handling Tables, Code and Structured Content
S
- Scale factor
- the value used to convert between a quantized integer and its original floating-point range.
- Embedding Quantization for Retrieval
- Self-RAG
- a RAG variant where the model itself decides whether to retrieve and whether to trust what was retrieved.
- Self-RAG and Reflective Retrieval
- Semantic chunking
- placing chunk boundaries where consecutive sentences' embedding similarity drops, rather than at a fixed size.
- Semantic and Structure-Aware Chunking
- Semantic matching
- finding content related in meaning, even without shared surface vocabulary.
- Dense Retrieval
- Sense ambiguity
- a term having multiple distinct meanings, with the correct one depending on context or domain.
- Domain-Adapting Embedding Models
- Shared embedding space
- a vector space where content from multiple modalities is embedded so that semantically related items land close together regardless of modality.
- Multimodal RAG
- Shortlist
- the reduced set of candidates passed from a cheap retrieval stage to an expensive re-ranking stage.
- Re-Ranking Retrieved Results
- the reduced set of candidates retrieval passes on to re-ranking.
- Capstone: A Question Answered, Traced from Query to Grounded Answer
- Similarity threshold
- the cutoff below which two consecutive sentences are considered different enough to warrant a chunk boundary.
- Semantic and Structure-Aware Chunking
- Source attribution
- the broader practice of tracing generated content back to its retrieved origins.
- Citation and Source Attribution
- Sparse retrieval
- ranking documents by weighted exact-term overlap with a query, as opposed to embedding-based similarity.
- Sparse Retrieval with TF-IDF and BM25
- Stage localization
- identifying which specific pipeline stage (retrieval vs. generation) a low score points to.
- End-to-End RAG Evaluation Frameworks
- Statistical significance
- whether an observed difference is large enough, relative to sample size, to be distinguishable from random noise.
- A-B and Online Evaluation of RAG
- Structure-aware chunking
- splitting at a document's own structural markers (headings, paragraphs) instead of computing similarity.
- Semantic and Structure-Aware Chunking
- Structured content
- content whose meaning depends on an explicit structure (tables, code, forms) rather than flowing prose.
- Handling Tables, Code and Structured Content
- Structured query
- a precise, executable filter or aggregate operation run directly against structured data.
- Retrieval over Structured Data
- Symptom-to-fix mapping
- associating an observed problem with the specific pipeline stage and technique that addresses it.
- Common RAG Failure Modes
- Synonym
- a word with a similar meaning used to expand a query's matching vocabulary.
- Query Expansion and Rewriting
- Synthetic test-set generation
- automatically producing (question, answer, source) evaluation triples from a document collection.
- Synthetic Test-Set Generation for RAG
T
- TF-IDF
- a term-weighting scheme combining term frequency and inverse document frequency.
- Sparse Retrieval with TF-IDF and BM25
- Token allocation
- how a fixed budget is divided between competing consumers (conversation history, retrieved chunks).
- Context-Window Budgeting for RAG
- Top-k
- the number of highest-scoring documents kept after retrieval, out of the full collection.
- Anatomy of a RAG Pipeline
- Training cutoff
- the date after which no data existed in a model's training set.
- Hallucination and Knowledge Cutoff
- Two-stage retrieval
- a pipeline combining a fast, broad first pass with a slow, narrow second pass.
- Re-Ranking Retrieved Results
U
- Unsupported claim
- a generated claim with no sufficiently similar retrieved passage backing it.
- Grounded Generation and Faithfulness
V
- Vector database
- a system that wraps an ANN search algorithm with insert/update/delete support, persistence, metadata filtering and replication.
- Vector Databases and Index Management
- Vocabulary mismatch
- the gap between how a query and a relevant document happen to express the same idea in different words.
- Dense Retrieval
No term matches that filter.