EnvTrace: Simulation-Based Semantic Evaluation of LLM Code via Execution Trace Alignment – Demonstrated at Synchrotron Beamlines
Noah van der Vleuten, Anthony Flores, Shray Mathur, Max Rakitin, Thomas Hopkins, Kevin G. Yager, Esther H. R. Tsai
评估用于仪器控制的大型语言模型(LLM)需要超越标准无状态算法基准的方法,因为仅通过单元测试无法完全捕获物理系统的行为。 在这里,我们介绍了EnvTrace,一种基于模拟的方法,用于评估执行跟踪以评估语义代码等同。 EnvTrace使用波束线控制逻辑数字孪生体进行演示,以促进仪器控制代码的评估,数字孪生本身也能够对现场实验进行执行前验证。 超过30个LLM使用跟踪对齐进行了评估,以生成跨关键行为维度的功能正确性的多方面评分,表明许多顶级模型可以在快速控制代码生成中接近人类级性能。 这是迈向更广阔视野的第一步,其中LLM和数字孪生共生工作:LLM提供直观的控制和代理编排,数字孪生提供安全和高保真环境,为自主体现AI铺平道路。
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...