00-START-HERE · 01-READING-ROUTES · 00_06_for_practicing_engineers · 00_08_acknowledgments This unit standardizes the symbols, abbreviations, overloads, and measurement conventions used throughout the retrieval-augmented generation (RAG) book.
TL;DR
- The semi-parametric frame separates knowledge in generator parameters from knowledge in the retrievable datastore .
- The main flow is to to a retrieval gate, a ranked retrieval result, contexts, and generated answer .
- Retrieval and ranking notation covers relevance, rank, term statistics, encoders, token lengths, loss, and temperature.
- Index notation names vector count, dimension, graph degree, search breadth, product quantization, and recall targets.
- Evaluation and training notation distinguishes ranking quality, chunking quality, retrieval distributions, generator supervision, and low-rank factors.
- Multimodal, graph, latency, and cost symbols connect retrieval choices to modality thresholds, graph size, stage timing, and query price.
- Several conventional symbols are overloaded. The source keeps them and requires context to identify the intended meaning.
The story
Learned generator parameters are ; datastore remains externally addressable. Component stores are . Transform input into retriever query ; the gate selects whether retrieval runs. These are local definitions, not a claim that weights and stores have the same update operations. When retrieval runs, write for the ranked candidates. Candidate depth precedes filtering/reranking and final depth ; these are requested upper limits, and fewer eligible contexts may remain. The generator conditions on the request and retained to generate token by token. The library has several control panels. Retrieval scores and ranks items. The vector index controls how broadly the shelves are searched. Evaluation checks ranked results and chunk boundaries. Training aligns the retriever’s distribution with the generator’s preference. Multimodal admission rules and graph grounding decide which rooms and relationships can join the search. The checkout counter records each stage latency and query cost . Some labels repeat across panels. The label can mean a document at the search desk or a dimension at the index panel. The label only becomes safe when its panel and first-use definition are visible.
Decoder table
| Technical term | Plain-English meaning | Why it matters |
|---|---|---|
| The Semi-Parametric Frame: | Generator parameters, the parametric component | Knowledge stored in weights. |
| The Semi-Parametric Frame: | Datastore, the non-parametric component | Retrievable at test time. |
| The Semi-Parametric Frame: | Individual stores composing | Source selection ranges over these stores. |
| The Semi-Parametric Frame: | User input | What the user actually typed. |
| The Semi-Parametric Frame: | Query issued to the retriever | is the query transformation. |
| The Semi-Parametric Frame: | Retrieval gate | Decision one is whether to retrieve. |
| The Semi-Parametric Frame: | Retriever | Returns a ranked list. |
| The Semi-Parametric Frame: | Generator | The language model. |
| The Semi-Parametric Frame: | Retrieved contexts passed to the generator | These are the contexts retained after truncation. |
| The Semi-Parametric Frame: | Generated answer | is its t-th token. |
| The Semi-Parametric Frame: | Number of contexts passed to | The top-k cutoff. |
| The Semi-Parametric Frame: | Retrieval depth before reranking | . Truncation is decision five. |
| Retrieval and Ranking: | A document or chunk | Context disambiguates it from dimension. |
| Retrieval and Ranking: | Relevance score of for | No additional convention is stated. |
| Retrieval and Ranking: | Position of in a ranked list | Positions are 1-indexed. |
| Retrieval and Ranking: | Term frequency in a document | Used by BM25. |
| Retrieval and Ranking: | BM25 saturation and length-normalization parameters | Typically and . |
| Retrieval and Ranking: | Average document length in the collection | Used by BM25. |
| Retrieval and Ranking: | Query and passage encoders | Dense passage retrieval (DPR) convention. Bi-encoder. |
| Retrieval and Ranking: | Query and passage length in tokens | Drives encoder floating-point operations (FLOPs). |
| Retrieval and Ranking: | Late-interaction operator | ColBERT. |
| Retrieval and Ranking: | Training loss | No additional convention is stated. |
| Retrieval and Ranking: | Softmax temperature | Sharpens or flattens a score distribution. |
| Indexing and Vector Search: | Number of vectors in the index | Context distinguishes it from model parameter count. |
| Indexing and Vector Search: | Embedding dimensionality | Examples are 768 and . |
| Indexing and Vector Search: | HNSW neighbor/slot parameter | Base slots commonly ; is only their four-byte link payload |
| Indexing and Vector Search: | HNSW base-layer neighbor capacity | is a common allocation, not exact realized degree |
| Indexing and Vector Search: | HNSW search-time candidate list size | Recall and latency knob per query. |
| Indexing and Vector Search: | Number of inverted file (IVF) cells searched per query | Recall and latency knob per query. |
| Indexing and Vector Search: | Number of product quantization (PQ) sub-quantizers, or subvectors | Each subvector has dimension . |
| Indexing and Vector Search: | PQ centroids per subspace | With , total code bits are and fp32 codebooks use |
| Indexing and Vector Search: | Bits per sub-code only when explicitly defined | ; distinguish total |
| Indexing and Vector Search: | Recall at k | The index’s quality target. |
| Evaluation: | Mean reciprocal rank of the first relevant item | Multiple relevant items are allowed; specify cutoff and missing-hit rule |
| Evaluation: | Discounted cumulative gain and normalized discounted cumulative gain at k | Used with graded relevance. |
| Evaluation: | Precision and recall at k | Set metrics. They are order-insensitive. |
| Evaluation: | Text-segmentation error metrics | Used to evaluate a chunker. |
| Evaluation: | Intersection over union of chunk spans | Used to evaluate a chunker. |
| Evaluation: | for | State zero-denominator and macro/micro policies; not equivalent to accuracy |
| Training the RAG System: | Retrieved subset used for a training step | Normalization is over , not . |
| Training the RAG System: | Normalized retrieval weight in an output ensemble | REPLUG. |
| Training the RAG System: | Retriever’s distribution over the top k | Defined over the same k as the generator preference. |
| Training the RAG System: | Generator’s preference distribution over the same k | The supervision signal. |
| Training the RAG System: | Retriever and generator softmax temperatures | Language model (LM)-supervised retrieval. |
| Training the RAG System: | Directed Kullback–Leibler divergence | A fixed teacher target commonly uses ; direction matters |
| Training the RAG System: | LoRA rank | with compatible dimensions; scale and trainable matrices must be stated |
| Training the RAG System: | LoRA low-rank factors | The low-rank factors in . |
| Multimodal and Graph Retrieval: | Query and document embeddings in a shared space | Modality-agnostic. |
| Multimodal and Graph Retrieval: | Example modality-specific threshold | Validate score and modality calibration; no universal ban on a calibrated global gate |
| Multimodal and Graph Retrieval: | Contrastive similarity matrix | Contrastive Language-Image Pre-training (CLIP). true pairs lie on the diagonal. |
| Multimodal and Graph Retrieval: | Knowledge graph, its entities, and its edges | is the entity set. is the edge set. |
| Multimodal and Graph Retrieval: | Entity and edge counts | Drives construction and storage cost. |
| Multimodal and Graph Retrieval: | Query grounded against the graph schema | is the grounding operator. |
| Multimodal and Graph Retrieval: | Traversal depth in hops | No additional convention is stated. |
| Latency and Cost: | Latency of pipeline stage | Stages are embed, search, rerank, prefill, and decode. |
| Latency and Cost: | Cost per query under declared resource attribution | for dollars/hour and attributable milliseconds; not raw end-to-end wall time |
| Latency and Cost: | Serving batch size | No additional convention is stated. |
| Latency and Cost: | Number of tokens in a context or an answer | Context disambiguates its use. |
| Latency and Cost: | Number of transformer layers | Context distinguishes it from training loss . |
| Symbols That Carry More Than One Meaning: | Meaning A is a document or chunk in retrieval | Meaning B is embedding or hidden dimensionality in indexing and systems. |
| Symbols That Carry More Than One Meaning: | Meaning A is the number of retrieved contexts | Meaning B is centroids per sub-quantizer in product quantization. |
| Symbols That Carry More Than One Meaning: | Meaning A is the number of product quantization sub-quantizers | Meaning B is the number of datastore sources or a modality index. |
| Symbols That Carry More Than One Meaning: | HNSW parameter in this reference | Faiss PQ and other literatures may also use uppercase ; map each local meaning |
| Symbols That Carry More Than One Meaning: | Meaning A is the BM25 length-normalization parameter | Meaning B is code length in bits or bytes per parameter. |
| Symbols That Carry More Than One Meaning: | Meaning A is the number of vectors in the index | Meaning B is model parameter count in FLOPs arithmetic. |
| Symbols That Carry More Than One Meaning: | Meaning A is model parameter count in encoder FLOPs arithmetic | Meaning B is instance price per hour in cost arithmetic. |
| Symbols That Carry More Than One Meaning: | Meaning A is the knowledge graph | Meaning B is the graph’s schema alone in source section . |
| Conventions: | Logarithm with an explicitly declared base | for nats/log loss and displayed BM25; for DCG and code bits |
Conventions: GB |
Gigabyte in storage arithmetic | Decimal units. unless a quoted source uses binary units, which the text states at the point of use. |
| Conventions: | Latency | Measured in milliseconds unless otherwise labeled. |
Conventions: throughput |
Query throughput | Measured in queries per second unless otherwise labeled. |
| Conventions: | Query cost | Measured in United States (US) dollars per query unless otherwise labeled. |
Conventions: vector |
Vector orientation | Vectors are column vectors. |
| Conventions: | Transpose marker | denotes transpose. |
| Conventions: | Number formatting pattern | Thousands separators appear in numbers of four digits or more. |
| Conventions: | Recurring default configuration | Dimension 768 and Bidirectional Encoder Representations from Transformers base (BERT-base) parameter count 110M support comparison across chapters. |
Core mechanics
The Semi-Parametric Frame
- What: names the generator’s parametric knowledge. names test-time retrievable knowledge. The remaining symbols trace input, query transformation, gating, retrieval, context selection, and generation.
- Why: The frame keeps weight-based knowledge separate from datastore knowledge and makes each pipeline decision visible.
- Failure without it: A reader could confuse what the user typed with the retriever query, or confuse pre-reranking depth with the final top-k cutoff.
- Stated cost: No explicit cost formula appears in this section.
Retrieval and Ranking
- What: This notation defines documents, relevance scores, rank positions, BM25 statistics, encoders, token lengths, late interaction, training loss, and softmax temperature.
- Why: It gives one vocabulary for lexical ranking, encoded retrieval, training, and score calibration.
- Failure without it: Rank could lose its 1-indexed convention, could be mistaken for dimension, or could be mistaken for a score instead of a temperature.
- Stated cost: Query length and passage length drive encoder floating-point operations.
Indexing and Vector Search
- counts indexed vectors, not necessarily documents, while is their dimension.
- HNSW controls link allocation; is a common base-layer capacity. With four-byte slots, is the base-layer-only link subtotal, not complete memory. Expected upper-layer slots add under the stated geometric model.
- For PQ, equal subspaces have width . If each sub-code has bits, , total code length is bits and fp32 centroid payload is .
- and are search-work controls, not exact hop counts or guaranteed recall values.
Evaluation
- MRR uses the first relevant hit and permits several relevant items; it does not assume exactly one exists.
- Precision and recall at a fixed cutoff ignore order within that prefix, but changing membership changes them. Distinguish ANN-neighbor recall, relevance recall and complete supporting-evidence coverage.
- nDCG needs a gain function, positive IDCG or an explicit zero-IDCG policy, cutoff and judgment universe.
- requires declared averaging and zero-denominator policies; macro- is not accuracy or an overall error rate. Segmentation metrics and span IoU measure different objectives.
Training the RAG System
- A retrieved training support must be explicitly defined. A top-candidate normalized distribution is conditional on that support; full-corpus objectives use a different normalizer.
- If is the fixed teacher target, a common cross-entropy-equivalent direction is . Reverse KL is different; writing generic does not specify which system is the target.
- Require positive softmax temperatures. Define mixture weights, support and whether gradients flow through teacher scores.
- For , use and ; a common LoRA update is . Other orientations require a consistent factor order.
Multimodal and Graph Retrieval
- Shared embeddings require compatible training/normalization; “multimodal” does not make arbitrary encoder spaces interchangeable.
- denotes a chosen modality-specific gate. Calibration may justify another policy, so “never global” is not a universal theorem.
- A CLIP-style batch has diagonal designated pairs under its pairing convention; duplicates and multiple valid matches can require a richer target.
- Distinguish full graph from . Graph grounding is not proof that the extracted assertions or generated answer are true.
Latency and Cost
- Stage latency and attributable device service time are different quantities. A serial critical path can add stage wall times; parallel fan-out follows its dependency graph, not the sum of all branches.
- With resource price in dollars/hour and attributable service time in milliseconds, . This excludes fixed reservations, utilization policy and API billing unless explicitly included.
- A one-resource serial approximation can use only when those times really represent attributable, nonoverlapped reservation/service. Batching, concurrency and different devices invalidate casual wall-time billing.
- Use for parameters and for price to avoid the overloaded in calculations.
Symbols That Carry More Than One Meaning
- What: The source explicitly overloads , , , , , , , and .
- Why: These symbols remain consistent with their separate retrieval, representation-learning, and systems literatures.
- Failure without it: A familiar symbol could silently acquire the wrong meaning and corrupt a formula or design explanation.
- Stated cost: No cost is assigned to the convention. Each section states the active meaning at first use.
Conventions
- State the base explicitly: natural logs for nats, log loss and the displayed BM25 IDF; base for DCG and bit counts.
- Use decimal and binary precisely, not interchangeably. The storage convention does not require binary values to be quotations.
- Vectors are columns by default; stated row-stacked representations override that default. Check every product’s dimensions.
- The nominal , -parameter encoder is an illustrative recurring setup. Parameter count does not uniquely determine output dimension or achieved throughput.
Diagrams
The manifest lists zero figures and zero captioned tables for physical PDF pages 28-31. No diagram redraw is required. The source contains seven unnumbered notation tables and one unnumbered overload table. The exhaustive Decoder table preserves every row from those layouts. The prose conventions block is preserved in both the Decoder table and Core mechanics.
Whiteboard pack
What to draw
- Draw and a retrieval gate.
- Draw , candidate depth , eligibility/reranking and final contexts .
- Condition on the request and contexts to generate .
- Separate vector counts from model parameters, PQ sub-code bits from total code bits, and configured HNSW slots from realized degree.
- Add evaluation definitions and explicit teacher/retriever KL direction.
- Finish with dimension checks, log bases, storage units, resource service time and query cost.
Spoken script
Start with input and transform it into retriever query . A gate decides whether retrieval runs. Draw candidate contexts from datastore , then eligibility checks, reranking and final contexts for the generator. Under that path, separate score, index, evaluation and training panels. Define every overloaded letter locally. PQ bits per sub-code differ from total code bits, and HNSW capacity parameters differ from realized degree. Finally distinguish stage latency from attributable resource time, state the direction of any KL loss, and write explicit logarithm bases and storage units.
Interview traps
1. Why does the notation keep overloaded symbols instead of inventing new ones?
Each symbol is conventional in its own literature. The source preserves those conventions and requires the active meaning to be stated at first use.
2. Are and interchangeable?
No. Candidate depth and final depth refer to different stages. In the simple truncation pipeline, , but filters can leave fewer eligible items and other retrieval rounds need their own candidate counts.
3. What is the difference between and ?
denotes the full store and a declared retrieved training support. Top-candidate normalized distributions use . That is a modeling choice, not proof that every retrieval-training objective normalizes only over a retrieved subset.
4. Can denote product quantization?
This reference reserves for PQ and for HNSW, but external APIs can differ. Faiss PQ explicitly uses uppercase for its number of subquantizers. Map meaning and dimensions rather than assuming a global case-based prohibition.[1]
5. What does mean in cost arithmetic?
Use an explicit price symbol such as in cost arithmetic and for model parameters. The millisecond-to-hour divisor is . Multiplying price by summed stage wall time is valid only under a stated attribution model; it is not a universal per-query cost formula.
Key numbers
| Quantity | Source value | Meaning |
|---|---|---|
| Contributing literatures | Information retrieval, representation learning, and systems supply the conventional notation. | |
| Primary notation categories | Semi-parametric frame, retrieval and ranking, indexing and vector search, evaluation, training, multimodal and graph retrieval, and latency and cost. | |
| Explicitly overloaded symbols | , , , , , , , and . | |
| Retrieval gate outputs | or | Do not retrieve or retrieve. |
| Retrieval gate decision | The source calls retrieve-or-not decision one. | |
| Truncation decision | The source calls truncating to decision five. | |
| Rank origin | Ranked positions are 1-indexed. | |
| Typical BM25 | Saturation parameter. | |
| Typical BM25 | Length-normalization parameter. | |
| Example embedding dimensions | , | Examples for index dimensionality . |
| HNSW storage term | base-layer slot subtotal | Omit neither upper layers nor runtime/container memory |
| Layer 0 degree convention | Layer 0 has twice the stated upper-layer out-degree. | |
| Product quantization relation | ; total bits | Per-subcode bits and total code length are different |
| Mean reciprocal rank assumption | First relevant hit | Does not require exactly one relevant item |
| Contrastive diagonal | true pairs | CLIP places the true pairs on the diagonal of . |
| Latency stages | Embed, search, rerank, prefill, and decode contribute stage latencies. | |
| Cost denominator | Use attributable resource time, prices and a stated batching/reservation model | |
| Graph-schema overload pointer | Section 40.3 |
means the graph schema alone at this source pointer. |
| Default logarithm base | Explicit or | Natural logs for nats/log loss; base for DCG and bit counts |
| Decimal gigabyte | Binary units apply only when a quoted source states them at the point of use. | |
| Thousands-separator threshold | Use separators for readability | Years, identifiers and dimensional subscripts need not acquire grouping separators |
| Recurring default dimension | Used for comparison across chapters. | |
| Recurring BERT-base parameter count | Used for comparison across chapters. |
00-START-HERE · 01-READING-ROUTES · 00_06_for_practicing_engineers · 00_08_acknowledgments