Contextual Retrieval in AI Systems
Sep 19, 2024

Summary
This post introduces 'Contextual Retrieval' as a method to improve RAG accuracy by prepending chunk-specific explanatory context before embedding and indexing. It combines 'Contextual Embeddings' and 'Contextual BM25' to reduce retrieval failure rates by 49%. Further improvements are achieved by integrating a reranking step, leading to a 67% reduction in failure rates. The post details the technical implementation, experimental results, and considerations for deployment, highlighting the cost-effectiveness with Claude's prompt caching.