让大模型遇到模糊指令时主动提问,提升工具使用准确性。
Learning to Ask: When LLM Agents Meet Unclear Instruction
- 设计主动询问机制,遇模糊指令时向用户求证。
- 在噪声指令数据集上,准确率显著优于现有方法。
- 适合需要高可靠性工具调用的交互式AI系统研究者。
具备调用外部工具能力的现代大语言模型(LLMs)可解决仅靠语言能力无法完成的任务。然而,工具的有效使用不仅依赖于模型能力,更取决于指令的精确性,而真实场景中常存在不清晰指令。为此,我们分析了真实用户查询中的指令,识别错误模式,并构建了一个具有挑战性的工具使用基准测试集Noisy ToolBench(NoisyToolBench)。研究发现,由于基于下一词预测的训练目标,LLMs倾向于随意填补缺失参数,导致幻觉和风险。为解决此问题,我们提出一种新框架Ask-when-Needed(AwN),当模型因指令不明确而受阻时,主动向用户提问以澄清需求。此外,为减少人工交互成本并从准确率与效率双维度评估模型表现,我们设计了自动化评估工具ToolEvaluator。实验表明,AwN在NoisyToolBench上的表现显著优于现有框架。相关代码与数据集将公开,以支持后续研究。
原文摘要 · Abstract (English)
Equipped with the capability to call functions, modern large language models (LLMs) can leverage external tools for addressing a range of tasks unattainable through language skills alone. However, the effective execution of these tools relies heavily not just on the advanced capabilities of LLMs but also on precise user instructions, which often cannot be ensured in the real world. To evaluate the performance of LLMs tool-use under imperfect instructions, we meticulously examine the real-world instructions queried from users, analyze the error patterns, and build a challenging tool-use benchmark called Noisy ToolBench (NoisyToolBench). We find that due to the next-token prediction training objective, LLMs tend to arbitrarily generate the missed argument, which may lead to hallucinations and risks. To address this issue, we propose a novel framework, Ask-when-Needed (AwN), which prompts LLMs to ask questions to users whenever they encounter obstacles due to unclear instructions. Moreover, to reduce the manual labor involved in user-LLM interaction and assess LLMs performance in tool utilization from both accuracy and efficiency perspectives, we design an automated evaluation tool named ToolEvaluator. Our experiments demonstrate that the AwN significantly outperforms existing frameworks for tool learning in the NoisyToolBench. We will release all related code and datasets to support future research.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。