arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.24428cs.SE
收藏

CodeWiki: 评估AI生成大规模代码库整体文档的能力

CodeWiki: Evaluating AI's Ability to Generate Holistic Documentation for Large-Scale Codebases

FPT Software AI Center(FPT软件人工智能中心);University of Melbourne(墨尔本大学)

Anh Nguyen Hoang, Minh Le-Anh, Bach Le, Nghi D. Q. Bui

AI总结:

CodeWiki提出一个统一框架,用于生成多语言代码库的自动化文档,通过层级分解、递归多代理处理和多模态合成,提升文档质量,实验显示其在高脚本语言上的改进显著。

摘要:

给定一个大型且不断演变的代码库,自动生成涵盖个体函数及跨文件、跨模块和系统级交互的完整、架构感知文档仍是一个开放性挑战。全面的文档对于长期软件维护和协作至关重要,但当前的自动化方法仍无法建模现实软件系统中丰富的语义依赖和架构结构。我们提出了CodeWiki,一个统一的框架,用于跨七种编程语言的自动化仓库级文档生成。CodeWiki引入了三个关键创新:(i) 分层分解,保留多粒度层级的架构上下文;(ii) 递归多代理处理,通过动态任务委托实现可扩展生成;(iii) 多模态合成,整合文本描述与视觉元素如架构图和数据流表示。为实现严格评估,我们引入CodeWikiBench,一个包含多维评分标准和基于LLM的评估协议的综合基准。实验结果表明,CodeWiki在自有模型下获得68.79%的质量评分,优于闭源DeepWiki基线(64.06%)4.73%,尤其在高阶脚本语言上改进显著。我们开源CodeWiki以促进未来研究和社区采用。

英文摘要:

Given a large and evolving codebase, the ability to automatically generate holistic, architecture-aware documentation that captures not only individual functions but also cross-file, cross-module, and system-level interactions remains an open challenge. Comprehensive documentation is essential for long-term software maintenance and collaboration, yet current automated approaches still fail to model the rich semantic dependencies and architectural structures that define real-world software systems. We present \textbf{CodeWiki}, a unified framework for automated repository-level documentation across seven programming languages. CodeWiki introduces three key innovations: (i) hierarchical decomposition that preserves architectural context across multiple levels of granularity, (ii) recursive multi-agent processing with dynamic task delegation for scalable generation, and (iii) multi-modal synthesis that integrates textual descriptions with visual artifacts such as architecture diagrams and data-flow representations. To enable rigorous evaluation, we introduce \textbf{CodeWikiBench}, a comprehensive benchmark featuring multi-dimensional rubrics and LLM-based assessment protocols. Experimental results show that CodeWiki achieves a 68.79\% quality score with proprietary models, outperforming the closed-source DeepWiki baseline (64.06\%) by 4.73\%, with particularly strong improvements on high-level scripting languages (+10.47\%). We open-source CodeWiki to foster future research and community adoption.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑