Beyond Passing Tests: A Systematic Review and Controlled Re-evaluation of Techniques for Improving the Quality of LLM-Generated Code
Reading guide · Based on sections of the original paper
Why read this
Practitioners and researchers choosing or evaluating code-quality interventions can use it to calibrate claimed gains against a best-of-n baseline at the same number of model calls, and to see which quality metrics are fragile.
What the authors found
- In the head-to-head comparison of 66 highlighted techniques (one model, one benchmark set, common budgets), the author reports that only one beat best-of-n on its own target dimension beyond the 95% interval. With 66 comparisons, about two such wins would be expected by chance, so the author treats this single win as noise. 20. Threats to Validity
- The author also ran a robustness control with a lower-temperature best-of-n reference at B=4. Across 120 readability/maintainability and security cells (five inference-time techniques, eight metrics, three models), the techniques were better in 9 cells and worse in 48. The author concludes that the advantage of sampling does not depend on the reference's sampling temperature. S9. Controls for the best-of- n n reference
- The three training-time techniques (LoRA-SFT, DPO, RL) cut maintainability issues per kLOC relative to single-shot output. On the Gemma 4 31B model, however, all three lost correctness on HumanEval+ compared with that single shot. 16.1. Results of the main re-evaluation
Main limitation
Technique effects were measured only on function-level tasks, so the author leaves transfer to agentic or repository workflows open. In addition, the best-of-n ranker is built from the same analyzers used elsewhere in the pipeline. 21. Conclusion
Where to start
16.1. Results of the main re-evaluation · Look for how significance is defined against the budget-matched best-of-4 reference versus the single shot, and for the per-model trade-offs between quality metrics and correctness.
Abstract
Large language models pass most functional-correctness benchmarks, but passing tests says little about whether their code is readable, efficient or secure. Many techniques claim to improve these qualities, yet their evidence is scattered, usually covers one quality dimension and is rarely compared at an equal compute budget. We contribute a systematic review and a controlled re-evaluation. A systematic literature review of 628 primary studies (July 2021 to October 2026), with disclosed, author-reviewed LLM assistance, organizes the techniques by stage, signal source and quality target. Most studies measure only the dimension they target, gains often come with unchanged or unreported correctness, single automated quality signals are gamed, and compute, variance and contamination are rarely reported. A controlled re-evaluation runs ten techniques on four models at matched budgets on correctness, maintainability, efficiency and security benchmarks, extends it to thirteen current models and repository-level tasks, and compares 66 highlighted techniques head-to-head on Gemma 4 31B. At one call, quality prompting raises analyzer issue counts and leaves complexity and judge scores almost unchanged. At matched budgets, best-of-n sampling with an analyzer-weighted ranker matches or beats prompting, planning, self-refinement, a reviewer agent and retrieval on measures the ranker does not optimize, while an analyzer feedback loop and fine-tuning beat it only on analyzer issue counts. Large correctness losses on HumanEval+, a likely contaminated benchmark near its ceiling, do not appear on contests held after the models' training cutoffs. In the head-to-head, 1 of 66 techniques beats best-of-n on its primary target beyond the 95% interval, a rate consistent with chance. Gains should be reported against a budget-matched sampling baseline and on measures independent of the technique's own signal.