arxiv link: Opportunities for Retrieval and Tool Augmented Large Language Models in Scientific Facilities by Michael H. Prince et al.

CALMS is a retrieval and tool augmented large language model (LLM) to assist scientists, design experiments around and perform science using complex scientific instrumentation. In the following example we have demonstrated moving a diffractometer at the 34-ID-C beamline of the Advanced Photon Source with a single chat message.

Upon receiving the user prompt “Get the lattice parameters of WSe2 and set the instrument to peak 0 1 2”, a first LLM call was made to retrieve the lattice constants of WSe2 through the Materials Project API. The LLM then interfaced with the specTM, entering commands that will set the lattice constants with the retrieved values. It then requested a move of the motor to the user specified 012 Bragg reflection.

These calls were implemented via the LangChain’s “Structured input ReAct” framework. This library API allows developers to define the parameters and types for multi-parameter input and requires the model to use valid .json to perform a call.

llm_fig4

Demonstration