NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Facilitating Multi-turn Function Calling for LLMs via Compositional Instruction Tuning

Mingyang Chen, sunhaoze, Tianpeng Li, Fan Yang, Hao Liang, KeerLu, Bin Cui, Wentao Zhang, Zenan Zhou, weipeng chen

While Large Language Models (LLMs) have become highly proficient at single-turn tool use, they often stumble when a user query requires a complex, multi-step plan. Most research into "function calling" focuses on a simple paradigm: a user asks a question, and the model picks the right API and arguments.

However, real-world tasks are rarely that simple. If you ask an AI to "Book the first available flight from London to Edinburgh," the model cannot just call a book_flight function immediately. It must first call a get_schedule function, parse the results to find the "first" flight, and then call the booking function. This requires compositional reasoning—the ability to decompose a high-level goal into a sequence of dependent sub-tasks.

To address the scarcity of complex training data, researchers introduce BUTTON (Bottom-Up Then Top-dOwN), a pipeline that synthetically generates compositional instruction tuning data. Using the resulting BUTTONInstruct dataset, the authors significantly boost the multi-turn planning and function-calling capabilities of open-source models like Llama-3 and Qwen-2.

The BUTTON Framework

Existing datasets for multi-turn function calling are scarce because they are incredibly difficult to annotate manually. Furthermore, simply asking an LLM to "generate a complex task" often results in nonsensical or unsolvable trajectories. The authors propose the BUTTON framework to create high-quality, solvable synthetic data through a two-phase process.

Overview of the BUTTON framework, illustrating the bottom-up instruction construction and top-down trajectory generation.

1. Bottom-Up Instruction Construction

Instead of starting with complexity, the pipeline begins with "atomic tasks" (simple, one-step actions) derived from real-world scenarios. It then uses heuristic strategies to combine them into complex queries:

  • Sequential Composition: Task B depends directly on the output of Task A.
  • Parallel-then-Sequential: Tasks A and B can happen at the same time, and Task C uses both of their outputs.
Examples of Sequential and Parallel-then-Sequential task composition.

Once the complex task is built, the system generates the necessary function definitions (API documentation) required to solve it. By building tasks "bottom-up" from atomic units, the authors ensure that the complex instructions are actually solvable, avoiding the "hallucinated" logic that plagues direct generation methods.

2. Top-Down Trajectory Generation

To create the "ground truth" for how to solve these tasks, the researchers set up a multi-agent environment:

  • A User Agent initiates the query.
  • An Assistant Agent (the "brain") plans and calls tools.
  • A Tool Agent simulates the API responses based on the generated function definitions.

By letting these agents interact, the system captures a natural, multi-turn dialogue including "Chain-of-Thought" reasoning, tool calls, and error handling. Using a dedicated Tool Agent to simulate outputs creates a realistic feedback loop, forcing the Assistant Agent to actually parse and react to data rather than hallucinating a successful response.

Datasets and Key Results

The BUTTON pipeline was used to generate BUTTONInstruct, a new dataset of 8,000 high-quality multi-turn function-calling data points. The models were evaluated on the GTA (General Tool Agents) and Tool-Query benchmarks, which test multi-step reasoning and tool interaction in domains like weather, movies, and academia.

The impact of tuning on BUTTONInstruct was dramatic, particularly for smaller models:

  • Massive Accuracy Gains: On the GTA benchmark, Llama-3-8B's final answer accuracy jumped from a dismal 1.4% to an impressive 30.5%.
  • Closing the Gap with Proprietary Models: The larger tuned models (Llama-3-70B-BUTTON and Qwen-2-72B-BUTTON) achieved performance levels comparable to GPT-4o on multi-turn benchmarks. This proves that specialized instruction tuning can help open-source models punch well above their weight class in complex planning.
  • Ablation Success: Removing either the "Bottom-Up" or "Top-Down" phases led to significant performance drops, confirming that both the task structure and the multi-agent simulation are vital to the framework's success.

Limitations and Future Work

While highly effective, the quality of the synthetic data still relies on a powerful "teacher" model (like GPT-4o) to drive the multi-agent simulation. Additionally, while the tasks are designed to be solvable by construction, adding a more rigorous automated verification or filtering stage could further improve data purity.

Ultimately, this "planning with tools" approach is a significant stepping stone toward Embodied AI, where models will increasingly need to plan and execute complex sequences of actions in dynamic, real-time environments.

Summary updated

BibTeX
@inproceedings{chen2025facilitating,
  author = {Mingyang Chen and sunhaoze and Tianpeng Li and Fan Yang and Hao Liang and KeerLu and Bin CUI and Wentao Zhang and Zenan Zhou and weipeng chen},
  title = {{Facilitating Multi-turn Function Calling for LLMs via Compositional Instruction Tuning}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=owP2mymrTD},
}
Figure