External Knowledge Is Not Always Needed: An Adaptive Retrieval Augmented Generation Method
Wenbo Guan, Jiyu Lu, Qinyu Feng, Xiaoqian Li, Jun Zhou · 2024
Retrieval augmented generation (RAG), by integrating external knowledge with large language models (LLMs), has become a common practice to alleviate LLMs’ hallucination problem. The performance of RAG, however, depends on the capability of the adopted information retriever to a large extent. Specifically, a good information retriever can manage to obtain the most useful information from the external knowledge, which will then enhance the quality of generated content from LLMs and vice versa. Since the vanilla RAG will always leverage the retrieved information to assist with LLMs’ content generation despite of its usefulness, when combined with a retriever of limited capacity, therefore, the vanilla RAG will not benefit LLMs’ content generation sometimes but introduce additional noise, having a negative impact on the final performance. To address this problem, this paper proposes a novel adaptive RAG method which first uses LLMs to determine the usefulness of the retrieved information and then let LLMs to generate content on their own without the retrieved information if it is useless. Experimental results on four datasets demonstrate the effectiveness of the proposed adaptive RAG method with information retrievers of various capabilities, improving the performance of the vanilla RAG by an obvious margin.