Multi-Agent System for Cosmological Parameter Analysis
Andrew Laverick, Kristen Surrao, Inigo Zubeldia, Boris Bolliet, Miles Cranmer, Antony Lewis, Blake Sherwin, Julien Lesgourgues
TL;DR
The paper addresses the challenge of automating cosmological data analysis pipelines by introducing cmbagent, a multi-agent system (MAS) that uses retrieval-augmented generation (RAG) and local code execution to orchestrate tasks. It demonstrates the approach on ACT DR6 CMB lensing parameter inference, with agents handling information retrieval, code development, planning, and execution within a controlled, largely human-in-the-loop workflow. Key contributions include a detailed MAS architecture, a deterministic workflow to minimize stochasticity in LLM outputs, and a successful reproduction of ACT DR6 constraints with minimal manual coding. The work suggests MAS can accelerate quantitative cosmology and related fields, while highlighting practical constraints such as cost, robustness of RAG for complex literature, and the need for benchmarking and potential future automation enhancements.
Abstract
Multi-agent systems (MAS) utilizing multiple Large Language Model agents with Retrieval Augmented Generation and that can execute code locally may become beneficial in cosmological data analysis. Here, we illustrate a first small step towards AI-assisted analyses and a glimpse of the potential of MAS to automate and optimize scientific workflows in Cosmology. The system architecture of our example package, that builds upon the autogen/ag2 framework, can be applied to MAS in any area of quantitative scientific research. The particular task we apply our methods to is the cosmological parameter analysis of the Atacama Cosmology Telescope lensing power spectrum likelihood using Monte Carlo Markov Chains. Our work-in-progress code is open source and available at https://github.com/CMBAgents/cmbagent.
