发表机构
School of Computer Software, Tianjin University(天津大学计算机软件学院)
机构由 AI 辅助整理,请以论文原文为准。AI 中文总结
该研究针对大语言模型代码生成中任务需求质量被忽视的问题,提出WiseSpec框架,通过构建、评估、迭代优化需求提升代码生成效果,在%Resolved指标上平均提升13.17%且优于所有基线。
AI 中文摘要
代码生成旨在根据任务需求自动生成源代码,随着大语言模型(LLMs)的快速发展已受到广泛关注。尽管取得了显著进展,但LLMs在为复杂软件工程任务生成正确代码时往往存在困难,因为任务描述经常不完整、模糊或缺乏关键上下文信息。现有方法主要通过更复杂的工具、技能和工作流来提升编码智能体的能力,却在很大程度上忽视了任务需求本身的质量。为解决这一局限,我们从软件需求工程中汲取灵感,提出WiseSpec——一种用于仓库级代码生成的新型需求驱动智能体框架。WiseSpec会自动构建结构化且信息丰富的需求,通过基于执行的评估来评估其质量,并迭代优化这些需求以更好地指导代码生成。实验结果表明,WiseSpec的表现始终优于所有基线方法,在%Resolved指标上平均提升了13.17%。
英文摘要
Code generation aims to automatically generate source code from task requirements and has attracted significant attention with the rapid advancement of large language models (LLMs). Despite remarkable progress, LLMs often struggle to generate correct code for complex software engineering tasks because task descriptions are frequently incomplete, ambiguous, or lack critical contextual information. Existing approaches primarily improve the capabilities of coding agents through more sophisticated tools, skills, and workflows, while largely overlooking the quality of the task requirements themselves. To address this limitation, we draw inspiration from software requirements engineering and propose WiseSpec, a novel requirements-driven agent framework for repository-level code generation. WiseSpec automatically constructs structured and information-rich requirements, assesses their quality through execution-based evaluation, and iteratively refines them to better guide code generation. Experimental results show that WiseSpec consistently outperforms all baselines, achieving an average improvement of 13.17% in %Resolved.
CommentsAccepted by ASE 2026 (SRC)