高能物理研究者终于可以用自然语言做 Root 分析了——RooAgent 把复杂的 PyRoot 操作封装成 LLM 可调用的工具,做粒子物理数据分析的团队可以直接试,省去手写大量脚本的麻烦。
RooAgent 是一个基于 LLM 的智能体,为高能物理领域的 Root 数据分析提供自然语言接口。它将物理分析功能封装为工具,LLM 根据用户自然语言指令调用这些工具。支持两种模式:基于 LangGraph 的 Agent(兼容 GPT-4.1 和 DeepSeek-V3),以及 MCP 服务器模式(兼容 Claude Sonnet 4.6)。功能包括直方图检查、事件选择、运动学分布可视化、拟合和显著性估计。已在多个模拟和 ATLAS 开放数据上验证,代码开源在 GitHub。
\textsc{RooAgent}: An LLM Agent for \textsc{Root}-Based High Energy Physics Analysis
We present \textsc{RooAgent} as a natural-language interface for \textsc{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 \textsc{LangGraph}-based agent compatible with \textsc{OpenAI}'s \texttt{GPT-4.1} via GitHub Copilot and with \texttt{DeepSeek-V3} via \textsc{Ollama}, and a Model Context Protocol server for use with the Anthropic \textsc{Claude} CLI (\texttt{Sonnet~4.6}). In both modes the analysis logic is implemented in \textsc{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 \textsc{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 \textsc{PyPI} and the source code is hosted at \url{https://github.com/amanmdesai/RooAgent}.