RAGEngineering Hub

Glossary

Terms, in two lines each

A plain line for the idea, and a technical line for building it.

BM25

Classic keyword search that ranks documents by matching words.

A term frequency and inverse document frequency scoring function with length normalisation (k1, b).

RAG-27 Dense retrieval and keyword search with BM25

Chunk

A piece of a document small enough to search and fit in a prompt.

A retrievable unit produced by a chunking strategy, stored with its source and position metadata.

RAG-13 Why we chunk, and the main chunking strategies

Context window

How much text a model can read at once.

The maximum number of tokens in the prompt plus the output for a single model call.

RAG-03 Tokens and context windows for RAG

Embedding

A list of numbers that captures what a text means.

A dense vector from an encoder model; similar meanings give vectors with high cosine similarity.

RAG-19 Embeddings and similarity from first principles

Recall@k

How often the right answer is in the top k results.

The share of relevant items found in the top k ranked results, averaged over queries.

RAG-41 Retrieval metrics: precision, recall, MRR, nDCG

Retrieval augmented generation

Looking up relevant documents first, then letting the model answer using them.

A pipeline that retrieves context for a query and inserts it into the prompt before generation.

RAG-02 What RAG is: anatomy of a request

Token

A small piece of text, often part of a word, that models read and write.

A unit from the model's tokenizer vocabulary; counts and limits are measured in tokens, not words.

RAG-03 Tokens and context windows for RAG