The system produced mostly usable Rivet routines, but unclear definitions and complex measurements still led to mistakes.
Rivet routines preserve the precise definitions and calculations behind collider measurements, allowing researchers to compare those measurements with computer simulations and other theoretical models. But only 39% of measurements currently have documented, publicly available routines, according to the paper.
AgentRivet uses several stages: one system extracts the analysis details from a publication, another writes the C++ code, and further systems review the code and its physics. In tests involving recent measurements from the ATLAS and CMS experiments, the workflow produced competent routines with few syntax errors. Its intermediate summaries, drafts and review comments were stored so the output could be inspected.
What the system produced
AgentRivet produced routines with few syntax errors, and its structured summaries of the published analyses were consistently strong enough to support an initial code draft. Code review usually identified incorrect or outdated Rivet syntax, which was often corrected on the first review cycle.
The physics accuracy was reasonable overall but varied by the analysis, the observable being calculated, the language model used and even the individual run. Review was especially important for complex angular observables that required several changes of reference frame and a specially constructed coordinate system. The system also correctly rejected a reviewer request to calculate observables based on a neural network, because that calculation could not be performed with the available setup.
The researchers found that most physics-implementation problems came from definitions in the publications that were subtle or open to interpretation. Some language models also struggled with complex observables even when the papers gave clear definitions. A small amount of outdated Rivet syntax remained in some routines despite the review process.
Why reusable code matters
Rivet routines make published collider measurements reusable: they specify the selections and calculations needed to compare new theoretical models or simulations with existing data. Automating part of their production could help address incomplete analysis preservation, which currently leaves many measurements without publicly available routines.
AgentRivet is not presented as a replacement for checking the code. Its value in this study is as a workflow that can extract technical information from papers, produce a draft routine and record the reasoning and reviews used to create it. Running several models or repeated attempts can help identify unreliable outputs, although doing so increases the cost.
Evidence and caveats
The study reports tests using commercial large language models from OpenAI, Anthropic and Google on two recent measurements from ATLAS and CMS. The researchers assessed the generated code and the stored analysis, coding and physics-review artefacts rather than reporting a large-scale evaluation across the field.
The routines were not perfect: some outdated syntax survived review, and physics fidelity differed between tasks and runs. The work also has not yet completed the planned validation against official routines supplied by the experimental collaborations. The authors propose adding static code checks and using models trained specifically on Rivet4 routines in future work.