Skip to content

Glossary

Key terms used throughout the RAG Lab portal, listed alphabetically.


Agentic RAG
A RAG variant in which an LLM autonomously decides when to retrieve, what to query, and how many retrieval rounds to perform — often using tool-calling or a planning loop rather than a single fixed retrieval step.
ANN (Approximate Nearest Neighbour)
A family of algorithms that find vectors close to a query vector without exhaustively comparing every entry in the index, trading a small accuracy loss for large speed gains.
Bi-encoder
A neural architecture that encodes the query and each document independently into dense vectors; similarity is computed as the dot product or cosine of the two vectors. Fast at retrieval time but less accurate than a cross-encoder.
BM25
A classical sparse retrieval algorithm that ranks documents by term-frequency / inverse-document-frequency statistics. Often used alongside dense retrieval in hybrid search.
Chunk
A fixed-size or semantically bounded excerpt of a larger document, produced by a text splitter, that becomes the unit of storage and retrieval in a RAG index.
Chunk overlap
The number of characters (or tokens) shared between consecutive chunks so that sentences near a boundary appear in full in at least one chunk.
ColBERT
A late-interaction retrieval model that stores per-token embeddings for documents and scores a query by the maximum similarity of each query token to any document token, achieving high accuracy with reasonable latency.
Context window
The maximum number of tokens an LLM can process in a single forward pass, including both the prompt and the generated response.
Cosine similarity
A measure of the angle between two vectors, ranging from −1 to 1; in RAG it is used to rank retrieved chunks by relevance to an embedded query.
Cross-encoder
A model that takes a (query, document) pair as a single input and outputs a relevance score; more accurate than a bi-encoder but too slow to score every document at query time — typically used for reranking a short candidate list.
Embedding
A dense, fixed-length numerical vector that represents text (or another modality) in a high-dimensional space where semantically similar content is geometrically close.
Faithfulness
A RAG evaluation metric that measures whether every claim in the generated answer is supported by the retrieved context, as opposed to being hallucinated.
Fine-tuning
The process of continuing to train a pre-trained model on a task-specific dataset to adapt its weights for a narrower domain or behaviour.
Grounding
Constraining an LLM's response to information present in a provided context, reducing the risk of hallucination.
Hallucination
Content generated by an LLM that is plausible-sounding but factually incorrect or unsupported by the source documents.
HNSW (Hierarchical Navigable Small World)
A graph-based ANN index structure that organises vectors into hierarchical layers for very fast approximate nearest-neighbour search; used internally by ChromaDB and other vector databases.
HyDE (Hypothetical Document Embeddings)
A query-transformation technique in which an LLM generates a hypothetical answer to the query, and that answer — rather than the raw query — is embedded and used for retrieval.
Hybrid search
A retrieval strategy that combines dense vector search (semantic) with sparse keyword search (e.g. BM25) and merges the results, typically outperforming either method alone.
Index
The data structure (e.g. an HNSW graph or inverted file) stored in a vector database that enables fast nearest-neighbour search over embedded chunks.
LLM (Large Language Model)
A neural network with billions of parameters trained on large text corpora to generate, summarise, translate, and reason over natural language.
MMR (Maximal Marginal Relevance)
A retrieval diversification strategy that iteratively selects the next chunk to be the one that is most relevant to the query while also being least similar to already-selected chunks.
Ollama
A local runtime for running open-weight LLMs (such as Llama, Mistral, and Phi) on consumer hardware via a simple REST API; used as the generation backend in this portal.
Quantization
A technique that reduces model weight precision (e.g. from 32-bit floats to 4-bit integers) to lower memory footprint and increase inference speed, at a small cost in quality.
RAG (Retrieval-Augmented Generation)
An architecture that augments an LLM's response by first retrieving relevant passages from an external knowledge store and injecting them into the prompt, enabling the model to answer questions grounded in up-to-date or domain-specific documents.
Reranking
A post-retrieval step that re-scores a short candidate list of chunks (often with a cross-encoder) to improve the ordering before the top results are passed to the LLM.
Retriever
The component of a RAG system responsible for querying the vector store and returning the most relevant chunks for a given question.
RRF (Reciprocal Rank Fusion)
A score-free result-merging algorithm for hybrid search that combines ranked lists from multiple retrievers by summing the reciprocal ranks of each document across all lists.
Token
The basic unit of text processed by an LLM, roughly corresponding to a word or sub-word fragment; context windows and pricing are measured in tokens.
Top-k
The number of highest-ranked chunks returned by the retriever and included in the LLM prompt.
Vector
See Embedding.
Vector database
A database optimised for storing, indexing, and querying high-dimensional embedding vectors; examples include ChromaDB, Pinecone, Weaviate, and Qdrant.