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

📅 2026-03-24
📈 Citations: 0
✨ Influential: 0
📄 PDF

Technology Category

Machine Learning: Large Multimodal Models (LMMs)Humans and AI: Human-in-the-loop Machine LearningNatural Language Processing: (Large) Language Models

Application Category

User Modeling, Personalization and Recommendation: Large Language Models (LLM) for user modeling and recommendationEconomics, Online Markets and Human Computation: Cost models of using LLMs in production systemsSearch and Retrieval-Augmented AI: Search Tool Learning with LLM: Teaching LLMs to invoke search and make use of retrieved information
📝 Abstract
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.
Problem

Research questions and friction points this paper is trying to address.

LLM-generated code
compilation errors
code refinement
test quality
automated feedback
Innovation

Methods, ideas, or system contributions that make the work stand out.

LLM-generated code
automated refinement
iterative feedback loops
mutation analysis
test quality improvement