Improving Retrieval for RAG based Question Answering Models on Financial Documents

Spurthi Setty,Harsh Thakkar,Alyssa Lee,Eden Chung,Natan Vidra
2024-08-01
Abstract:The effectiveness of Large Language Models (LLMs) in generating accurate responses relies heavily on the quality of input provided, particularly when employing Retrieval Augmented Generation (RAG) techniques. RAG enhances LLMs by sourcing the most relevant text chunk(s) to base queries upon. Despite the significant advancements in LLMs' response quality in recent years, users may still encounter inaccuracies or irrelevant answers; these issues often stem from suboptimal text chunk retrieval by RAG rather than the inherent capabilities of LLMs. To augment the efficacy of LLMs, it is crucial to refine the RAG process. This paper explores the existing constraints of RAG pipelines and introduces methodologies for enhancing text retrieval. It delves into strategies such as sophisticated chunking techniques, query expansion, the incorporation of metadata annotations, the application of re-ranking algorithms, and the fine-tuning of embedding algorithms. Implementing these approaches can substantially improve the retrieval quality, thereby elevating the overall performance and reliability of LLMs in processing and responding to queries.
Information Retrieval,Computation and Language,Machine Learning,General Finance
What problem does this paper attempt to address?
The paper aims to address the limitations of large language models (LLMs) in handling domain-specific issues, particularly the question-answering tasks in financial documents. Specifically, the paper focuses on the poor performance of retrieval-augmented generation (RAG) techniques when applied to financial documents. Although LLMs have great potential in generating accurate answers, there are still many challenges in dealing with complex domain-specific problems due to the limitations of training data and the inaccuracy of information retrieval. The paper proposes and explores the following methods to improve RAG techniques: 1. **Chunking Techniques**: By improving text chunking strategies, ensuring that each chunk contains relevant and coherent information rather than simply cutting by fixed length. 2. **Query Expansion**: By expanding the user's original query to better match the relevant document content, thereby improving retrieval quality. 3. **Metadata Annotation and Indexing**: Utilizing the metadata information of documents to enhance retrieval effectiveness and avoid confusion between different document contents. 4. **Re-ranking Algorithms**: Performing a secondary ranking of retrieval results to ensure that the most relevant chunks are prioritized. 5. **Embedding Algorithm Fine-tuning**: Fine-tuning embedding algorithms based on domain-specific knowledge to improve retrieval accuracy. Through these methods, the paper expects to significantly enhance the performance of RAG techniques in handling financial domain documents, reduce information omission or errors, and ultimately improve the overall system performance and reliability.