arXiv:2608.23118cs.SEAug 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2608.23118

From Metrics to Improvement: A Lifecycle-Aware LLM Feedback Framework for Research Software Quality

Nafis Tanveer Islam, Nafiseh Soveizi, Yutong Li, Zhiming Zhao

Abstract

Research software is increasingly central to scientific workflows, yet it is often developed by researchers with limited software engineering expertise. This can lead to quality issues that hinder maintainability, reproducibility, reuse, and sustainability. Existing static analysis tools can identify such issues, but their outputs often require expert interpretation and provide limited support for translating quality assessments into actionable improvements. To address this gap, we propose a lifecycle-aware framework that integrates quantitative software quality assessment with Large Language Model (LLM)-based code refinement. The framework comprises two stages. First, a lifecycle-aware Quality Model is developed from established software quality standards and practitioner requirements. The model defines five quality dimensions and 25 candidate metrics, of which 14 are operationalized using existing analysis tools and custom measurements. Second, the resulting quality diagnostics are used as structured feedback within an iterative LLM-based refinement process, enabling generated improvements to be repeatedly reassessed against the Quality Model. We evaluate the framework on notebook-centric research software using multiple LLMs and compare iterative structured feedback with single-step feedback and unstructured prompting. The results show improvements in specific quality attributes, particularly code duplication and structural quality, while also revealing trade-offs among maintainability, code size, documentation, and complexity. These findings demonstrate the potential of metric-driven LLM feedback for research software quality improvement while highlighting its inherently multi-objective nature. ∗^{*}

Keywords: Research Software, Software Quality Model, LLM, Feedback-Loop

1 Introduction

Computing technologies have become fundamental to modern scientific research workflows, enabling large-scale data processing, complex simulations, and reproducible experimentation. Among these technologies, software plays a crucial role in wrapping workflows by automating tasks, analyzing data, and visualizing results across domains such as climate science, healthcare, and engineering Kanewala and Bieman (2014); World Meteorological Organization (2026). This type of software, commonly referred to as research software, encompasses a broad spectrum of artifacts developed by and for researchers, ranging from lightweight analysis scripts to large-scale scientific infrastructures Eisty et al. (2018). Such software supports computationally intensive tasks, including large-scale simulations and data-driven analysis, and is essential for solving real-world problems across scientific domains Islam and Zhao (2025a); Volentir et al. (2025); Islam and Zhao (2025b); Kelly and Sanders (2008).

Research software can be categorized into different tiers based on its scope and intended use Nenadic et al. (2025); Felderer et al. (2025). Tier 1 software typically consists of exploratory artifacts such as scripts or Jupyter Notebooks that address a single research question. Tier 2 includes reusable tools developed within research groups, while Tier 3 refers to community-level, production-grade systems requiring long-term maintenance and governance. Although Tier 1 software is often informal and short-lived, it forms the foundation upon which higher-tier systems are built. Consequently, its quality directly impacts the scalability, reusability, and sustainability of scientific software ecosystems.

Ensuring software quality is critical for open science, particularly for reproducibility, reusability, and transparency. Poor-quality research software can lead to irreproducible results, increased technical debt, and limited reuse across projects and environments Soveizi et al. (2023). Empirical studies have shown that many research artifacts fail to meet basic quality standards, especially in exploratory settings where rapid development is prioritized over maintainability Pimentel et al. (2019); Wang et al. (2020b). For instance, large-scale analyses of Jupyter Notebooks reveal widespread issues such as code duplication, lack of documentation, and inconsistent execution order, all of which hinder reproducibility and reuse Koenzen et al. (2020); Pimentel et al. (2021); Wang et al. (2021). Moreover, studies report that a majority of researchers prioritize obtaining results over writing clean and maintainable code, further exacerbating quality issues Kery et al. (2017).

*The source code and experimental data are publicly available at https://github.com/QCDIS/Software Quality Control LLM

To systematically assess software quality, several software quality models have been proposed, such as ISO/IEC 25010, CISQ, and the SIG/TÜ ViT model, which define high-level quality dimensions including maintainability, reliability, and security ISO (2011); Consortium for IT Software Quality (CISQ) (2016). These models rely on measurable quality metrics, such as cyclomatic complexity or code duplication, to provide quantitative insights into software quality. While such models are well established in industrial contexts, they are not directly applicable to research software, particularly Tier 1 artifacts, which are often informal, rapidly evolving, and lack structured engineering practices. Recent initiatives, such as EVERSE EVERSE Project (2025), highlight the need for research-specific quality frameworks that account for the unique characteristics of scientific workflows.

Among Tier 1 research artifacts, Jupyter Notebooks have become a dominant tool in data science and AI due to their interactive and flexible nature, allowing researchers to combine code, data, and documentation in a single environment Kluyver et al. (2016); Beg et al. (2021). They are also central to Virtual Research Environments (VREs), supporting collaborative and reproducible workflows Pelouze et al. (2025); Wang et al. (2025). Notebooks are widely adopted not only for research but also for education and training purposes Johnson (2020). However, their exploratory nature often encourages poor software engineering practices, resulting in non-modular code, weak dependency management, and limited testing Wang et al. (2020a); Chattopadhyay et al. (2020); Grotov et al. (2022). As a result, despite their popularity and potential for reproducibility, notebooks frequently suffer from low software quality. At the same time, existing approaches for addressing these issues remain fragmented: static analysis tools can assess quality but require expertise to interpret PyCQA (2024); Lacchia (2025); Kucherenko (2024), while Large Language Models (LLMs) can assist with code generation and repair but often lack structured, metric-driven guidance Sallou et al. (2024); Sun et al. (2025); Patil (2025); Shi et al. (2025); Shen et al. (2025). Existing LLM-based tools also tend to focus on specific aspects, such as security, rather than holistic software quality improvement Nunez et al. (2024); Islam et al. (2024).

This motivates the need for approaches that jointly address quality modeling with assessment and quality improvement in a unified manner. Accordingly, this paper addresses the following question: How can software quality in Tier 1 research artifacts be systematically measured and improved by integrating metric-based evaluation with LLM-driven refinement? To answer this question, we propose a lifecycle-aware, feedback-driven framework that combines quantitative quality assessment with iterative LLM-based code refinement. In our proposed framework, software quality metrics act as structured signals that guide the software refinement process, enabling continuous and measurable improvement of research software quality.

The novelty of our work lies in integrating a lifecycle-aware quality model with an LLM-based feedback loop tailored to notebook-centric research workflows, bridging the gap between quantitative evaluation and automated improvement.

The main contributions of this paper are as follows:

• We define a lifecycle-aware set of software quality metrics tailored to Tier 1 research software, grounded in existing standards and adapted to notebook-centric workflows.

• We design a feedback-loop-based system that integrates static analysis metrics with LLM-driven code refinement to iteratively improve software quality.

• We evaluate the proposed approach through quantitative experiments and a qualitative case study, demonstrating its effectiveness in improving code quality.

The remainder of this paper is organized as follows. Section 2 reviews existing approaches to research software quality assessment and LLM-based quality improvement and identifies the key research gaps. Section 3 presents the overall methodology, including the requirement analysis, framework design, and research questions. Section 4 describes the development of the lifecycle-aware Quality Model, including metric selection, operationalization, and lifecycle-aware integration. Section 5 presents the LLM-based quality improvement framework, including its methodology, system design, and experimental evaluation. Section 6 discusses the findings in relation to the research questions and outlines the limitations of the proposed approach. Finally, Section 7 concludes the paper and presents directions for future work.

References (40)