A retrieval index organizes documents or document representations so a retriever can efficiently find relevant context for downstream language generation. In retrieval-augmented generation (RAG), it connects an external knowledge source to a language model without changing the model’s initial prompt. section 7.1 section 7.3
A dense retrieval index typically supports this workflow:
- Encode the input question or statement into a query vector. section 7.3
- Store documents as pre-encoded vectors in a precompiled document index. section 7.3
- Search the index with maximum inner product search (MIPS) to identify documents most similar to the query. section 7.3
- Pass relevant retrieved documents to the language model as context for answering questions, verifying facts, or generating questions. section 7.3
Enterprise knowledge assistant
An organization can index private knowledge sources and retrieve current, relevant documents before generating an answer. The index must be curated and regularly updated because outdated or irrelevant documents produce poor responses. section 7.1 section 7.6
Figure 7.1 RAG architecture overview
Use the RAG architecture overview to trace how the retriever connects the index with the generative model. section 7.1
Production indexing requires attention to scalability, storage and compute costs, retrieval speed, parallel requests, retries, governance, interoperability, and troubleshooting across retrieval and generation. section 7.6
