SuperCoder2.0:探索将 LLM 用作自主程序员可行性的技术报告
SuperCoder2.0: Technical Report on Exploring the feasibility of LLMs as Autonomous Programmer
AI总结:
本文提出 SuperCoder2.0 自主编程系统,通过分层 RAG 定位、AST 级代码替换、多温度生成与测试反馈循环,在 SWE-bench Lite 上解决 34% 实例并位列全球第四。
摘要:
我们提出 SuperCoder2.0,这是一个旨在通过人工智能增强软件开发的先进自主系统。该系统将 AI 原生开发方法与智能体相结合,以实现完全自主的编码。关键重点领域包括:带有错误输出回溯的重试机制;利用抽象语法树(Abstract Syntax Tree,ast)解析进行全面的代码重写和替换,以最大限度减少 lint 问题;用于检索增强生成的代码嵌入技术;以及专注于定位解决问题的方法,而不是识别具体行号。该方法采用三步分层搜索空间缩减流程来进行代码库导航和缺陷定位:(1)利用检索增强生成(RAG)和仓库文件级映射识别候选文件;(2)使用文件级示意图映射缩小到最相关的文件;(3)提取这些文件中的“相关位置”。代码编辑通过由 CodeGeneration 和 CodeEditing 组成的两部分模块执行,该模块在不同 temperature 值下生成多个解决方案,并替换整个方法或类以保持代码完整性。反馈循环执行仓库级测试用例,以验证和改进解决方案。在 SWE-bench Lite 数据集上进行的实验证明了 SuperCoder2.0 的有效性:在前 5 个候选中,正确文件定位率达到 84.33%,并成功解决了 34% 的测试实例。这一表现使 SuperCoder2.0 在 SWE-bench 排行榜上位列全球第四。该系统处理多样化仓库和问题类型的能力,凸显了其作为自主软件开发通用工具的潜力。未来工作将聚焦于改进代码编辑流程,并探索先进的嵌入模型,以改善自然语言到代码的映射。
英文摘要:
We present SuperCoder2.0, an advanced autonomous system designed to enhance software development through artificial intelligence. The system combines an AI-native development approach with intelligent agents to enable fully autonomous coding. Key focus areas include a retry mechanism with error output traceback, comprehensive code rewriting and replacement using Abstract Syntax Tree (ast) parsing to minimize linting issues, code embedding technique for retrieval-augmented generation, and a focus on localizing methods for problem-solving rather than identifying specific line numbers. The methodology employs a three-step hierarchical search space reduction approach for code base navigation and bug localization:utilizing Retrieval Augmented Generation (RAG) and a Repository File Level Map to identify candidate files, (2) narrowing down to the most relevant files using a File Level Schematic Map, and (3) extracting 'relevant locations' within these files. Code editing is performed through a two-part module comprising CodeGeneration and CodeEditing, which generates multiple solutions at different temperature values and replaces entire methods or classes to maintain code integrity. A feedback loop executes repository-level test cases to validate and refine solutions. Experiments conducted on the SWE-bench Lite dataset demonstrate SuperCoder2.0's effectiveness, achieving correct file localization in 84.33% of cases within the top 5 candidates and successfully resolving 34% of test instances. This performance places SuperCoder2.0 fourth globally on the SWE-bench leaderboard. The system's ability to handle diverse repositories and problem types highlights its potential as a versatile tool for autonomous software development. Future work will focus on refining the code editing process and exploring advanced embedding models for improved natural language to code mapping.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。