Automatically Refining Coding Rules for AI Coding Agents
Zhengyuan Jiang, Reachal Wang, Yuepeng Hu, Yupu Wang, Yuqi Jia, Neil Gong
NeurIPS page · OpenReview · alphaXiv · Open on the map
Category: LLM Agents, Evals & Benchmarks › LLM-Driven Code Synthesis and Verification · Type: new method · Keywords: coding rule refinement, AI coding agents, automated rule optimization, LLM-based mutation, rule evaluation, code generation
Areas: Code & Coding Agents › Code Generation and Optimization › Code Generation; AI Agents › Agent Benchmarking › Agentic code and proof generation; Evaluation & Benchmarks › Language Model and Agent Benchmarks › Coding Agent Evaluation; RL for LLMs & Agents › Language Model Agents › Language Model Optimization
Summary
RuleRefine is a framework that automatically refines coding rules for AI coding agents by iteratively mutating and evaluating rule candidates.
Explained to a 5-year-old
Some computers help write code by following rules. Making these rules by hand takes a lot of time and can be not great. This paper creates a way to let a computer automatically make better rules. It tries many new rule ideas, tests them, and keeps the best ones. This helps the computers write code that works better and uses less effort.
Explained to a 5-year-old, longer
Computers that write code need rules to follow. People used to write these rules by hand. Writing rules by hand is slow and sometimes not perfect. This paper describes a system that can improve those rules on its own. It keeps a collection of possible rules. The system makes new versions of the rules using a smart language model. It then checks how well each new rule works. The best rules are kept, and the worst ones are discarded. This process repeats many times, getting better and better. After many rounds, the rules become much more effective. The system also reduces the amount of work needed to improve code. It helps developers by making code more reliable and easier to produce. Overall, it makes AI coding assistants smarter without extra human effort.
For a technical reader
The paper presents an automated framework that evolves coding rules for AI agents. It uses an LLM to generate rule variants and a judge to evaluate them, iteratively retaining the best performers. Evaluations across multiple coding frameworks, LLMs, and benchmarks show improvements in correctness, code length, and token usage over manual and baseline methods.
Problem
AI coding agents rely on coding rules that are typically hand-crafted, which makes rule development labor-intensive and often suboptimal. There is a need for an automated way to improve these rules without extensive manual effort.
Method
The approach maintains a pool of candidate coding rules and iteratively improves them. In each iteration, an LLM-powered mutator generates rule variants, and a judge evaluates these variants, keeping the best performers for the next round. This evolutionary process refines the rules without human intervention.
Results
The approach achieves higher functional correctness, shorter code, and lower generation cost compared to manual engineering and prompt optimization baselines.
Contributions
It introduces an automated framework for refining coding rules that iteratively mutates and judges rule candidates, eliminating the need for manual rule engineering. The work provides extensive evaluations across multiple coding-agent frameworks, backbone LLMs, and benchmarks, showing consistent improvements over existing baselines.
Research questions this paper is counted under
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction