Enhancing the development of Cherenkov Telescope Array control software with Large Language Models
Dmitriy Kostunin, Elisa Jones, Vladimir Sotnikov, Valery Sotnikov, Sergo Golovachev, Alexandre Strube
TL;DR
The paper tackles the difficulty of deploying AI assistants in specialized science workflows by developing two domain-tailored LLM agents for the Cherenkov Telescope Array: CTAgent, which aids ACADA control software development, and Gammapygpt, which generates and validates Gammapy-based data analyses. The approach combines project-specific context alignment, input normalization, structured prompting, sandboxed execution, and a validation-first, self-correcting loop to ensure reliable outputs. Findings show CTAgent can produce validated data-model code with only a few refinement iterations, while Gammapygpt attains high reliability and, in benchmarks, up to 100% success on routine tasks for some models. By enabling open-access, offline deployment on platforms like Helmholtz Blablador, these agents promise reduced development effort, fewer errors, and faster scientific discovery in very-high-energy gamma-ray astronomy.
Abstract
We develop AI agents based on instruction-finetuned large language models (LLMs) to assist in the engineering and operation of the Cherenkov Telescope Array Observatory (CTAO) Control and Data Acquisition Software (ACADA). These agents align with project-specific documentation and codebases, understand contextual information, interact with external APIs, and communicate with users in natural language. We present our progress in integrating these features into CTAO pipelines for operations and offline data analysis.
