Uncertainty Calculation of LLM Function-Calling

Large-scale Language Models (LLMs) are increasingly used to automatically solve real-world tasks. A key ingredient of this is the LLM Function-Calling paradigm, a widely used method of equipping LLMs with tooling skills. However, wrongly calling LLM activities can have serious consequences, especially if its effects cannot be reversed, eg, transferring money or deleting data. Therefore, it is very important to consider the LLM's confidence that the function call solves the function correctly before executing it. Uncertainty Quantification (UQ) methods can be used to measure this confidence and prevent potentially incorrect calls. In this work, we present what is, to our knowledge, the first evaluation of UQ methods for LLM Function-Calling (FC). Although multi-sample UQ methods, such as Semantic Entropy, show strong performance for natural language Q&A tasks, we find that in the FC setting, they do not provide a clear advantage over simple single-sample UQ methods. Additionally, we find that the details of FC results can be used to improve the performance of existing UQ methods in this setting. Specifically, multi-sample UQ methods benefit from combining FC results based on abstract syntax tree classification, while single-sample UQ methods can be improved by selecting only logical tokens when calculating scores based on the logit of uncertainty.
- † University of Oxford
- * Equal contribution
- ‡ High integrated design


