Abstract
The emergence of large language models (LLMs) has accelerated the development of self-driving laboratories (SDLs) for materials research. Despite their transformative potential, current SDL implementations rely on rigid, predefined protocols that limit their adaptability to dynamic experimental scenarios across different labs. A significant challenge persists in measuring how effectively AI agents can replicate the adaptive decision-making and experimental intuition of expert scientists. Here, we introduce AILA (Artificially Intelligent Lab Assistant), a framework that automates atomic force microscopy (AFM) through LLM-driven agents. Using AFM as an experimental testbed, we develop AFMBench—a comprehensive evaluation suite that challenges AI agents based on language models like GPT-4o and GPT-3.5 to perform tasks spanning the scientific workflow: from experimental design to results analysis. Our systematic assessment shows that state-of-the-art language models struggle even with basic tasks such as documentation retrieval, leading to a significant decline in performance in multi-agent coordination scenarios. Further, we observe that LLMs exhibit a tendency to not adhere to instructions or even divagate to additional tasks beyond the original request, raising serious concerns regarding safety alignment aspects of AI agents for SDLs. Finally, we demonstrate the application of AILA on increasingly complex experiments open-ended experiments: automated AFM calibration, high-resolution feature detection, and mechanical property measurement. Our findings emphasize the necessity for stringent benchmarking protocols before deploying AI agents as laboratory assistants across scientific disciplines.
Introduction
The realization of "self-driving laboratories" (SDLs) has long been a goal in materials science, typically envisioned as automated systems executing pre-programmed scripts. However, real-world scientific experimentation is inherently adaptive and requires the intuition of human experts. While Large Language Models (LLMs) have demonstrated proficiency in theoretical scientific knowledge, their ability to autonomously manage complex experimental workflows remains largely untested. This study addresses this gap by introducing AILA (Artificially Intelligent Lab Assistant), a multi-agent framework designed for autonomous Atomic Force Microscopy (AFM).
The AILA Framework
AILA is a modular architecture built using the LangChain and LangGraph libraries. It transitions AI from a passive "co-pilot" to an active "pilot" capable of hardware control and data interpretation. The system is organized into specialized components:
- Planner: A central orchestrator that receives user queries and routes tasks.
- AFM Handler Agent (AFM-HA): Interfaces directly with the microscope via a Python API, utilizing RAG-based document retrieval and real-time code execution.
- Data Handler Agent (DHA): Manages post-experimental analysis, including image optimization and physical property extraction.
AFMBench: A Benchmark for Autonomous Science
To rigorously evaluate these agents, we developed AFMBench, a suite of 100 expertly curated tasks. These tasks are designed to test tool coordination, operational complexity (Basic vs. Advanced), and the integration of domain-specific documentation with calculation and analysis.
Results and Discussion
Our evaluation of leading models, including GPT-4o, GPT-3.5-turbo, Claude-3.5-sonnet, and Llama-3.3-70B, yielded several key insights:
- GPT-4o Leadership: GPT-4o achieved the highest success rate (65%), demonstrating superior contextual grounding and efficiency.
- The "Sleepwalking" Risk: We identified a safety concern where agents perform unrequested actions based on training data rather than specific instructions. This "sleepwalking" behavior highlights the need for robust safety guardrails in SDLs.
- Agentic vs. QA Performance: High scores on standard materials science Q&A benchmarks did not correlate with experimental success. For instance, Claude-3.5-sonnet struggled with tool selection despite its theoretical knowledge.
- Real-World Application: Despite these challenges, AILA successfully performed complex, open-ended experiments, such as autonomous PID optimization for image quality and graphene layer counting.
Conclusion
AILA and AFMBench provide a foundation for standardizing the evaluation of AI agents in laboratory settings. While LLMs show immense potential for automating complex microscopy, the observed issues with instruction adherence and code generation errors necessitate a "human-in-the-loop" approach and more stringent benchmarking before full autonomy can be realized.
Summary updated