提升大模型函数调用能力,优化提示格式与多语言支持
Enhancing Function-Calling Capabilities in LLMs: Strategies for Prompt Formats, Data Integration, and Multilingual Translation
- 设计决策标记并融合指令数据,增强函数调用相关性判断
- 使用合成非调用数据,使相关性检测准确率显著提升
- 构建定制翻译管道,在繁体中文中实现显著性能改进
大型语言模型在零样本工具使用(即函数调用)方面已取得显著进展。本研究通过探索不同提示格式、融合函数调用与指令遵循数据、引入新型决策标记(Decision Token)用于条件提示、利用思维链推理,以及构建翻译流水线以应对多语言挑战,系统性提升大模型的函数调用能力。关键发现包括:(1) 指令遵循数据能同时提升函数调用准确率和相关性检测能力;(2) 新提出的决策标记结合合成非函数调用数据,显著增强相关性判断;(3) 定制化翻译流水线有效克服多语言限制,在繁体中文场景下表现显著提升。这些成果为大模型函数调用能力和跨语言应用提供了新思路。
原文摘要 · Abstract (English)
Large language models (LLMs) have significantly advanced autonomous agents, particularly in zero-shot tool usage, also known as function calling. This research delves into enhancing the function-calling capabilities of LLMs by exploring different approaches, including prompt formats for integrating function descriptions, blending function-calling and instruction-following data, introducing a novel Decision Token for conditional prompts, leveraging chain-of-thought reasoning, and overcoming multilingual challenges with a translation pipeline. Our key findings and contributions are as follows: (1) Instruction-following data improves both function-calling accuracy and relevance detection. (2) The use of the newly proposed Decision Token, combined with synthetic non-function-call data, enhances relevance detection. (3) A tailored translation pipeline effectively overcomes multilingual limitations, demonstrating significant improvements in Traditional Chinese. These insights highlight the potential for improved function-calling capabilities and multilingual applications in LLMs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。