On Iterative Evaluation and Enhancement of Code Quality Using GPT-4o

Rundong Liu, Andre Frade, Amal Vaidya, Maxime Labonne, Marcus Kaiser +3 more
2/11/2025
cs.SEcs.AI

Official code: jpmorganchase/CodeQuest (17 stars, Apache-2.0, last commit 2026-02-11).

Abstract

This paper introduces CodeQUEST, a novel framework leveraging Large Language Models (LLMs) to iteratively evaluate and enhance code quality across multiple dimensions, including readability, maintainability, efficiency, and security. The framework is divided into two main components: an Evaluator that assesses code quality across ten dimensions, providing both quantitative scores and qualitative summaries, and an Optimizer that iteratively improves the code based on the Evaluator's feedback. Our study demonstrates that CodeQUEST can effectively and robustly evaluate code quality, with its assessments aligning closely with established code quality metrics. Through a series of experiments using a curated dataset of Python and JavaScript examples, CodeQUEST demonstrated significant improvements in code quality, achieving a mean relative percentage improvement of 52.6%. The framework's evaluations were validated against a set of proxy metrics comprising of Pylint Score, Radon Maintainability Index, and Bandit output logs, showing a meaningful correlation. This highlights the potential of LLMs in automating code quality evaluation and improvement processes, presenting a significant advancement toward enhancing software development practices. The code implementation of the framework is available at: https://github.com/jpmorganchase/CodeQuest.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

CodeQUEST is a generalizable framework which leverages LLMs to iteratively evaluate and enhance code quality across multiple dimensions for a variety of programming languages.

174Python, Jupyter NotebookNov 22, 20248 months agoApache-2.0
agentapplied-innovation-of-aicode-qualityjpmorganchaselarge-language-models+1 more

Similar Papers

Cite this paper

@article{liu2025iterative,
  title  = {On Iterative Evaluation and Enhancement of Code Quality Using GPT-4o},
  author = {Rundong Liu and Andre Frade and Amal Vaidya and Maxime Labonne and Marcus Kaiser and Bismayan Chakrabarti and Jonathan Budd and Sean Moran},
  year   = {2025},
  eprint = {2502.07399},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.07399v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.07399.svg)](https://codeofpaper.com/paper/2502.07399)

Discussion