Achieving Tool Calling Functionality in LLMs Using Only Prompt Engineering Without Fine-Tuning

Currently, the vast majority of locally deployed open-source large language models (LLMs) and some commercial model interfaces do not support stable tool calling functionality. The existing solution involves fine-tuning LLMs, which results in significant time and computational resource consumption. This paper proposes a method that enables LLMs to achieve stable tool calling capabilities using only prompt engineering and some ingenious code design. We conducted experiments on multiple LLMs that lack tool calling capabilities across various tool calling tasks, achieving a success rate of 100%.

Paper

References (6)

03Comfyui llm party: An open-source project for llm tool calling, 2024github.com/heshengtao/comfyui
04Quantized versions of llama3-8b, gemma2-9b, qwen2-7b, and mistral-7b, 2024Ollama Documentation
05this JSON string and return a JSON object containing the tool name and tool parameters
06Please choose the appropriate tool according to the user’s question. If you don’t need to call it, please reply directly to the user’s questionthe user communicates with you in a language other than English

Similar papers

© 2026 NYSGPT2525 LLC