There are many techniques for enhancing RAG, creating the additional challenge of knowing when to apply each. In this article, we will analyze query transformations and how to use a router to select the appropriate transformation based on the input prompt. (View Highlight)
The idea behind query transformations is that the retriever may not consider a user’s initial prompt particularly similar to the relevant documents in the database. In these cases, we can modify the query to increase its relevance to our sources before retrieving and feeding them to the language model. (View Highlight)