Sitemap
TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

3 Advanced Document Retrieval Techniques To Improve RAG Systems

Query expansion, cross-encoder re-ranking, and embedding adaptors

10 min readJan 15, 2024

--

Press enter or click to view image in full size
Image created by the author using DALL-E 3

Have you ever observed that documents retrieved by RAG systems may not always align with the user’s query?

This is a common occurrence, particularly with off-the-shelf RAG implementations. Documents may lack complete answers to the query, contain redundant information, or include irrelevant details. Furthermore, the order in which these documents are presented may not consistently match the user’s intent.

In this post, we will explore three effective techniques to enhance document retrieval in RAG-based applications:

  1. Query expansion
  2. Cross-encoder re-ranking
  3. Embedding adaptors

By incorporating these techniques, you can retrieve more pertinent documents that closely match the user’s query, thereby increasing the impact of the generated answer.

Let’s have a look 👇.

If you’re interested in ML content, detailed tutorials and practical tips from the industry, follow my newsletter. It’s called The Tech Buffet.

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Ahmed Besbes
Ahmed Besbes

Written by Ahmed Besbes

Medium Top Writer (+2M views) | I write about python and productionizing ML code into scalable apps. Exclusive content here: https://thetechbuffet.substack.com/

Responses (11)