Search Tutorials
--Ads--RAG Glossary
Short definitions of the terms used throughout this tutorial.
Short definitions of the terms used in this tutorial, in alphabetical order, with links to the lessons where they are explained in depth.
- Agentic RAG
- RAG in which the LLM decides when and how to retrieve by calling search tools, possibly several times. Lesson.
- Approximate nearest neighbour (ANN)
- Search methods that find almost the nearest vectors much faster than exact search, such as HNSW and IVF. Lesson.
- Bi-encoder
- A model that encodes queries and documents separately into vectors; standard embedding models are bi-encoders.
- BM25
- A classic keyword-ranking function based on term frequency, term rarity and document length.
- Chunk
- A passage of a document, the unit that is embedded, retrieved and given to the LLM. Lesson.
- Chunk overlap
- Text repeated between consecutive chunks so information on a boundary is not lost.
- Citation
- A reference from a statement in the answer to the source that supports it. Lesson.
- ColBERT
- A multi-vector retrieval model that compares query and document token by token (late interaction).
- ColPali
- A vision retrieval model that embeds page images as patch vectors. Lesson.
- Context window
- The maximum number of tokens a model can read in one request, including prompt and answer.
- Contextual retrieval
- Prepending LLM-written, document-aware context to each chunk before indexing. Lesson.
- Corrective RAG (CRAG)
- A method that grades retrieved documents and takes corrective action, such as re-searching, when they are poor.
- Cosine similarity
- A similarity measure based on the angle between two vectors. Lesson.
- Cross-encoder
- A model that reads a query and a document together and outputs a relevance score; used for reranking.
- Dense vector
- A fixed-length embedding in which every dimension has a value.
- Effort
- A Claude API setting (low to max) that controls how much the model thinks and how many tokens it spends.
- Embedding
- A vector representing the meaning of a piece of text (or an image).
- Faithfulness (groundedness)
- Whether every claim in an answer is supported by the provided context. Lesson.
- Fine-tuning
- Further training of a model on your own examples to change its behaviour.
- Golden test set
- A fixed set of questions with reference answers and evidence used to evaluate every version. Lesson.
- GraphRAG
- RAG over a knowledge graph of extracted entities and relationships, with community summaries. Lesson.
- Guardrails
- Checks on inputs and outputs that keep a system within its intended behaviour. Lesson.
- Hallucination
- A fluent but unsupported or false statement produced by an LLM.
- Hit rate@k
- The share of questions for which a relevant item appears in the top k results.
- HNSW
- Hierarchical Navigable Small World: a graph-based ANN index, the default in most vector databases.
- Hybrid search
- Combining keyword (sparse) and vector (dense) search, usually with rank fusion. Lesson.
- HyDE
- Hypothetical Document Embeddings: searching with the embedding of an LLM-written hypothetical answer. Lesson.
- Indexing
- The offline phase that loads, chunks, embeds and stores documents.
- IVF
- Inverted file index: an ANN method that clusters vectors and searches only the nearest clusters.
- Late chunking
- Embedding a whole document at token level, then pooling token vectors per chunk. Lesson.
- Late interaction
- Scoring by comparing every query token vector with every document token vector (MaxSim).
- LLM-as-judge
- Using an LLM with a rubric to grade outputs. Lesson.
- Lost in the middle
- The tendency of models to use information in the middle of long contexts less reliably. Lesson.
- Matryoshka embeddings
- Embeddings trained so that their first dimensions form a usable shorter embedding.
- MCP (Model Context Protocol)
- An open standard for connecting AI applications to tools and data. Lesson.
- Metadata filtering
- Restricting search results by attributes such as department, date or tenant. Lesson.
- MMR
- Maximal Marginal Relevance: selecting results that are relevant and diverse. Lesson.
- MRR
- Mean Reciprocal Rank: the average of 1 / rank of the first relevant result.
- MTEB
- Massive Text Embedding Benchmark, a leaderboard for embedding models.
- Multi-hop question
- A question that needs facts linked through other facts. Lesson.
- Multi-query retrieval
- Searching with several LLM-generated phrasings and fusing the results.
- Multi-tenancy
- Serving several customers from one system while keeping their data separate.
- nDCG
- Normalised Discounted Cumulative Gain: a ranking metric that supports graded relevance.
- Parent-child chunking
- Searching small chunks and returning their larger parent sections. Lesson.
- PII
- Personally identifiable information, such as names, phone numbers and ID numbers. Lesson.
- Precision@k
- The share of the top k results that are relevant.
- Product quantization (PQ)
- Compressing vectors by encoding sub-vectors with learned codebooks.
- Prompt caching
- Reusing the processed form of an identical prompt prefix for lower cost and latency. Lesson.
- Prompt injection
- Text that tries to override a model's instructions; "indirect" when it arrives through retrieved content. Lesson.
- Query condensing
- Rewriting a follow-up chat message into a standalone search question.
- Query routing
- Sending each question to the right index, tool or pipeline. Lesson.
- RAG
- Retrieval-Augmented Generation: retrieving relevant information and giving it to an LLM to generate an answer. Lesson.
- RAPTOR
- A method that builds a tree of recursive cluster summaries over chunks. Lesson.
- Recall@k
- The share of all relevant items that appear in the top k results.
- Reciprocal Rank Fusion (RRF)
- Merging ranked lists by summing 1 / (k + rank) for each item.
- Reranker
- A second-stage model that re-scores retrieved candidates for precision. Lesson.
- Self-query retrieval
- Using an LLM to extract metadata filters and a search query from a question. Lesson.
- Self-RAG
- A method in which the model critiques its own retrieval needs and outputs with reflection tokens.
- Semantic chunking
- Splitting text where the similarity between neighbouring sentences drops. Lesson.
- Sparse vector
- A vocabulary-sized vector with mostly zero values, used in keyword and SPLADE retrieval.
- SPLADE
- A learned sparse retrieval model that weights and expands terms.
- Step-back prompting
- Retrieving background with a more general version of the question. Lesson.
- Streaming
- Sending the answer token by token as it is generated. Lesson.
- Structured outputs
- Responses constrained to a JSON schema. Lesson.
- Text-to-SQL
- Generating SQL from a natural-language question to answer it from a database. Lesson.
- Token
- The unit of text an LLM reads and writes, roughly three to four characters of English.
- Top-k
- The k highest-scoring results of a search.
- Vector database
- A database that stores vectors with metadata and supports fast similarity search. Lesson.