增强检索与管理检索:一种四模块协同以提升RAG系统的质量与效率
Enhancing Retrieval and Managing Retrieval: A Four-Module Synergy for Improved Quality and Efficiency in RAG Systems
AI总结:
针对现有RAG系统存在的单查询信息平台效应、歧义、无关知识及冗余检索问题,提出含查询重写器+、知识过滤器等的四模块协同方案,经六个QA数据集验证可同时提升响应质量与效率。
摘要:
检索增强生成(Retrieval-augmented generation, RAG)技术利用大语言模型(large language models, LLMs)的上下文学习能力生成更准确、更相关的响应。RAG框架起源于简单的“检索后读取”方法,现已发展为一种高度灵活的模块化范式。查询重写器(Query Rewriter)模块是其中的关键组件,它通过生成便于搜索的查询来增强知识检索,使输入问题与知识库更匹配。本研究发现了将查询重写器模块升级为查询重写器+(Query Rewriter+)的优化空间:通过生成多个查询来克服单查询带来的信息平台效应,同时重写问题以消除歧义,从而明确潜在意图。我们还发现当前RAG系统存在无关知识的问题,为此提出了知识过滤器(Knowledge Filter)。这两个模块均基于经过指令微调的Gemma-2B模型构建,二者协同提升响应质量。最后发现的问题是冗余检索,我们引入记忆知识库(Memory Knowledge Reservoir)和检索触发器(Retriever Trigger)来解决该问题:前者以无参数的方式支持RAG系统知识库的动态扩展,后者则优化了访问外部知识的成本,从而提升资源利用率和响应效率。这四个RAG模块协同作用,提升了RAG系统的响应质量与效率。我们在六个常见问答(QA)数据集上通过实验和消融研究验证了这些模块的有效性。源代码可访问https://github.com/Ancientshi/ERM4获取。
英文摘要:
Retrieval-augmented generation (RAG) techniques leverage the in-context learning capabilities of large language models (LLMs) to produce more accurate and relevant responses. Originating from the simple 'retrieve-then-read' approach, the RAG framework has evolved into a highly flexible and modular paradigm. A critical component, the Query Rewriter module, enhances knowledge retrieval by generating a search-friendly query. This method aligns input questions more closely with the knowledge base. Our research identifies opportunities to enhance the Query Rewriter module to Query Rewriter+ by generating multiple queries to overcome the Information Plateaus associated with a single query and by rewriting questions to eliminate Ambiguity, thereby clarifying the underlying intent. We also find that current RAG systems exhibit issues with Irrelevant Knowledge; to overcome this, we propose the Knowledge Filter. These two modules are both based on the instruction-tuned Gemma-2B model, which together enhance response quality. The final identified issue is Redundant Retrieval; we introduce the Memory Knowledge Reservoir and the Retriever Trigger to solve this. The former supports the dynamic expansion of the RAG system's knowledge base in a parameter-free manner, while the latter optimizes the cost for accessing external knowledge, thereby improving resource utilization and response efficiency. These four RAG modules synergistically improve the response quality and efficiency of the RAG system. The effectiveness of these modules has been validated through experiments and ablation studies across six common QA datasets. The source code can be accessed at https://github.com/Ancientshi/ERM4.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。