ChatPaper.aiChatPaper

針對API調用代理的無環境合成數據生成

Environment-free Synthetic Data Generation for API-Calling Agents

July 18, 2026
作者: Seanie Lee, Sanjoy Chowdhury, Chao Jiang, Cheng-Yu Hsieh, Ting-Yao Hu, Alexander T Toshev, Oncel Tuzel, Raviteja Vemulapalli
cs.AI

摘要

訓練API呼叫的大型語言模型(LLM)代理需要大量高品質的軌跡數據。然而,大規模收集此類數據通常需要完整實作的環境,包含可執行的API以及預先填充的逼真後端資料庫,這成為擴展性的主要瓶頸。為了解決這個問題,我們提出了一種無環境的合成數據生成方法,利用LLM作為即時的數位世界模型。僅需給定API規格,我們的方法就能生成模擬代理與有狀態環境互動的軌跡。具體而言,LLM首先根據提供的API生成多樣化的任務。接著,一個教師代理迭代地解決每個任務,同時一個LLM模擬器根據任務上下文與模擬歷史生成連貫的合成API回應。最後,一個LLM評審過濾這些軌跡,以確保生成數據集的品質。我們在具有挑戰性的AppWorld與OfficeBench基準上評估了此方法,這些基準包含資訊檢索與狀態更改類任務。在我們的合成數據上進行微調後,模型取得了顯著的性能提升,證明了無需任何可執行環境即可為API呼叫代理生成有效監督信號。我們的結果確立了基於LLM的API模擬作為一種實用且可擴展的方案,用於訓練跨越多樣API生態系統的代理。
English
Training API-calling large language model (LLM) agents demands massive amounts of high-quality trajectories. However, collecting such data at scale typically requires fully implemented environments with executable APIs and realistic, pre-populated backend databases, creating a major bottleneck for scalability. To overcome this, we propose an environment-free synthetic data generation approach that leverages LLMs as on-the-fly digital world models. Given only API specifications, our method generates trajectories mimicking interactions between an agent and a stateful environment. Specifically, an LLM first generates diverse tasks solvable with the provided APIs. A teacher agent then iteratively solves each task while an LLM simulator generates coherent synthetic API responses conditioned on the task context and simulation history. Finally, an LLM judge filters the trajectories to ensure the quality of the resulting dataset. We evaluate our approach on the challenging AppWorld and OfficeBench benchmarks, which include both information-retrieval and state-changing tasks. Fine-tuning models on our synthetic data yields significant performance gains, demonstrating that effective supervision for API-calling agents can be generated without any executable environment. Our results establish LLM-based API simulation as a practical, scalable solution for training agents across diverse API ecosystems.