ChemOrch: Empowering LLMs with Chemical Intelligence via Groundbreaking Synthetic Instructions

Yue Huang, Zhengzhe Jiang, Xiaonan Luo, Kehan Guo, Haomin Zhuang, Yujun Zhou, Zhengqing Yuan, Xiaoqi Sun, Jules Schleinitz, Yanbo Wang, Shuhao Zhang, Mihir Surve, Nitesh V Chawla, Olaf Wiest, Xiangliang ZhangNeurIPS 2025

Abstract

Large Language Models (LLMs) frequently struggle with the rigorous, rule-bound requirements of chemical reasoning, often due to a scarcity of high-quality, domain-specific training data. We present ChemOrch, a novel framework designed to synthesize chemically accurate instruction-response pairs. ChemOrch utilizes a two-stage pipeline: difficulty-controlled prompt generation followed by tool-grounded, self-repairing response construction. By fine-tuning open-source models on this synthetic data, we demonstrate significant improvements in chemical reasoning, property prediction, and agentic tool-use capabilities, effectively bridging the gap between general-purpose language modeling and specialized chemical intelligence.

Introduction

While Large Language Models have achieved remarkable success in natural language tasks, their performance in the physical sciences—particularly chemistry—remains inconsistent. Chemistry is inherently hierarchical and governed by strict physical laws; a single hallucinated atom or a misunderstood valence constraint renders a molecular representation physically impossible. Unlike standard NLP tasks where minor errors might only affect stylistic flow, chemical errors invalidate the entire output.

To address this, researchers have sought to fine-tune LLMs on domain-specific data. However, expert-annotated chemistry datasets are expensive and difficult to scale. While synthetic data generation offers a potential solution, existing pipelines often struggle to produce diverse, verifiable, and difficulty-calibrated tasks. ChemOrch addresses these challenges by providing an automated, high-fidelity pipeline for synthesizing chemistry instructions that are both challenging and factually grounded.

The ChemOrch Framework

ChemOrch generates synthetic training data through a sophisticated two-stage process designed to ensure both task diversity and response accuracy.

1. Task-Controlled Instruction Generation

To prevent the generation of overly simplistic or impossibly complex tasks, ChemOrch employs a novel difficulty reward model with feedback. This model evaluates generated prompts on a scale of 1 to 5 and provides specific textual feedback regarding the prompt's complexity. The generator then iteratively refines the instruction until it reaches the desired difficulty level, allowing for the creation of a balanced curriculum that supports progressive learning during model fine-tuning.

2. Tool-Aware Response Construction

Rather than relying on the LLM’s internal weights to "guess" chemical properties—a primary source of hallucinations—ChemOrch treats the LLM as an agent. The system breaks down instructions into logical steps and retrieves specialized chemical tools, such as RDKit for molecular processing or PubChem for database queries.

A critical component of this stage is the multi-stage self-repair mechanism. If the generated Python code for a tool fails, the LLM analyzes the error trace and rewrites the code. Furthermore, an effectiveness check ensures that the tool's output directly addresses the original query before the final response is recorded. To maintain efficiency, a "tool distillation" step is applied, forcing the model to prune redundant tool calls and focus on the most high-utility operations.

Experimental Setup and Datasets

ChemOrch utilizes real-world molecular metadata from authoritative sources, including the Blood-Brain Barrier database (B3DB), Therapeutics Data Commons (TDC), MoleculeNet, and PubChem, to ground its generation process.

The resulting dataset was used to fine-tune Llama-3.1-8B-Instruct and Qwen-2.5-7B-Instruct. Evaluation was conducted using the MMLU-Pro chemistry reasoning subset and tasks from ChemLLMBench, focusing on property prediction and molecular captioning.

Key Results and Insights

Performance Gains

Fine-tuning on ChemOrch data yielded substantial improvements across all benchmarks:

  • Reasoning Accuracy: On the MMLU-Pro benchmark, Llama-3.1-8B-Instruct’s accuracy improved from 13.9% to 28.99%, while Qwen-2.5-7B-Instruct rose from 24.64% to 37.97%.
  • Property Prediction: Models saw an approximate 35% boost in property prediction accuracy.
  • Agentic Tool-Use: Fine-tuned models demonstrated a >50% relative improvement in successfully invoking and executing external chemical tools.

The Necessity of Self-Repair

Ablation studies highlighted the importance of the self-repair module. Without it, the failure rate for tool execution rose from 18% to 47%. This suggests that for scientific applications, the ability of a model to iterate on its own code and correct errors is as important as the initial generation logic.

Human Evaluation

Expert review by computational chemists confirmed the high quality of the synthetic data. The generated responses achieved an 82.64% instruction-following rate and an 85.14% factual correctness rate, validating the framework's ability to produce reliable training signals.

Discussion and Limitations

Despite these advancements, ChemOrch reveals several persistent challenges in AI for science:

  • Knowledge Conflicts: Models occasionally ignore correct tool outputs if they contradict the model's internal (and incorrect) biases. This suggests a need for a stricter hierarchy where external tool data is prioritized over internal priors.
  • Model Laziness: In complex scenarios, models may provide high-level procedural advice (e.g., "You should use RDKit") instead of executing the required code.
  • Error Cascades: In multi-step reasoning, an early failure in a chain—such as a malformed SMILES string—can propagate through the entire process, highlighting the need for more robust rollback mechanisms.

Conclusion

ChemOrch demonstrates that high-fidelity synthetic data, when combined with agentic tool-use and self-repair mechanisms, can significantly empower LLMs with chemical intelligence. By automating the generation of difficulty-calibrated, factually grounded instructions, ChemOrch provides a scalable path toward more reliable and capable AI assistants in the chemical sciences.

Summary updated

BibTeX
@inproceedings{huang2025chemorch,
  author = {Yue Huang and Zhengzhe Jiang and Xiaonan Luo and Kehan Guo and Haomin Zhuang and Yujun Zhou and Zhengqing Yuan and Xiaoqi Sun and Jules Schleinitz and Yanbo Wang and Shuhao Zhang and Mihir Surve and Nitesh V Chawla and Olaf Wiest and Xiangliang Zhang},
  title = {{ChemOrch: Empowering LLMs with Chemical Intelligence via Groundbreaking Synthetic Instructions}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=W0eTcFyx44},
}
Figure