arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.13945cs.CL
收藏

FANTAstic SEquences and Where to Find Them:通过状态跟踪的约束解码和重排序实现忠实且高效的API调用生成

FANTAstic SEquences and Where to Find Them: Faithful and Efficient API Call Generation through State-tracked Constrained Decoding and Reranking

Amazon(亚马逊);Texas A&M University(德克萨斯农工大学)

Zhuoer Wang, Leonardo F. R. Ribeiro, Alexandros Papangelis, Rohan Mukherjee, Tzu-Yen Wang, Xinyan Zhao, Arijit Biswas, James Caverlee, Angeliki Metallinou

AI总结:

针对现有API调用生成方法成本高且不忠实的问题,提出FANTASE方法,通过状态跟踪约束解码和重排序,在DSTC8和API Bank数据集上显著提升生成准确性、推理效率和上下文效率。

摘要:

API调用生成是大语言模型工具使用能力的基石,它使模型能够访问更广阔的世界。然而,现有的监督学习和上下文学习方法存在训练成本高、数据效率低,以及生成的API调用可能对API文档和用户请求不忠实等问题。为了解决这些局限性,我们提出了一种名为FANTASE的输出侧优化方法。FANTASE的两个独特贡献是其状态跟踪约束解码(SCD)和重排序组件。SCD以令牌搜索字典树的形式动态整合适当的API约束,以实现相对于API文档的高效且有保证的生成忠实性。重排序组件通过利用轻量级模型作为判别器,对大型语言模型经波束搜索得到的候选生成结果进行重排序,从而高效地引入监督信号。我们通过DSTC8和API Bank数据集证明了FANTASE在API调用生成准确性、推理效率和上下文效率方面的优越性能。

英文摘要:

API call generation is the cornerstone of large language models' tool-using ability that provides access to the larger world. However, existing supervised and in-context learning approaches suffer from high training costs, poor data efficiency, and generated API calls that can be unfaithful to the API documentation and the user's request. To address these limitations, we propose an output-side optimization approach called FANTASE. Two of the unique contributions of FANTASE are its State-Tracked Constrained Decoding (SCD) and Reranking components. SCD dynamically incorporates appropriate API constraints in the form of Token Search Trie for efficient and guaranteed generation faithfulness with respect to the API documentation. The Reranking component efficiently brings in the supervised signal by leveraging a lightweight model as the discriminator to rerank the beam-searched candidate generations of the large language model. We demonstrate the superior performance of FANTASE in API call generation accuracy, inference efficiency, and context efficiency with DSTC8 and API Bank datasets.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑