From Failing to Passing: Evolving Natural Language Prompt Optimization Rules for LLM Code Generation
- URL: http://arxiv.org/abs/2607.05121v1
- Date: Mon, 06 Jul 2026 14:10:56 GMT
- Title: From Failing to Passing: Evolving Natural Language Prompt Optimization Rules for LLM Code Generation
- Abstract summary: We introduce a search-based approach that identifies and evolves a set of natural language transformation rules.<n>We then proposeFIX, a staged repair pipeline that combines the evolved transformation rules with execution-feedback repair.<n>Our results show that DualFix recovers up to 30% of baseline failures and fixes 3-5 times more failing cases than Self-Fix.
- Score: 11.454560846406698
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Large language models are known to be sensitive to prompt formulation. Even minor variations in wording can substantially degrade performance. This sensitivity reveals an opportunity: if prompt phrasing can harm performance, can it be used to improve it? To investigate this question, we introduce a search-based approach that identifies and evolves a set of natural language transformation rules with strong downstream effects on coding performance. We then propose DUALFIX, a staged repair pipeline that combines the evolved transformation rules with execution-feedback repair, addressing both specification-level and implementation-level failures. A key strength of our approach lies in its generality: the evolved rules are error-agnostic, reusable across problems, and transferable across models. We evaluate DUALFIX against execution-feedback repair baselines across three models on two challenging benchmarks, LiveCodeBench and APPS. Our results show that the evolved transformations fix from 10-30% of failing cases, including 12-17% of failures that execution-based repair alone cannot resolve. Overall, DualFix recovers up to 30% of baseline failures and fixes 3-5 times more failing cases than Self-Fix across all evaluated settings. Furthermore, we also show that rules evolved on one model transfer zero-shot to other models, outperforming execution-feedback repair without any re-optimization.
Related papers
- Rethinking Self-Evolving Agent Skills: Feedback Dynamics over Multiple Rounds [43.5891705224868]
Self-evolving skill systems promise to improve agents by turning execution feedback into persistent skill updates without changing the underlying model.<n>We present a controlled evaluation framework across five benchmarks and three models.<n>Overall, persistent skill self-evolution is better understood as sparse, validation-filtered search with model- and benchmark-dependent returns.
arXiv Detail & Related papers (2026-07-31T04:02:51Z) - Fantastic Adaptive Taxonomies and How to Use Them [100.20614173157708]
AdaMAST converts execution traces into a compact, evidence-grounded failure taxonomy.<n>No code is hand-authored, no trace human-annotated.<n>In agent-system search, taxonomy-coded diagnoses of failed candidates outperform free-form.
arXiv Detail & Related papers (2026-07-17T17:41:16Z) - Converted, Not Equivalent: Benchmarking Codebase Conversion via Observational Equivalence [56.25095230687242]
Coding agents often over-trust their own local validation routines and declare success on artifacts that satisfy surface checks.<n>This problem is especially acute in conversion, where prior evaluation is outcome-driven.<n>Across blind conversion attempts, the best system reaches 26.7--28.9% overall pass rate despite Spec pass rates up to 91.1%.<n>This suggests that failures stem more from contract-misaligned self-validation than from limited budget or backbone strength.
arXiv Detail & Related papers (2026-05-27T19:57:15Z) - Benchmarking and Evolving Reason-Reflect-Rectify for Reflective Visual Generation [65.7390808636333]
We formalize the Reason-Reflect-Rectify (R3) loop as a core framework to enable multi-round Reflective Visual Generation (RVG)<n>We introduce R3-Bench, a benchmark of over 600 expert-annotated instances that quantifies iterative reasoning and rectification capabilities.<n>Experiments show that R3-Refiner achieves significant improvements on R3-Bench.
arXiv Detail & Related papers (2026-05-19T10:24:31Z) - LiveFMBench: Unveiling the Power and Limits of Agentic Workflows in Specification Generation [75.05397479715576]
Large language models (LLMs) and agents have shown promising progress, but their true capabilities and failure modes remain unclear.<n>We present the first systematic and contamination-aware study of LLM- and agent-based formal specification generation for C programs.
arXiv Detail & Related papers (2026-05-02T11:31:33Z) - AdaExplore: Failure-Driven Adaptation and Diversity-Preserving Search for Efficient Kernel Generation [59.964989458924585]
AdaExplore is an agent framework that enables self-improvement via accumulated execution feedback for performance-critical kernel code generation.<n>In the adaptation stage, the agent synthesizes tasks and converts recurring failures into a reusable memory of validity rules.<n>In the search stage, the agent organizes candidate kernels as a tree and alternates between small local refinements and larger structural regeneration.
arXiv Detail & Related papers (2026-04-17T18:25:03Z) - Imperfect Visual Verification for Code Edition : A Case Study on TikZ [3.6213861298681826]
We use TikZ as a focused case study that isolates the core difficulties of the problem.<n>We define visual code customization as an iterative editing problem with an imperfect oracle.<n>Our findings show that even imperfect verifiers can determine with moderate accuracy whether visual instructions are applied to code, achieving F1-scores up to 0.815.
arXiv Detail & Related papers (2026-04-09T12:21:52Z) - ReLoop: Structured Modeling and Behavioral Verification for Reliable LLM-Based Optimization [6.572539312871392]
Large language models (LLMs) can translate natural language into optimization code, but silent failures pose a critical risk.<n>We introduce ReLoop, addressing silent failures from two complementary directions.
arXiv Detail & Related papers (2026-02-17T20:20:33Z) - Understanding Robustness of Model Editing in Code LLMs: An Empirical Study [1.5624785508022727]
We present a systematic study of five state-of-the-art model editing methods.<n>We apply these methods to three leading open-source code LLMs, CodeLlama, CodeQwen1.5, and DeepSeek-Coder.<n>Instant edits consistently degrade model performance, with syntactic validity dropping by up to 86 percentage points and functional correctness declining by 45 points even in the best-performing setting.
arXiv Detail & Related papers (2025-11-05T04:58:13Z) - Automated Repair of Ambiguous Problem Descriptions for LLM-Based Code Generation [9.943472604121425]
ambiguity of natural language (NL) can harm software quality.<n>We introduce an automated repair of ambiguous NL descriptions.<n>We implement this approach in a tool called SpecFix.
arXiv Detail & Related papers (2025-05-12T06:47:53Z) - Confident Adaptive Language Modeling [95.45272377648773]
CALM is a framework for dynamically allocating different amounts of compute per input and generation timestep.
We demonstrate the efficacy of our framework in reducing compute -- potential speedup of up to $times 3$ -- while provably maintaining high performance.
arXiv Detail & Related papers (2022-07-14T17:00:19Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.