Learning tool-using through synthetic trajectories.Synthetic data is also a powerful approach to enable LMs to learn tool-using abilities through simulated trajectories, as collecting real-world human tool-using data might be time-consuming, and the actual distribution of calls to tools might be skewed. LaMDA (Thoppilan et al., 2022), for instance, was trained not only on web documents but also on interaction data between crowdworkers and the model itself, with the synthetic data annotated with calls to appropriate tools. This training process allowed LaMDA to develop the ability to use a calculator for arithmetic, a search engine for real-time information seeking, and a machine translator for translation. Similarly, Toolformer (Schick et al., 2024) learns to decide which APIs to call and what arguments to pass by training on template-generated data, while Galactica (Taylor et al., 2022) infuse API-calling data into pre-training mixture. ToolApaca (Tang et al., 2023) is a novel framework designed to automatically generate a diverse tool-use corpus, by building a multi-agent simulation environment and letting agents select and use tools iteratively. These examples demonstrate the potential of synthetic trajectories in enabling LMs to acquire tool-using abilities and enhance their reasoning capabilities across various domains.