LLMLOOP: Improving LLM-Generated Code and Tests through Automated Iterative Feedback Loops

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Ravi, Ravin, Bradshaw, Dylan, Ruberto, Stefano, Jahangirova, Gunel, Terragni, Valerio
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866911543019438080
author Ravi, Ravin
Bradshaw, Dylan
Ruberto, Stefano
Jahangirova, Gunel
Terragni, Valerio
author_facet Ravi, Ravin
Bradshaw, Dylan
Ruberto, Stefano
Jahangirova, Gunel
Terragni, Valerio
contents Large Language Models (LLMs) are showing remarkable performance in generating source code, yet the generated code often has issues like compilation errors or incorrect code. Researchers and developers often face wasted effort in implementing checks and refining LLM-generated code, frequently duplicating their efforts. This paper presents LLMLOOP, a framework that automates the refinement of both source code and test cases produced by LLMs. LLMLOOP employs five iterative loops: resolving compilation errors, addressing static analysis issues, fixing test case failures, and improving test quality through mutation analysis. These loops ensure the generation of high-quality test cases that serve as both a validation mechanism and a regression test suite for the generated code. We evaluated LLMLOOP on HUMANEVAL-X, a recent benchmark of programming tasks. Results demonstrate the tool's effectiveness in refining LLM-generated outputs.
format Preprint
id arxiv_https___arxiv_org_abs_2603_23613
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle LLMLOOP: Improving LLM-Generated Code and Tests through Automated Iterative Feedback Loops
Ravi, Ravin
Bradshaw, Dylan
Ruberto, Stefano
Jahangirova, Gunel
Terragni, Valerio
Software Engineering
Artificial Intelligence
D.2.3; D.2.4; D.2.5; I.2.2
Large Language Models (LLMs) are showing remarkable performance in generating source code, yet the generated code often has issues like compilation errors or incorrect code. Researchers and developers often face wasted effort in implementing checks and refining LLM-generated code, frequently duplicating their efforts. This paper presents LLMLOOP, a framework that automates the refinement of both source code and test cases produced by LLMs. LLMLOOP employs five iterative loops: resolving compilation errors, addressing static analysis issues, fixing test case failures, and improving test quality through mutation analysis. These loops ensure the generation of high-quality test cases that serve as both a validation mechanism and a regression test suite for the generated code. We evaluated LLMLOOP on HUMANEVAL-X, a recent benchmark of programming tasks. Results demonstrate the tool's effectiveness in refining LLM-generated outputs.
title LLMLOOP: Improving LLM-Generated Code and Tests through Automated Iterative Feedback Loops
topic Software Engineering
Artificial Intelligence
D.2.3; D.2.4; D.2.5; I.2.2
url https://arxiv.org/abs/2603.23613