paperbot · PL 论文追踪

全部论文 待读 收藏

P2 A Pair Programming Framework for Code Generation via Multi-Plan Exploration and Feedback-Driven Refinement

面向代码生成的结对编程框架:通过多方案探索与反馈驱动精化
ASE Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering2024匹配度 3/10 · 该论文用两个 LLM 智能体(Navigator/Driver)做多方案探索与反馈精化以提升代码生成,属于 LLM/Agent 驱动的程序合成与代码生成。它与用户画像中“对 Agentic 程序做静态分析”或“用 LLM/Agent 改进静态分析/形式化验证/浮点或贝叶斯程序分析”的核心方向没有直接交集,且更接近以提示/Agent 提升 LLM 代码生成。引用 12 inbox
Huan Zhang, Wei Cheng, Yuhan Wu, Wei Hu
crossref: 2026-09-12

AI 速览

一句话:提出PairCoder,用导航员与驾驶员两个LLM智能体结对编程,通过多方案探索与执行反馈迭代提升代码生成准确率。

LLM在代码生成上表现突出,但现有提示与精化方法因解法计划僵化,在复杂编程问题上仍受限。本文借鉴结对编程实践提出PairCoder,包含两个协作LLM智能体:Navigator负责提出候选方案、选择当前最优计划,并依据执行反馈决定下一轮迭代;Driver在Navigator指导下完成初始代码生成、代码测试与精化。该交替迭代流程实现多方案探索与反馈驱动精化。作者在多种代码生成基准上使用开源与闭源LLM进行评估,结果表明PairCoder优于直接提示LLM,pass@1相对提升12.00%–162.43%。

问题
现有LLM代码生成方法受限于僵化的解法计划,在复杂编程问题上仍难以获得高准确率。
方法
借鉴结对编程,设计Navigator与Driver两个协作LLM智能体,交替进行多方案探索、代码生成、测试与反馈驱动精化。
评估
在多个代码生成基准上使用开源和闭源LLM进行实验,与直接提示LLM对比pass@1,相对提升12.00%–162.43%。
原文摘要(Abstract)

Large language models (LLMs) have achieved impressive performance on code generation. Although prior studies enhanced LLMs with prompting techniques and code refinement, they still struggle with complex programming problems due to rigid solution plans. In this paper, we draw on pair programming practices to propose PairCoder, a novel LLM-based framework for code generation. PairCoder incorporates two collaborative LLM agents, namely a Navigator agent for high-level planning and a Driver agent for specific implementation. The Navigator is responsible for proposing promising solution plans, selecting the current optimal plan, and directing the next iteration round based on execution feedback. The Driver follows the guidance of Navigator to undertake initial code generation, code testing, and refinement. This interleaved and iterative workflow involves multi-plan exploration and feedback-based refinement, which mimics the collaboration of pair programmers. We evaluate PairCoder with both open-source and closed-source LLMs on various code generation benchmarks. Extensive experimental results demonstrate the superior accuracy of PairCoder, achieving relative pass@1 improvements of 12.00%--162.43% compared to prompting LLMs directly.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8382,
  title = {A Pair Programming Framework for Code Generation via Multi-Plan Exploration and Feedback-Driven Refinement},
  author = {Huan Zhang and Wei Cheng and Yuhan Wu and Wei Hu},
  booktitle = {ASE},
  year = {2024},
  doi = {10.1145/3691620.3695506}
}