Enhancing Function-Calling Capabilities in LLM s: Strategies for Prompt Formats, Data Integration, and Multilingual Translation (2025)

Abstract: 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.

## introduction the field of autonomous agents has seen remarkable advancements in recent years, largely driven by the capabilities of large language models (llms). these models have significantly enhanced the performance of autonomous agents across a variety of tasks @xcite @xcite . a critical ability for these agents is zero-shot tool usage, also known as function calling. this capability allows llms to access up-to-date information from the internet or in-house databases and leverage third-party services, enabling integration with various systems. such capabilities open up numerous potential applications, including electronic design automation @xcite , financial reporting @xcite , and travel planning @xcite . despite the progress made through tuningbased methods @xcite for enabling function-calling capabilities, there remains a gap in research regarding the format variance of prompts, the combination of functioncalling data with instruction-following data, and multilingual limitations. this work aims to address these gaps by investigating the following aspects: prompt formats: we explore two strategies for incorporating function descriptions into prompts: ## related work integrating function-calling capabilities into llms significantly broadens their problem-solving abilities by enabling interactions with external tools and apis. studies have shown that api-integrated llms can perform tasks such as programming assistance @xcite , real-time information retrieval @xcite , complex mathematical computations @xcite , and internet utilization @xcite . this allows llms to access up-to-date information and leverage third-party services, facilitating integration with various systems across advanced applications like electronic design automation @xcite , financial reporting @xcite , and travel planning @xcite . to enable such function-calling capabilities, researchers have explored two main categories of methods. the first involves sophisticated prompting techniques. frameworks like react @xcite and its successors @xcite @xcite @xcite combine reasoning and acting within prompts to guide model responses. more closely related to our work, the second category focuses on training models to generate function calls through fine-tuning. fine-tuned models such as gorilla @xcite , toolalpaca @xcite , toolllama @xcite , and the hermes 3 series by nous-research @xcite enhance function-calling capabilities by relying on synthetic data generated by proprietary models like gpt-4 or chat-gpt. open-source initiatives like nexusraven-v2 @xcite ) and ibm's granite-20b-functioncalling @xcite aim to develop function-calling models suitable for commercial use without relying on proprietary data. moreover, many works involve self-supervision to further enhance performance across diverse domains @xcite @xcite . among the works in the second category, some fine-tuned models and datasets have been openly released. for instance, toolalpaca @xcite and toolllm @xcite have made available their synthetic data or data generation pipelines. toolace @xcite has released both the fine-tuned llama model and the self-instruction dataset. additionally, the gorilla team developed a comprehensive benchmark to evaluate llms' function-calling capabilities @xcite . notably, toolace @xcite demonstrated that diversified function-calling sample data helps models learn better function-calling abilities. however, there is a lack of comprehensive analysis on how variations in prompt and metainformation design, as well as the impact of nonfunction-calling-related instruction tuning data, affect the effectiveness of function-calling capabilities. existing studies tend to adopt specific prompt templates without extensively investigating the impact of different designs, indicating a need for further research in this area. ## conclusion our research demonstrates that integrating instruction-following data with function-calling tasks significantly enhances function-calling capabilities. the decision token mechanism, combined with synthetic non-function-call data, further improves relevance detection. additionally, a tailored translation pipeline effectively mitigates multilingual challenges. these findings underscore the potential for improving function-calling capabilities and expanding multilingual proficiency in llms, paving the way for more practical real-world applications.