CheMatAgent: Enhancing LLMs for Chemistry and Materials Science through Tree-Search Based Tool Learning
Mengsong Wu, YaFei Wang, Yidong Ming, Yuqi An, Yuwei Wan, Wenliang Chen, Binbin Lin, Yuqiang Li, Tong Xie, Dongzhan Zhou · 2025
Read CheMatAgent: Enhancing LLMs for Chemistry and Materials Science through Tree-Search Based Tool Learning by Mengsong Wu, YaFei Wang, Yidong Ming, Yuqi An, Yuwei Wan, Wenliang Chen, Binbin Lin, Yuqiang Li, Tong Xie, Dongzhan Zhou (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2506-07551.txt.
Introduction
Mengsong Wu, YaFei Wang, Yidong Ming and colleagues built CheMatAgent, an AI assistant that gives a language model real chemistry tools in 2025. Language models alone carry outdated knowledge and shaky specialist skills, so the agent connects to 137 external tools, from database lookups to reaction prediction.
A curated benchmark, ChemToolBench, teaches and tests tool choice and correct parameter filling. Searching over plans uses a hierarchical evolutionary tree search that optimises planning and execution separately. The fine-tuned system beat GPT-4o based setups on chemistry questions and discovery tasks. The authors offer the approach as a template for trustworthy AI help in specialised sciences.
Catalog record
| CREATOR | Mengsong Wu, YaFei Wang, Yidong Ming, Yuqi An, Yuwei Wan, Wenliang Chen, Binbin Lin, Yuqiang Li, Tong Xie, Dongzhan Zhou |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 38 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2506-07551
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
CheMatAgent: Enhancing LLMs for Chemistry and Materials Science through Tree-Search Based Tool Learning Mengsong Wu, YaFei Wang, Yidong Ming, Yuqi An, Yuwei Wan, Wenliang Chen, Binbin Lin, Yuqiang Li, Tong Xie, Dongzhan Zhou Abstract Large language models (LLMs) have recently demonstrated promising capabilities in chemistry tasks while still facing challenges due to outdated pretraining knowledge and the difficulty of incorporating specialized chemical expertise. To address these issues, we propose an LLM‐based agent that synergistically integrates 137 external chemical tools created ranging from basic information retrieval to complex reaction predictions, and a dataset curation pipeline to generate the dataset ChemToolBench that facilitates both effective tool selection and precise parameter filling during fine-tuning and evaluation. We introduce a Hierarchical Evolutionary Monte Carlo Tree Search (HE-MCTS) framework, enabling independent optimization of tool planning and execution. By leveraging self-generated data, our approach supports step-level fine-tuning (FT) of the policy model and training task-adaptive PRM and ORM that surpass GPT-4o. Experimental evaluations demonstrate that our approach significantly improves performance in Chemistry QA and discovery tasks, offering a robust solution to integrate specialized tools with LLMs for advanced chemical applications. All datasets and code are available at https://github.com/AI4Chem/ChemistryAgent . 1 Introduction Figure 1: Overview of our CheMatAgent. In recent years, Large Language Models (LLMs) have shown considerable promise in tackling chemistry-related tasks Xue et al. 2020 ; Zhang et al. 2024b ; Mirza et al. 2024 , such as molecule generation and reaction prediction. However, the expert chemistry knowledge embedded in pretrained models may become outdated and face challenges when applied to real-world scenarios. One potential solution is the development of LLM-based agents that integrate language models with external, specialized tools to utilize the latest chemistry knowledge. Developing LLM-based agents for chemistry has shown significant potential in recent years but there still exists several challenges. First, existing chemical toolkits rely on specialized cheminformatics software, which is difficult to develop and deploy. As a result, the number of available tools is limited, which restricts their use in a wider range of chemical tasks. Additionally, current datasets suffer from poor quality and lack proper evaluation settings. Even when tools are available, agents struggle with both selecting the right tools and generating accurate parameters due to the specialized knowledge required in chemistry. These limitations hinder the effectiveness of chemistry-focused LLM agents. To address these challenges, we collect a large and diverse set of chemical tools to provide more available tools for LLMs. The new toolkit supports a variety of tasks, from simple information queries to complex reaction predictions, which broadens the potential applications of intelligent agents in chemistry. The code implementation of tools is also in a clear format that is easy to follow, which means more tools can be added to toolpool easily. A high-quality, diverse meta-dataset ChemToolBench with above tools is then created for fine-tuning the model and serving as the benchmark. To construct the comprehensive dataset, we have designed a dataset curation pipeline for self-instruct chemistry Tool Learning data generation. The dataset includes difficult examples for both tool selection and parameter filling-in, which helps train the model to perform better to call chemistry domain tools. For better tool calling, we introduce an efficient Hierarchical Evolutionary Monte Carlo Tree Search (HE-MCTS) framework. The high-level policy model iteratively explores and refines the tool selection sequence, while the fine-tuned low-level execution model iteratively reflects on execution feedbacks to enhance accuracy. Additionally, we leverage self-generated HE-MCTS data alongside the meta-dataset to perform step-level fine-tuning on the policy model, and train task-adaptive PRM and ORM as alternatives to GPT-4o. Crucially, this training process requires no manual annotation or curation. The self-evolving agent, guided by HE-MCTS, autonomously optimizes its performance, demonstrating superior reasoning and execution capabilities. Our contributions are listed as follows: (1) We introduce the largest tool pool in the Chemistry and Materials domain, consisting of 137 tools. An agent augmented with this pool demonstrates superior performance in Chemistry-related QA and discovery tasks. (2) We design a dataset curation pipeline tailored for domain-specific tool learning, enabling efficient data generation for fine-tuning. This pipeline supports the construction of the new dataset ChemToolBench for detailed benchmarking. (3) We propose HE-MCTS , the Hierarchical Evolutionary Monte Carlo Tree Search framework, that decouples tool planning and execution into separate models. Our framework enables autonomous optimization without manual annotation by leveraging self-generated HE-MCTS data to adopt enhanced step-level FT for the policy model and train the PRM and ORM that surpass GPT-4o in domain-specific task. 2 CheMatAgent Inspired by the success of LLM agents in general scenarios, we attempt to construct an agent for chemistry from scratch. The foundation LLM of our agent could retrieve and call external tools, and do deep reasoning on complex domain questions. 2.1 Tools Integration This section introduces how to construct executable chemistry toolpools as shown in Figure 6 . For convenience in agent deployment and evaluation, we hope the tool mainly executes in the local environment and requires slight free online services. The procedure can be divided into 3 steps as follows. 2.1.1 Collect Tools from the Internet We conduct a survey on former works about chemistry agents / tools Bran et al. 2023 ; McNaughton et al. 2024 ; Ong et al. 2013 and also investigate relevant repositories in Github 1 1 1 https://github.com . Finally we collect tools from 5 sources listed in Table 1 : ChemCrow, CACTUS, chemlib, pymatgen, and Chemistry Tools. Source Amount ChemCrow 2 2 2 ChemCrow: https://github.com/ur-whitelab/chemcrow-public https://github.com/ur-whitelab/chemcrow-runs 8 CACTUS 3 3 3 CACTUS: https://github.com/pnnl/cactus 10 chemlib 4 4 4 chemlib: https://github.com/harirakul/chemlib 24 pymatgen 5 5 5 pymatgen: https://github.com/materialsproject/pymatgen 82 Chemistry Tools 6 6 6 Chemistry Tools: https://github.com/domdfcoding/chemistry_tools 13 In total: 137 Table 1: Chemistry Domain Tools Source: The number of tools is counted after organization and rewriting in Sections 2.1.2 and 2.1.3 . 2.1.2 Organize Tools in Uniform Format To make the tool learning module of the agent extendable, we design a uniform file format for loading python tool packages. We count all the functions or methods in each package that can be used as tools. Then we list them in a new JSON file called ”tools.json” in each package like in Figure 6 . The code path for the implementation of the tool is also given in that file. With the uniform format of each packge, the agent can easily know which tools it has and where to call them. In the future, more and more chemistry tool packages can be added to our agent without refining the agent framework for compatibility issues as soon as they use the same package organization format as we do. 2.1.3 Write Documentation & Refine Code To make the chemistry toolpool reliable, we also write tool documentation and refine code in the final step of tool integration like shown in Figure 6 . We write documentation for each chemistry tool so that the agent can better understand the purpose of tools and how to use them. Besides, chemistry usually contains a variety of compounds, reactions, and other specialized knowledge, with which large models may not be familiar. So we summarize the input parameters of all the tools with uniform naming. In Addition, we refine the code implementation of tools to make them easy to use for