📄 中文摘要
合成数据已被证实是调优小型、高成本效益语言模型以处理复杂多轮工具调用对话的宝贵资源。尽管许多用于生成合成多轮工具调用数据的框架和系统已被提出,但以往的工作通常假设工具调用交互发生在维护状态的执行环境中。然而,在许多实际应用场景中,工具调用可能需要在无状态环境中执行,例如受限的云函数、边缘设备或一次性API调用。在这些无状态环境中,每次工具调用都是独立的,不保留前一次调用的任何上下文或状态信息。这给模拟此类复杂交互带来了独特的挑战,因为传统的模拟方法往往依赖于状态的传递来构建连贯的多轮对话。
📄 English Summary
Simulating Complex Multi-Turn Tool Calling Interactions in Stateless Execution Environments
Synthetic data has proven to be a valuable resource for fine-tuning smaller, cost-effective language models to handle the complexities of multi-turn tool calling conversations. While numerous frameworks and systems for producing synthetic multi-turn tool calling data have been proposed, prior works frequently assume that any tool calling interactions will take place in an execution environment that maintains state. However, many real-world applications require tool calls in stateless environments, such as constrained cloud functions, edge devices, or one-shot API invocations. In these stateless settings, each tool call is independent, without retaining any context or state from previous calls. This presents unique challenges for simulating complex interactions, as traditional simulation methods often rely on state propagation to construct coherent multi-turn dialogues. To address this, novel simulation strategies are required that can explicitly encode conversational history and contextual information into each tool call request, or design tools capable of inferring necessary state from the input/output of each invocation. Simulating multi-turn tool calling interactions in stateless environments necessitates a more refined design of tool interfaces, enabling them to process each request independently and to guide subsequent calls through explicit parameter passing or returned results. Concurrently, when generating synthetic data, it is crucial to ensure that the simulated dialogue flow possesses sufficient self-contained information at each call to support model decisions and tool execution. This approach is essential for training models to effectively utilize tools in practical stateless deployments, significantly enhancing their adaptability and robustness in resource-constrained or distributed environments.