SynthStrategy: Extracting and Formalizing Latent Strategic Insights from LLMs in Organic Chemistry

Daniel P. Armstrong, Zlatko Joncev, Andres M. Bran, Philippe SchwallerarXiv 2025 · DOI · arXiv

Abstract

Modern Computer-Assisted Synthesis Planning (CASP) tools excel at proposing individual, chemically valid reaction steps—the "tactics" of synthesis. However, they often struggle with the high-level "strategy" and holistic reasoning that expert chemists use to design efficient, convergent routes. We present SynthStrategy, a framework that leverages Large Language Models (LLMs) to distill latent chemical intuition into a library of over 1,000 executable and verifiable Python functions. By formalizing strategy as code, we enable interpretable route retrieval, strategy-based clustering, and the analysis of historical trends in organic chemistry.

Introduction

While CASP systems have become increasingly sophisticated, their suggestions can often be strategically suboptimal, requiring unnecessary protecting groups or following inefficient linear sequences. This "chemical intuition" has traditionally been considered tacit knowledge, difficult to encode explicitly. While LLMs demonstrate a remarkable grasp of these abstract concepts, using them for real-time evaluation of thousands of potential routes is computationally prohibitive and lacks transparency. SynthStrategy addresses this by converting the implicit knowledge of LLMs into a "glass box" library of strategy functions.

Overview of the SynthStrategy framework, illustrating the distillation of latent knowledge into verifiable code and its applications in temporal analysis, clustering, and retrieval.

Methodology: Distilling Latent Knowledge

The core of SynthStrategy is an agentic distillation pipeline designed to turn natural language descriptions of chemical logic into executable code:

  1. Extraction & Generation: Using Claude-3.7-Sonnet, the system analyzes synthesis routes from patent literature (USPTO). It identifies underlying strategies (e.g., "late-stage Suzuki coupling") and translates this logic into Python functions utilizing RDKit.
  2. Iterative Refinement: To ensure accuracy, functions are tested against the original routes. If a function fails to correctly identify the strategy it was designed for, the LLM refactors the code based on error logs and execution feedback.
  3. Evaluation & Curation: Advanced models (Gemini-2.5-Flash/Pro) serve as automated judges, filtering the library for code quality and chemical relevance. This process yielded a curated library of 1,076 strategy functions.

Applications and Key Insights

By applying the strategy library to the USPTO-ST dataset—a newly annotated collection of synthesis routes—the researchers identified significant shifts in organic chemistry over time. For instance, the data reveals a clear decline in traditional ether/ester linkage formation and a corresponding rise in metal-catalyzed cross-coupling chemistry. This validates the framework's ability to capture real-world shifts in how chemists approach molecular assembly.

Strategy-Based Retrieval and Clustering

Traditional route comparison often relies on "Tree Edit Distance," which focuses on graph topology but can miss fundamental chemical differences. SynthStrategy allows for "binary strategy fingerprints," where routes are grouped based on the specific strategic functions they satisfy. This enables:

  • High-Accuracy Retrieval: A natural language query rewriter allows users to search large corpora for specific strategies, achieving 75% Top-3 accuracy on complex benchmarks.
  • Intuitive Clustering: Routes can be grouped by chemical logic (e.g., "triazole formation followed by Suzuki coupling") rather than just structural similarity.

Conclusion

SynthStrategy demonstrates that LLMs can be used to formalize complex, tacit expertise into verifiable and interpretable tools. By moving from "black box" predictions to a "glass box" library of Python functions, this framework provides a scalable way to integrate high-level strategic reasoning into the next generation of CASP systems. Future work will focus on using the USPTO-ST dataset to train generative models that are inherently "strategy-aware," allowing for the automated design of routes that are not just valid, but elegant.

Summary updated

Abstract

Modern computer-assisted synthesis planning (CASP) systems show promises at generating chemically valid reaction steps but struggle to incorporate strategic considerations such as convergent assembly, protecting group minimization, and optimal ring-forming sequences. We introduce a methodology that leverages Large Language Models to distill synthetic knowledge into code. Our system analyzes synthesis routes and translates strategic principles into Python functions representing diverse strategic and tactical rules, such as strategic functional group interconversions and ring construction strategies. By formalizing this knowledge as verifiable code rather than simple heuristics, we create testable, interpretable representations of synthetic strategy. We release the complete codebase and the USPTO-ST dataset -- synthesis routes annotated with strategic tags. This framework unlocks a novel capability for CASP: natural language-based route retrieval, achieving 75\% Top-3 accuracy on our benchmark. We further validate our library through temporal analysis of historical trends and chemically intuitive route clustering that offers more granular partitioning than common previous methods. This work bridges the tactical-strategic divide in CASP, enabling specification, search, and evaluation of routes by strategic criteria rather than structure alone.
BibTeX
@misc{armstrong2025synthstrategy,
  author = {Daniel P. Armstrong and Zlatko Joncev and Andres M. Bran and Philippe Schwaller},
  title = {{SynthStrategy: Extracting and Formalizing Latent Strategic Insights from LLMs in Organic Chemistry}},
  year = {2025},
  eprint = {2512.01507},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.01507},
}
Figure