Retrieval
The process of finding and extracting relevant information from a large collection of documents or data in response to a query. In AI systems, retrieval is often the first step before generation.
Why It Matters
Retrieval quality is the bottleneck for RAG systems — if you retrieve the wrong documents, even the best LLM will generate poor answers.
Example
A search system querying a vector database with a user's question and returning the top 5 most semantically similar document chunks for the LLM to use as context.
Think of it like...
Like a research assistant who pulls the most relevant files from a massive archive before you start writing — the quality of what they find determines the quality of your work.
Related Terms
Retrieval-Augmented Generation
A technique that enhances LLM outputs by first retrieving relevant information from external knowledge sources and then using that information as context for generation. RAG combines the power of search with the fluency of language models.
Semantic Search
Search that understands the meaning and intent behind a query rather than just matching keywords. It uses embeddings to find results that are conceptually related even if they use different words.
Vector Database
A specialized database designed to store, index, and search high-dimensional vector embeddings efficiently. It enables fast similarity searches across millions or billions of vectors.
Reranking
A second-stage ranking process that takes initial search results and reorders them using a more sophisticated model. Reranking improves precision by applying deeper analysis to a smaller candidate set.