Do large language models know chemistry?

07 July 2022, Version 1
This content is a preprint and has not undergone peer review at the time of posting.

Abstract

Mostly yes. We systematically evaluate machine learning large language models (LLMs) that generate code in the context of chemistry. We produce a benchmark set of problems, and evaluate these models based on correctness of code by automated testing and evaluation by experts. We find recent LLMs are able to write correct code across a variety of topics in chemistry and their accuracy can be increased by 30 percentage points via prompt engineering strategies, like putting copyright notices at the top of files. These dataset and evaluation tools are open source which can be contributed to or built upon by future researchers, and will serve as a community resource for evaluating the performance of new models as they emerge. We also describe some good practices for employing LLMs in chemistry. The general success of these models demonstrates that their impact on chemistry teaching and research is poised to be enormous.

Keywords

deep learning
language models
large language models
prompt engineering

Supplementary materials

Title
Description
Actions
Title
Contexts
Description
Contexts used for prompt engineering
Actions
Title
Raw data for automated evaluation
Description
Accuracy data for automated evaluation used to generated figures
Actions
Title
Raw data for expert evaluation
Description
Accuracy data for expert evaluation used to generated figures
Actions
Title
Supporting Information
Description
Additional figures, tables, and analysis.
Actions

Supplementary weblinks

Comments

Comments are not moderated before they are posted, but they can be removed by the site moderators if they are found to be in contravention of our Commenting Policy [opens in a new tab] - please read this policy before you post. Comments should be used for scholarly discussion of the content in question. You can find more information about how to use the commenting feature here [opens in a new tab] .
This site is protected by reCAPTCHA and the Google Privacy Policy [opens in a new tab] and Terms of Service [opens in a new tab] apply.