Chapter 4. Retrieval
Improving the retrieval step is often one of the most effective ways to boost the overall performance of a RAG system.
There is no single right or wrong approach here. As with all other machine learning use cases, you need a solid toolkit to be creative. Often, the simplest solutions are most effective.
Figure 4-1 shows several techniques you can try when fine-tuning the retrieval step of your RAG system. For each of them, you can find suitable recipes in this chapter:
| Technique | Description | Recipe Reference |
|---|---|---|
Metadata Filtering |
Using metadata to filter search results based on what you know about the user |
|
Multi-Query Retrieval |
Creating multiple versions of the same prompt to find more relevant documents |
|
Query Routing System |
Using a query routing system to identify the best data sources or tools to use to answer the question |
[Link ... |