Learning to Ask: When LLM Agents Meet Unclear Instruction
Wenxuan Wang, Juluan Shi, Zixuan Ling, Yuk-Kit Chan, Chaozheng Wang, Cheryl Lee, Youliang Yuan, Jen-tse Huang, Wenxiang Jiao, Michael R. Lyu
TL;DR
This work tackles the problem of LLM tool-use under imperfect user instructions by (i) analyzing real-world instruction errors and constructing NoisyToolBench, a benchmark for ambiguous prompts; (ii) introducing Ask-when-Needed (AwN), a prompting framework that elicits clarifications before API calls; (iii) developing ToolEvaluator, an automated pipeline to evaluate accuracy and efficiency of tool-using under unclear instructions. Empirical results across multiple LLMs and tool-learning baselines show that AwN significantly improves clarifying Question accuracy (A1), API-call correctness (A2), and final task success (A3), while maintaining reasonable efficiency. The work formalizes evaluation metrics (A1–A3, Re, Steps) and demonstrates that proactive user engagement can substantially mitigate hallucinations and misuses in tool invocation. Overall, NoisyToolBench, AwN, and ToolEvaluator offer a practical, scalable pathway to robust, interpretable LLM tool-use in real-world, instruction-sparse settings.
Abstract
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.
