Retrieval-Augmented Generation (RAG) Enhancements
Contextual Retrieval in AI Systems

Contextual Retrieval in AI Systems

9/19/2024

What this post added

Introduced 'Contextual Retrieval' as a method to improve RAG by prepending chunk-specific explanatory context before embedding and indexing. This involves 'Contextual Embeddings' and 'Contextual BM25' techniques. Demonstrated that Contextual Embeddings reduced retrieval failure rate by 35%, and the combination with Contextual BM25 reduced it by 49%. Further improvements were achieved by combining Contextual Retrieval with reranking, reducing the failure rate by 67%. Detailed the preprocessing flow, cost-effectiveness with prompt caching, and considerations for implementation.

Read the original post ↗