wikillm

Paper · 2024-06-26 · cs.LG, cs.AI, cs.CL, physics.chem-ph

A Review of Large Language Models and Autonomous Agents in Chemistry

Survey of LLMs for chemistry (property prediction, inverse design, synthesis prediction, benchmarks) and of LLM-based agents, which it breaks into memory, planning, profiling, perception and tool modules. It runs no experiments of its own; the headline figures are quoted from cited work, e.g. 37.4% USPTO-50K retrosynthesis accuracy (LSTM) and 69.5% on LitQA for PaperQA.

LLM agentTool useMolecular representation learningBenchmark validitysurveychemistryllm-agentssynthesis-prediction

arXivPDFMarkdown9 min read

AI-compiled by claude-haiku-5-5 on 2026-11-06, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.

In plain words

Large language models, the text predictors behind chatbots, are now used in chemistry for three jobs: predicting a molecule's properties, proposing new molecules that have wanted properties, and predicting how a molecule can be made. This review explains how these models work, which chemistry tasks they have been applied to, and why the data behind them is a bottleneck.

It then covers LLM-based agents. An agent is a language model wrapped with memory, planning and tools, so that it can act in an environment such as a search engine, a lab instrument or chemistry software. The review lists agents already used in science and ends with open problems: data quality, interpretability, benchmarks, safety, and how to evaluate an agent. The review runs no experiments of its own.

TL;DR

A survey, not a method. It explains transformer LLMs (encoder-only, decoder-only and encoder-decoder), maps them to chemistry tasks, and gives an agent framework of memory, planning, profiling, perception and tools. Use it as an orientation and a source list; do not take its quoted numbers as results this paper produced.

Problem

Chemistry has three main prediction problems: properties of a candidate compound, generating molecules that meet a profile, and predicting a synthesis §1. Automating lab work is treated as a fourth task §1. The review argues that LLMs can address these tasks and that agents can connect models with tools §1 fig. 1.

Its stated limits are that high-quality chemical data is scarce compared with the text used for general LLMs §3.1 fig. 5, and that common benchmarks such as MoleculeNet contain errors and are weakly tied to practical chemistry §3.1 §6. Those criticisms rest largely on a blog post by one practitioner, not on a systematic study §3.1.

Method

The review has no algorithm of its own. Its structure is:

  • Background on transformers and how they are trained §2.1 §2.2 §2.3.
  • Chemical LLMs by architecture and task: string representations and datasets §3.1; encoder-only models for property prediction §3.2; decoder-only models for inverse design §3.3; encoder-decoder models for synthesis prediction §3.4; multimodal, textual and ChatGPT uses §3.5 to §3.7. The intro assigns encoder-only models to property prediction, decoder-only to inverse design and encoder-decoder to synthesis §3.
  • LLM agents: definition, modules and tools §4, with a proposed autonomy scale in which level 0 is a plain tool and level 3 can form hypotheses and design experiments §4.
  • Agents in science: literature review §5.1, chemical innovation §5.2, experiment planning §5.3, cheminformatics §5.4, hypothesis creation §5.5.
  • Challenges and opportunities §6 and conclusions §7.

Sections §3.2, §3.3 and §3.5 to §3.7 were only skimmed for this card. Their numbers are not transcribed here.

Transformer basics §2.1

  • Input text is split into tokens from a fixed vocabulary, mapped to learned embedding vectors, and given positional information. The review describes a fixed sine/cosine positional encoding, following the original transformer §2.1.
  • Self-attention compares each element (query) with every element (key) and uses the weights to mix values. The review describes this loosely as a dot product with a learned non-linear function §2.1. It does not mention the learned query, key and value projections or the scaling factor, so it is not enough to implement from.
  • An encoder stack of residual and normalised layers is followed by a feed-forward block. The original model used six layers §2.1 fig. 2.
  • A decoder adds masked self-attention, so each position sees only earlier tokens, plus encoder-decoder attention. It predicts tokens one at a time until an end token §2.1.
  • The review states that the context window is limited by the quadratic cost of attention and gives no model-specific lengths §2.1.

Training stages §2.2

  1. Self-supervised pretraining on unlabelled text, giving a base model.
  2. Supervised fine-tuning on task data, and instruction tuning, giving an instruct model §2.2.
  3. Alignment with reinforcement learning. The review names RLHF, PPO, REINFORCE and RLSF, and models the text generation as a Markov decision process over tokens §2.2.
  4. Reward-free preference methods such as DPO, RRHF and PRO, which compare two completions directly §2.2.

Model families §2.3

  • Encoder-only (BERT): masked-token and next-sentence objectives. RoBERTa drops the next-sentence objective and trains longer §2.3.
  • Decoder-only (GPT): causal, left-to-right next-token prediction §2.3.
  • Encoder-decoder (BART, T5): BART pairs a bidirectional encoder with an autoregressive decoder and corrupts text in pretraining. T5 casts every task as text-to-text. Flan-T5 adds instruction tuning with chain-of-thought examples §2.3.
  • Multimodal: Fuyu maps image patches into the token space of a decoder-only model; NExT-GPT is an any-to-any system with diffusion decoders §2.3.

Chemical representations and data §3.1

  • The review restricts itself to string representations: IUPAC names, SMILES, DeepSMILES, SELFIES and InChI §3.1.
  • It compares chemical corpora with LLM training sets. The largest chemical corpus is in the billions of tokens, about two orders of magnitude below the trillions used for LLaMA 2. Verifiably synthesised compounds are more than five orders of magnitude below §3.1 fig. 5.
  • It notes that Mol-instructions provides about 2M biomolecular instructions §3.1.

Synthesis prediction §3.4

  • Retrosynthesis works backwards from a target to starting materials; forward synthesis builds up from simple materials §3.4.
  • The field is traced through three stages: template-based models, which rely on reaction rules; semi-template models; and template-free sequence models §3.4.
  • The regular-expression tokeniser for SMILES introduced by Schwaller et al. (2018) is described as common to later mol-LLMs §3.4.
  • Molecular Transformer (2019) is presented as the first transformer for synthesis prediction, casting it as translation from reactants and reagents to product §3.4.
  • Chemformer pretrains a BART model on SMILES before task transfer §3.4.
  • Retro-BLEU, a BLEU variant that favours precision, is proposed for retrosynthesis routes §3.4.

Agent definition and modules §4

  • The review defines a language agent as a model that receives observations from an environment and takes actions in it, and an LLM-based autonomous agent as a language agent built around an LLM §4.
  • It follows CoALA (Sumers et al., 2023). The decision process loops, taking observations and choosing actions until the task finishes §4. It renames CoALA's internal tools as "agent modules" and its external tools as "tools". Perception is placed in the environment §4 fig. 6.
  • Memory §4.1: sensory or procedural memory held in the weights or in code; short-term working memory held in the context; and long-term external memory, usually a vector store. The review lists ChromaDB, FAISS, Pinecone, Weaviate, Annoy and ScaNN as examples §4.1.
  • Planning and reasoning §4.2: chain-of-thought, tree-of-thoughts, graph-of-thoughts, self-consistency, ReAct, Reflexion and Chain-of-Verification. Chain-of-Agents uses a manager and worker agents for long contexts §4.2.
  • Profiling §4.3: a role or persona set by hand or generated by an LLM.
  • Perception §4.4: converts image, audio or text inputs into a form the agent can read.
  • Tools §4.5: the decision process proposes candidate actions, evaluates them with a metric the review does not specify, and selects one to run. MRKL routes a request to specialised neuro-symbolic modules.

Agent loop (review's framework)

Reconstructed from §4 §4.1 §4.5 and fig. 6. The review gives no code.

Pseudocode
# LLM agent decision loop, the review's framework  [§4] [fig. 6]
# Input:  task (text), environment (tools), llm, memory store
# Output: last observation; the review does not state a return value

def run_agent(task, environment, llm, memory):
    # 1. Get the first observation from the environment  [§4]
    observation = environment.reset(task)
    # Loop until the task is complete; the review gives no stop rule  [§4]
    while not environment.task_done(task, observation):
        # 2. Recall relevant past steps from memory  [§4.1]
        context = memory.recall(observation)
        # 3. Propose candidate actions, by reasoning, code or all tools  [§4.5]
        candidates = llm.propose(task, observation, context)
        # 4. Score each candidate; the metric is not stated  [§4.5]
        scores = evaluate(candidates, task)
        # 5. Pick one action and run it through a tool  [§4.5] [fig. 6]
        action = select(candidates, scores)
        observation = environment.execute(action)
        # 6. Store the step so later decisions can use it  [§4.1]
        memory.write(action, observation)
    return observation

Agents in science §5

  • Literature (§5.1): PaperQA retrieves papers and answers questions in a retrieval-augmented loop of search, gather-evidence and answer steps. WikiCrow and STORM write encyclopedia-style summaries.
  • Chemical innovation (§5.2): ChemCrow adds chemistry tools to an LLM. Coscientist has a planner with four tool modules. Chemist-X designs reactions. ProtAgent and TAIS are multi-agent systems for protein and gene work. LLaMP is a retrieval-augmented ReAct agent over a materials database.
  • Experiment planning (§5.3): CALMS operates lab instruments; BioPlanner writes pseudocode for protocols; CRISPR-GPT plans gene-editing experiments with human feedback; LLM-RDF covers the synthesis workflow from literature search to purification; Organa automates lab workload.
  • Cheminformatics (§5.4): CACTUS, ChatMOF, Eunomia (with a Chain-of-Verification check), IBM ChemChat and XpertAI.
  • Hypothesis creation (§5.5): SciMON, CoQuest, ChemReasoner (Monte Carlo thought search with a GNN reward) and SGA (LLM proposals refined by simulation). The review places most of the agents in §5 at autonomy level 1 §5.5.

Hyperparameters

Not applicable. The review trains and evaluates no model §1. Hyperparameters for the systems it cites are in those papers and are not transcribed here. The only size data in the review is the parameter counts in tab. 1 §3.4.

Results

Author-reported. The review performs no experiments of its own, so every row below is a figure quoted from a cited work. The "Baseline" column gives the comparison the review names, or "not stated" when it names none.

SettingMetricBaselineReportedSource
Retrosynthesis, USPTO-50K, LSTM seq2seq with attention (Liu et al., 2017)accuracynot stated37.4%§3.4
Retrosynthesis, USPTO-50k, semi-template graph model (Somnath et al., 2021)top-1 accuracynot stated53.7%§3.4
Retrosynthesis, benchmark set, SCROP (Zheng et al., 2020)accuracydeep-learning and template-based methods (margins given in the text)59.0%§3.4
Reaction prediction and retrosynthesis, Reaxys validation set of about 1M reactions, template-based (Segler et al., 2017; not an LLM)top-10 retro accuracy / reaction predictionnot stated95% / 97%§3.4
Chemistry agent ChemCrow, human ratingscore out of 10GPT-4 alone9.24 vs 4.79§5.2
PaperQA on LitQA, 50 multiple-choice questionsaccuracyhuman baseline69.5% vs 66.8% (precision 87.9%)§5.1
WikiCrow vs human Wikipedia articleshare of irrelevant statementshuman article3% vs 16%§5.1
BioPlanner, pseudocode for lab proceduresprocedures correctnone59 of 100 (GPT-4)§5.3
CRISPR-GPT, four gene knockouts in A375 cellsediting efficiency per genenoneabout 70%§5.3
LLM-RDF, copper/TEMPO alcohol oxidationyield / puritynone86% / >98% at 1 g§5.3
Chain-of-Agents (Zhang et al., 2024), long-context tasksimprovementRAG baselineup to 10%§4.2
ChatMOF, search and prediction vs generationaccuracynoneabout 90% / about 70%§5.4
A-Lab, autonomous materials synthesisnew materials in 17 daysnone41§6

Catalogue of encoder-decoder scientific LLMs. The review reports model size, architecture and release date; it omits training data here. Dates in parentheses are the last update. Source: tab. 1 §3.4.

ModelSizeArchitectureRelease
BioT5+252MT52024.02 (2024.08)
nach0250MT52023.11 (2024.05)
ReactionT5220MT52023.11
BioT5252MT52023-10 (2024.12)
MOLGENnot reportedBART2023.01 (2024.03)
Text+Chem T560M, 220MT52023.01 (2023.06)
MolT560M, 770MT52022.04 (2022.12)
T5Chem220MT52022.03
Text2Molnot reportedSciBERT with decoder2021.11
ChemFormer45M, 230MBART2021.07 (2022.01)
SMILES transformernot reportedTransformer2019.11
Molecular Transformer12MTransformer2018.11 (2019.08)

Paper vs code

No official code. The abstract links the GitHub repository ur-whitelab/LLMs-in-science. It is a literature list that accompanies the review, not an implementation, and its page shows no licence. It was not cloned. The review has no method to compare against code, so there is nothing to diff. Discrepancy check: not applicable.

Pitfalls

  • This is a survey. Its numbers come from other papers, and the review did not verify them. Do not cite them as results of this paper.
  • The attention description in §2.1 is loose. Implement attention from the original transformer, not from this text.
  • The review gives no model-specific context lengths §2.1. Check each model you use.
  • The benchmark criticism in §3.1 and §6 relies heavily on one blog post. Treat it as an opinion, not as a measured finding.
  • Table 1 leaves some model sizes unreported, and its release dates include revisions in parentheses tab. 1.
  • The agent taxonomy differs from CoALA in naming. Perception is counted as part of the environment §4 fig. 6, not as an agent module.
  • The review's own §6 describes the A-Lab result as disputed §6. Do not present the 41-material figure as settled.
  • Coscientist's code was not released at the time of writing; only a toy example is provided §5.2. SGA's molecule results are described as not validated §5.5. Treat these as demonstrations.
  • The review states that autonomy level 1 covers most systems in §5, using the level scale of Gao et al. §5.5. The scale is the review's citation, not something this paper defines.

Lineage

  • Builds on: transformer architecture of Vaswani et al. §2.1; the CoALA cognitive-architecture framing for agents, Sumers et al. §4.
  • Compared against: agent classification schemes of Wang et al., Weng et al., Xi et al. and Gao et al. §4.
  • Superseded by: not stated.

Source and license

Adapted from “A Review of Large Language Models and Autonomous Agents in Chemistry” by Mayk Caldas Ramos, Christopher J. Collison, Andrew D. White (arXiv:2407.01603), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors.