This work proposes a novel Reinforcement Learning from AI Feedback (RLAIF) framework, finding that specifications can be iteratively refined by leveraging feedback from the LLM's own outputs, creating a self-improving loop.
Abstract
The use of Large Language Models (LLMs) for code generation has advanced rapidly, yet current systems often struggle with complex algorithmic logic and edge cases. Standard methods for improving code generation, such as iterative self-refinement, often cause repetitive failure cycles, as models cannot independently escape their own logical blind spots. To address this gap, we propose a novel Reinforcement Learning from AI Feedback (RLAIF) framework. Our key insight is that specifications can be iteratively refined by leveraging feedback from the LLM's own outputs, creating a self-improving loop. This approach contrasts with prior methods that treat specifications as static inputs. Rather than updating the parameters of the base model, a proprietary LLM (the Worker) is accessed via API, while a smaller, trainable Student agent learns to guide generation by modifying natural language specifications. A Tutor agent supervises these refinements, ensuring they are precise and actionable, and provides a reward signal driven by failures identified by a synthetic test generator. Crucially, the Worker, Tutor, and Test Generator roles are all instantiated using the same proprietary model, isolating the learning capacity entirely within the Student agent. We evaluate our approach on N = 200 problems using a Qwen 2.5-14B-Instruct Student and a GPT-4o-mini model fulfilling the Worker, Tutor, and Test Generator roles on the LiveCodeBench and HumanEvalPlus benchmarks. Our method achieves relative pass@1 improvements of 3.2% on LiveCodeBench (64.0% vs. 62.0%) and 1.1% on HumanEvalPlus (96.0% vs. 95.0%).
SCOPE is presented, a prover-initialized subgoal critic for code generation that adapts a Lean-oriented prover model to produce three parseable feedback fields for downstream code generation: subgoals, gap analysis, and a robustness checklist.
Yueke Zhang, Yifan Zhang, Zihan Fang et al.· 0 citations
This work introduces a search-based approach that identifies and evolves a set of natural language transformation rules with strong downstream effects on coding performance, and proposes DUALFIX, a staged repair pipeline that combines the evolved transformation rules with execution-feedback repair, addressing both spec...
Amal Akli, Melissa Akli, Cedric Richter et al.· 0 citations
LS-CM (Long-Short Collaborative Memory), a dual-memory architecture that couples a Retrieval-Augmented Generation (RAG)-based short-term memory for code-base context with a Reinforcement Learning (RL)driven long-term memory that distills strategic patterns from historical test failures and patch iterations, is proposed...
Tianjun Mo, Changhao Zhang, Jitong Zou et al.· IEEE Access· 0 citations
A test-driven pipeline is presented that extracts functional requirements (FR) from a problem description, resolves dependencies, maps them into a modular Model-View-Controller (MVC) structure, and generates tests before code, followed by bounded, execution-driven refinement.
Wasay Mohammed Abdul, Ragib Shahariar Ayon, Shibbir Ahmed et al.· SIGSOFT FSE Companion· 0 citations
Two novel contributions are introduced: CodeEval and CodeQual, an open-source execution framework that provides researchers with a ready-to-use evaluation pipeline for evaluating and improving LLMs in software engineering contexts, encompassing both functional correctness assessment and subjective code quality evaluati...
TDD-Agent is introduced, which operationalizes the test-driven development paradigm for code generation and improves not only code correctness but also the effectiveness of the generated tests, yielding higher pass rates, coverage, and mutation scores, suggesting that tests can serve as evolving reasoning artifacts rat...
Hong Yu, Ke-Fan Li, Jia-Kun Li et al.· 2 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.