Accelerating experimental spintronics research through context provisioning for LLM agents

Aditya Kumar, Kilian Leutner, Mathias KläuiarXiv 2026

TL;DR

In hardware-heavy physics labs, you can’t easily scale discovery by adding robots to run a thousand experiments a day—each run is bespoke, slow, and expensive. Instead of trying to run more experiments, the authors make smarter ones by wiring locally hosted LLM agents directly into a spintronics lab's private literature library, internal wiki, and live measurement hardware. Along the way, they uncover surprising lessons about how standard AI search tools break down on dense scientific data—and how to keep an AI from frying delicate lab equipment.

What Problem Does This Paper Address?

Autonomous "self-driving" labs are booming in fields like fluidic chemistry, where robotic pipettes can standardize and scale synthesis. Experimental spintronics—studying electron spin in solid-state matter for next-gen memory and computing—is a different beast. Samples require intricate nanofabrication recipes and measurements on custom, home-built apparatus. Scaling physical throughput is prohibitively expensive.

The authors target a cheaper, higher-leverage bottleneck: the information gained per experiment. Planning an experiment and analyzing data requires juggling peer-reviewed papers, unwritten "tribal knowledge" about quirky lab setups, and instrument controls. General-purpose LLMs hallucinate technical details and lack local lab context, while cloud tools raise privacy concerns for unpublished data and licensed articles.

Methods

The authors connect on-premise LLMs to three distinct context sources using the open Model Context Protocol (MCP)—essentially a universal USB-C port allowing AI agents to query tools securely on campus:

  1. Literature Context (lit-RAG): Parses PDFs into structured block trees (via Docling and GROBID) that preserve exact page bounding boxes and citation links. Text chunks (up to 510 tokens) and figure captions are embedded with BGE-M3 into a PostgreSQL/pgvector database.
  2. Laboratory Context (wiki-RAG): Indexes the research group's internal wiki—containing fabrication recipes, protocols, and setup quirks—using a hybrid of dense vector embeddings and keyword (lexical) search.
  3. Experiment Context (Safe Instrument Control): Letting an LLM directly actuate physics hardware is a recipe for fried samples. The authors introduce a three-tier safety architecture (virtual instrument, central orchestration, and security layers). Every instrument has a human-readable specification file declaring hard parameter bounds. From this single file, the system auto-generates a GUI, CLI, and MCP server. Agent commands are checked against declared physical limits, gated by role permissions and a software emergency stop, and recorded in an append-only audit log.

Datasets

Rather than relying solely on public open-access datasets (which omit paywalled papers and figures), the authors evaluate their systems on private, real-world research corpora:

  • Group Literature Corpus: ~10,000 physics documents (including licensed articles and theses) containing 63,825 extracted scientific figures.
  • Internal Lab Wiki: 749 pages of institutional know-how and setup documentation.
  • Custom Benchmarks: Following the LitSearch methodology, the authors built 100-question evaluation sets for text, figures, and wiki pages. Questions were generated by an LLM from random passages/figures, filtered by a second LLM, and manually verified by the authors to be specific, answerable, and non-verbatim.

Key Insights and Ideas

  • Vision-language models are practically blind to scientific figures without captions: Multi-panel physics plots look like abstract art without the measurement conditions explained in their captions. Searching figures via text embeddings of their captions vastly outperforms embedding the raw images themselves using state-of-the-art vision-language models (like SigLIP2 and OpenCLIP).
  • "Hybrid search" isn't a silver bullet: In RAG engineering, combining dense vector search with keyword (lexical) search is standard best practice. Yet on a specialized physics corpus, hybrid fusion hurts performance. Because domain terms like "Pt" (platinum) or "skyrmion" appear in thousands of papers, basic keyword matching adds massive noise unless carefully down-weighted. On the lab wiki, however, specific instrument names make keyword search shine.
  • Generalist dense encoders beat citation-trained ones for Q&A: Models trained on citation graphs (SciNCL, SPECTER2) know which papers are broadly related, but BGE-M3—a general dense encoder—is far better at pinpointing specific text chunks that answer granular experimental questions.
Figure 1: Retrieval performance of lit-RAG. (a) Figure recall@10 for BGE-M3 captions vs. vision–language text/image encoders and lexical search. (b) Paper-level recall@10 vs. corpus size for BGE-M3 and SPECTER2. (c) Chunk-level recall@10 for dense, hybrid (reciprocal rank fusion, RRF), and lexical retrieval with BGE-M3.

Key Results

  • Figure Retrieval: Encoding caption text with BGE-M3 retrieves the exact target figure in the top 10 results 92% of the time (recall@10 = 0.92, and 85% recall@1 out of 63,825 figures). Vision-language image embeddings (SigLIP-L, SigLIP2, OpenCLIP) score just 0.04–0.05, no better than basic keyword search (0.04).
  • Encoder & Scaling Performance: On 230 documents, BGE-M3 achieves 0.93 chunk recall@10, decisively beating SPECTER2 (0.75) and SciNCL (0.56). As the corpus scales to ~10,000 documents, BGE-M3 maintains 0.87 paper-level and 0.77 chunk-level recall@10.
  • Dense vs. Hybrid Search: On ~9,600 literature documents, fusing lexical search with dense embeddings via reciprocal rank fusion drops chunk recall@10 from 0.77 (dense alone) down to 0.63. Conversely, on the 749-page lab wiki, dense retrieval hits 0.98 page-level recall@10 (lexical hits 0.92), and hybrid fusion preserves top performance.
  • Live Hardware Deployment: The staged autonomy framework was successfully demonstrated on an agentic Kerr microscope setup, safely progressing from read-only monitoring to bounded physical execution.

Limitations and Future Work

  • Corpus Scaling Degradation & Lexical Scoring: Retrieval recall noticeably dips as the literature archive grows toward 10,000 papers, and the PostgreSQL lexical search lacked inverse document frequency (IDF) weighting—magnifying the penalty from common physics jargon. The authors plan to add domain fine-tuning and cross-encoder reranking to sharpen lit-RAG.
  • Documentation Gaps: An agent is only as smart as the wiki it reads. Interestingly, the authors plan to turn wiki-RAG failures and abstentions into a diagnostic tool—using unanswered questions to spot undocumented lab setups and using LLMs to help researchers fill those gaps.
  • Hardware Scope: Currently demonstrated on routine Kerr microscopy, the team aims to expand bounded agentic control to more complex cryogenic magnetotransport setups.

Summary updated

BibTeX
@misc{kumar2026accelerating,
  author = {Aditya Kumar and Kilian Leutner and Mathias Kläui},
  title = {{Accelerating experimental spintronics research through context provisioning for LLM agents}},
  year = {2026},
  eprint = {2611.36656},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.36656},
}
Figure