高能物理研究者终于有了一个能用自然语言操作 Root 数据的智能体,省去手动写脚本的繁琐,做粒子物理分析的团队可以直接试试。
RooAgent 是一个基于 LLM 的自然语言接口,专为高能物理领域的 Root 数据分析设计。它将物理分析函数封装为工具,让 LLM 智能体根据自然语言指令调用,支持直方图检查、事件选择、运动学分布可视化、拟合和显著性估计等任务。该工具提供两种运行模式:基于 LangGraph 的智能体(兼容 GPT-4.1 和 DeepSeek-V3),以及 MCP 服务器模式(用于 Anthropic Claude CLI)。通过 Monte Carlo 模拟和 ATLAS 开放数据测试,RooAgent 展示了在多任务信号-背景工作流中的有效性。代码已开源在 GitHub 并可通过 PyPI 安装。
RooAgent: An LLM Agent for Root-Based High Energy Physics Analysis
We present RooAgent as a natural-language interface for Root-based high energy physics data analysis. The package provides physics analysis functions as tools that an LLM agent invokes in response to plain-language prompts. Two operating modes are supported: a LangGraph-based agent compatible with OpenAI's GPT-4.1 via GitHub Copilot and with DeepSeek-V3 via Ollama, and a Model Context Protocol server for use with the Anthropic Claude CLI (Sonnet~4.6). In both modes the analysis logic is implemented in PyRoot and the LLM selects tools and supplies the required arguments. The package supports histogram inspection, event selection, visualisation of kinematic distributions, fitting, and significance estimation, among other tasks. We illustrate RooAgent with tests based on Monte Carlo simulations of $pp\to ZH$ ($Z\to\ell^+\ell^-$, $H\to b\bar{b}$), a multi-task signal-background workflow, a toy statistical analysis, and an application to ATLAS open data for $H\to ZZ^*\to 4\ell$. The package is available on PyPI and the source code is hosted at https://github.com/amanmdesai/RooAgent.