arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.08105cs.CL
收藏

通过动态上下文学习实现检索增强生成的查询建议

Query Suggestion for Retrieval-Augmented Generation via Dynamic In-Context Learning

Celonis, Inc.(Celonis公司)

Fabian Spaeh, Tianyi Chen, Chen-Hao Chiang, Bin Shen

AI总结:

本文提出通过动态上下文学习实现检索增强生成的查询建议,以提升用户交互的安全性和有效性。

摘要:

检索增强生成结合工具调用代理(agentic RAG)在理解、处理和响应用户查询方面变得越来越强大。然而,基础知识的范围有限,提出超出此范围的问题可能导致幻觉问题。虽然防护框架旨在阻止超出范围的问题(Rodriguez等,2024),但没有人研究了建议可回答的问题以完成用户交互的问题。在本文中,我们开始研究agentic RAG的查询建议。我们考虑用户问题不可回答的情况,建议的查询应相似以帮助用户交互。此类场景对于工具调用LLM来说很常见,因为向用户传达工具的限制或底层数据集的限制很困难,添加查询建议可以增强与RAG代理的交互。与传统查询推荐设置(如搜索引擎)不同,确保建议的查询可回答是主要挑战,因为RAG的多步骤工作流程要求对RAG整体有深入的理解,而执行LLM缺乏这种理解。因此,我们引入了鲁棒的动态少样本学习,从相关的工作流程中检索示例。我们展示了我们的系统可以自我学习,例如在先前用户查询上,并因此在实践中易于应用。我们基于两个未标记的问题数据集在三个基准数据集上评估了我们的方法,这些数据集是从真实世界用户查询中收集的。在真实世界数据集上的实验确认,我们的方法产生更相关且可回答的建议,优于少样本和检索-only基线,从而使agentic RAG的用户交互更安全、更有效。

英文摘要:

Retrieval-augmented generation with tool-calling agents (agentic RAG) has become increasingly powerful in understanding, processing, and responding to user queries. However, the scope of the grounding knowledge is limited and asking questions that exceed this scope may lead to issues like hallucination. While guardrail frameworks aim to block out-of-scope questions (Rodriguez et al., 2024), no research has investigated the question of suggesting answerable queries in order to complete the user interaction. In this paper, we initiate the study of query suggestion for agentic RAG. We consider the setting where user questions are not answerable, and the suggested queries should be similar to aid the user interaction. Such scenarios are frequent for tool-calling LLMs as communicating the restrictions of the tools or the underlying datasets to the user is difficult, and adding query suggestions enhances the interaction with the RAG agent. As opposed to traditional settings for query recommendations such as in search engines, ensuring that the suggested queries are answerable is a major challenge due to the RAG's multi-step workflow that demands a nuanced understanding of the RAG as a whole, which the executing LLM lacks. As such, we introduce robust dynamic few-shot learning which retrieves examples from relevant workflows. We show that our system can be self-learned, for instance on prior user queries, and is therefore easily applicable in practice. We evaluate our approach on three benchmark datasets based on two unlabeled question datasets collected from real-world user queries. Experiments on real-world datasets confirm that our method produces more relevant and answerable suggestions, outperforming few-shot and retrieval-only baselines, and thus enable safer, more effective user interaction with agentic RAG.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑