US-based computational chemists have developed an end-to-end artificial intelligence (AI) research assistant called Coscientist, which takes on time-consuming tasks like deciding reaction conditions and writing code for automated systems. Gabe Gomes’s team at Carnegie Mellon University in Pittsburgh, adapted the GPT-4 large language model (LLM) that powers the paid-for version of ChatGPT to perform different functions within Coscientist. The scientists have now formally published Coscientist’s first demonstration to autonomously design, plan and perform palladium-catalysed carbon–carbon bond formation reactions, originally described in a preprint in April 2023.

Carnegie Mellon University Cloud Lab

Source: © Carnegie Mellon University

The Carnegie Mellon University Cloud Lab is a remote-controlled, automated lab that its inventors hope will free researchers from long days in the lab

‘Coscientist plans and then designs experiments in such a way that they can be performed within the hardware that it has available, and then executes them and analyses results,’ Gomes tells Chemistry World. ‘This end-to-end framework is what makes this so different.’

LLMs, like ChatGPT, learn how words and phrases relate to each other from billions of written examples. They can then respond to user prompts in natural language. That language focus meant LLMs were a less obvious fit for chemical tasks compared with other AI systems like graph neural networks, which represent molecular structures better. However, researchers including scientists at IBM have used natural language processing AI successfully in chemistry.

Gomes’s team started experimenting with LLMs in October 2022. This meant that the launches of OpenAI’s ChatGPT system in November 2022 and the even more advanced GPT-4 in March 2023 were perfectly timed. The Carnegie Mellon researchers quickly harnessed GPT-4. ‘My janky prototype was able to do things really freaking well,’ Gomes recalls.

Coscientist on target

Soon, Gomes’s team had harnessed GPT-4 in four software modules. One, at Coscientist’s heart, is a planning module. It refers to other modules, including one that searches the internet and academic papers for public information about chemical compounds. A third module embeds text from the instruction manuals for robotic laboratory equipment and directs the LLM to look for information about how to control that equipment. A fourth module analyses data from the experiments to see what did and didn’t work. Coscientist’s core planner module can also refer to a fifth module that does not use GPT-4, but separately runs Python programming language code to do calculations to help prepare experiments.

Figure

Source: © Daniil A Boiko et al 2023

The experimental setup with a liquid handler and UV-visable spectrophotometer

The resulting system autonomously plans, designs and runs chemical reactions, ‘from a single English prompt’, according to Gomes. His team’s main initial example asks Coscientist to do Suzuki and Sonogashira palladium-catalysed carbon–carbon bond-forming reactions. The prompt that Gomes’s doctoral students Daniil Boiko and Robert MacKnight used tells Coscientist where reagents sit in a multiwell plastic plate. They included four aryl halides, an alkyne, a boronic acid, two palladium catalysts and two amine bases, plus a solvent. In less than four minutes, Coscientist designed accurate reaction procedures. Gas chromatography–mass spectrometry showed that Coscientist had successfully made its target products.

Capabilities and concerns

Other exercises also display Coscientist’s capabilities. Some show that it can accurately dispense coloured liquids into plastic multiwell plates in patterns described in a prompt. Others didn’t involve laboratory experiments, such as planning chemical procedures to make common painkillers such as aspirin, acetaminophen and ibuprofen. Gomes’s team also asked Coscientist to optimise reaction conditions, using information from pre-existing datasets – rather than new experiments – to feed back whether it had been successful.

Coscientist_Full_text__Gomes_41586_2023_6792_OnlinePDF_300-5

Source: © Boiko et al, Nature 2023

The LLM can interpret human commands and act accordingly

Limitations and concerns that Gomes’s team highlights include that when asking Coscientist to do new tasks with unknown risks, it’s important to have a human ‘in the loop’. ‘If you’re doing something that has been done hundreds of times, it’s safe,’ Gomes adds. ‘Absolutely nothing prevents you from running Coscientist fully autonomously.’ Another issue is that the Carnegie Mellon team’s tests show that Coscientist can produce controlled drugs and chemical weapons when prompted. ‘We are tackling some of these matters on our own, but the reality is also that we need help.’

Alán Aspuru-Guzik from the University of Toronto excitedly compares Coscientist to the kind of assistant he and other chemists had envisioned in 2018. ‘This paper shows that data from the internet is enough to be able to plan chemical reactions,’ Aspuru-Guzik adds. Another strength is that it uses existing lab automation technology, rather than less well-established humanoid-like technology the Toronto team used in a GPT-3-powered system revealed in August 2023.

Scheme

Source: © Daniil A Boiko et al 2023

Two examples of syntheses of ibuprofen generated by Coscientist

Higher level

Coscientist ranks alongside a similar GPT-4-powered system called ChemCrow, Aspuru-Guzik notes. ChemCrow’s first preprint was published at the same time as Coscientist’s one in April 2023. At that point, ChemCrow wasn’t integrated with automation, something its developers achieved in updated versions of the preprint later in 2023. Meanwhile, Coscientist has not yet produced any novel discoveries that have been published, Aspuru-Guzik continues, and he also wants evidence to show it’s ‘very robust’. ‘More work will be done. But this paper is a good first step.’

One potential implication of such AI assistants is ending long days in the lab for doctoral researchers, something Gomes welcomes. That won’t necessarily mean less work is required for a PhD overall, he says, it will just change what people do. ‘Scientists can be much higher-level in their ideas.’

Now, months after the experiments in this paper, Coscientist is already doing much larger automated synthetic runs, Gomes adds. ‘Last weekend, we ran over 1000 reactions in a weekend,’ he says, compared with just a handful in the newly published paper. ‘We are building the largest dataset of experimental reactions with kinetics – Coscientist is leading those efforts.’