arXiv:2601.08105cs.CL2026-01

让AI主动建议可回答的问题,提升检索生成系统的交互安全性和有效性。

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

  • 通过动态少样本学习,从相关工作流中检索示例来生成合理建议。
  • 在真实用户数据集上,建议问题的可回答性与相关性显著优于基线方法。
  • 适用于工具调用型大模型,特别适合无法直接告知知识边界时的场景。

基于工具调用的代理式检索增强生成(agentic RAG)在理解、处理和回应用户查询方面日益强大,但其知识覆盖范围有限,超出范围的问题可能导致幻觉。尽管已有防护框架阻止越界提问(Rodriguez et al., 2024),但尚无研究探讨如何主动建议可回答的问题以完成用户交互。本文首次研究代理式RAG中的查询建议问题。针对用户问题不可回答的场景,提出建议相似且可回答的问题以维持交互。此类情况在工具调用型LLM中常见,因难以向用户传达工具或数据集的限制。我们提出稳健的动态少样本学习机制,从相关工作流中检索示例,实现自学习(如基于历史用户查询),便于实际应用。在两个真实世界用户查询数据集及三个基准数据集上评估,结果表明本方法生成的建议更具相关性与可回答性,显著优于少样本与仅检索基线,从而实现更安全、高效的用户交互。

原文摘要 · Abstract (English)

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.

RAG查询建议大模型交互

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。