Saved in:
Bibliographic Details
Main Authors: van der Vleuten, Noah, Flores, Anthony, Mathur, Shray, Rakitin, Max, Hopkins, Thomas, Yager, Kevin G., Tsai, Esther H. R.
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2511.09964
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915614943084544
author van der Vleuten, Noah
Flores, Anthony
Mathur, Shray
Rakitin, Max
Hopkins, Thomas
Yager, Kevin G.
Tsai, Esther H. R.
author_facet van der Vleuten, Noah
Flores, Anthony
Mathur, Shray
Rakitin, Max
Hopkins, Thomas
Yager, Kevin G.
Tsai, Esther H. R.
contents Evaluating large language models (LLMs) for instrument control requires methods that go beyond standard, stateless algorithmic benchmarks, since the behavior of physical systems cannot be fully captured by unit tests alone. Here we introduce EnvTrace, a simulation-based method that evaluates execution traces to assess semantic code equivalence. EnvTrace is demonstrated with a beamline control-logic digital twin to facilitate the evaluation of instrument control code, with the digital twin itself also enabling the pre-execution validation of live experiments. Over 30 LLMs were evaluated using trace alignment to generate a multi-faceted score for functional correctness across key behavioral dimensions, showing that many top-tier models can approach human-level performance in rapid control-code generation. This is a first step toward a broader vision where LLMs and digital twins work symbiotically: LLMs providing intuitive control and agentic orchestration, and digital twins offering safe and high-fidelity environments, paving the way towards autonomous embodied AI.
format Preprint
id arxiv_https___arxiv_org_abs_2511_09964
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle EnvTrace: Simulation-Based Semantic Evaluation of LLM Code via Execution Trace Alignment -- Demonstrated at Synchrotron Beamlines
van der Vleuten, Noah
Flores, Anthony
Mathur, Shray
Rakitin, Max
Hopkins, Thomas
Yager, Kevin G.
Tsai, Esther H. R.
Software Engineering
Artificial Intelligence
Programming Languages
Evaluating large language models (LLMs) for instrument control requires methods that go beyond standard, stateless algorithmic benchmarks, since the behavior of physical systems cannot be fully captured by unit tests alone. Here we introduce EnvTrace, a simulation-based method that evaluates execution traces to assess semantic code equivalence. EnvTrace is demonstrated with a beamline control-logic digital twin to facilitate the evaluation of instrument control code, with the digital twin itself also enabling the pre-execution validation of live experiments. Over 30 LLMs were evaluated using trace alignment to generate a multi-faceted score for functional correctness across key behavioral dimensions, showing that many top-tier models can approach human-level performance in rapid control-code generation. This is a first step toward a broader vision where LLMs and digital twins work symbiotically: LLMs providing intuitive control and agentic orchestration, and digital twins offering safe and high-fidelity environments, paving the way towards autonomous embodied AI.
title EnvTrace: Simulation-Based Semantic Evaluation of LLM Code via Execution Trace Alignment -- Demonstrated at Synchrotron Beamlines
topic Software Engineering
Artificial Intelligence
Programming Languages
url https://arxiv.org/abs/2511.09964