大语言模型函数调用的不确定性量化
Uncertainty Quantification for LLM Function-Calling
AI总结:
本文研究了大语言模型函数调用中不确定性量化的关键问题,发现多样本方法在自然语言问答中表现优异,但在函数调用场景中不如单样本方法有效,并提出利用函数调出输出特性改进现有方法。
摘要:
大语言模型(LLMs)越来越多地被用于自主解决现实任务。其中,LLM函数调用范式是广泛用于赋予LLMs工具使用能力的常用方法。然而,LLM错误调用函数可能产生严重后果,尤其是在不可逆的情况下,例如转账或删除数据。因此,在执行之前考虑LLM对正确解决任务的信心至关重要。不确定性量化(UQ)方法可用于量化这种信心并防止潜在的错误函数调用。在本文中,我们提出了迄今为止对LLM函数调用(FC)的首次UQ方法评估。虽然多样本UQ方法,如语义熵,在自然语言问答任务中表现强劲,但我们发现,在FC设置中,它相对于简单的单样本UQ方法没有明显优势。此外,我们发现可以利用FC输出的特定性来改进现有UQ方法的性能。具体而言,多样本UQ方法受益于基于抽象语法树解析对FC输出进行聚类,而单样本UQ方法可以通过在计算基于logit的不确定性分数时仅选择语义有意义的token来改进。
英文摘要:
Large Language Models (LLMs) are increasingly deployed to autonomously solve real-world tasks. A key ingredient for this is the LLM Function-Calling paradigm, a widely used approach for equipping LLMs with tool-use capabilities. However, an LLM calling functions incorrectly can have severe implications, especially when their effects are irreversible, e.g., transferring money or deleting data. Hence, it is of paramount importance to consider the LLM's confidence that a function call solves the task correctly prior to executing it. Uncertainty Quantification (UQ) methods can be used to quantify this confidence and prevent potentially incorrect function calls. In this work, we present what is, to our knowledge, the first evaluation of UQ methods for LLM Function-Calling (FC). While multi-sample UQ methods, such as Semantic Entropy, show strong performance for natural language Q\&A tasks, we find that in the FC setting the entropy-based multi-sample methods we evaluate offer no clear advantage over simple single-sample UQ methods. Additionally, we find that the particularities of FC outputs can be leveraged to improve the performance of existing UQ methods in this setting. Specifically, multi-sample UQ methods benefit from clustering FC outputs based on their abstract syntax tree parsing, while for single-sample UQ methods, restricting the logit-based score to semantically meaningful tokens leaves discrimination essentially unchanged but improves calibration and, by smaller margins, the utility of the score under abstention.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。