This chapter covers
- Limitations of the naïve RAG approach
- Advanced RAG strategies and techniques
- Modular patterns in RAG
In the first two parts of this book, you learned about the utility of retrieval-augmented generation (RAG), along with the development and evaluation of a basic RAG system. The basic, or the naïve RAG approach that we have discussed is, generally, inadequate when it comes to production-grade systems.
This chapter focuses on more advanced concepts in RAG. We begin by revisiting the limitations and the points of failure of the naïve RAG approach. Next, we discuss the failures at the retrieval, augmentation, and generation stages. Advanced strategies and techniques to address these points of failure will be elaborated on in distinct phases of the RAG pipeline.
Better indexing of the knowledge base leads to better RAG outcomes. We will look at a few data indexing strategies that build on the naïve indexing pipeline to improve the searchability of the knowledge base.