27 May 2026
A team of researchers from the University of Cambridge has demonstrated a major breakthrough in scientific instrumentation by using general-purpose Large Language Models (LLMs) to fully build and deploy a complex control system for a highly specialized microscope.
Custom scientific hardware often evolves rapidly, but researchers frequently encounter a bottleneck when creating the tightly synchronized, multi-subsystem software required to run these bespoke instruments. To bridge this gap, the team developed a safety-oriented engineering pipeline leveraging OpenAI’s ChatGPT-5 and Anthropic’s Claude Opus 4.1 as practical coding assistants. This collaboration compressed the entire software development cycle—spanning low-level hardware control, communication middleware, complex scan logic, and a graphical user interface—from a typical timeframe of several months down to just three weeks.
Deploying raw, AI-generated code directly to fragile and expensive laboratory hardware introduces significant risks, as small mathematical or logical bugs could result in physical collisions or corrupted datasets. To safely mitigate this challenge, the researchers established a rigid validation pipeline. Every piece of generated code was first cross-validated between the two independent LLMs to spot inconsistencies and code hallucinations. Following this, the software was rigorously tested inside a custom-designed “digital sandbox” (a virtual simulation environment that mimics instrument responses) before receiving final mandatory human review and approval.
The resulting AI-generated control system was successfully deployed on a physical Scanning Helium Microscope (SHeM). In testing, the system performed 2D imaging and diffraction measurements on molybdenum disulfide and biofilm samples, achieving sub-micrometer resolutions down to 250 nanometers. Critically, the data collected by the AI-built software showed no degradation in image quality or accuracy when compared directly against results from a traditionally hand-coded, manually engineered control system.
While the authors noted some long-term maintainability hurdles—such as the AI’s tendency to rely on unstructured data types and accumulate technical debt when consolidating the code—the methodology itself remains a highly repeatable success. Because this development pipeline is not tied to any specific probe physics or hardware brand, it provides a universal, safety-first template that other experimental laboratories can immediately adopt to rapidly transform cutting-edge instrument concepts into functioning realities.