arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2607.01425cs.AI
收藏

Agent4cs:面向大型分层代码库的代码摘要多智能体系统

Agent4cs: A Multi-agent System for Code Summarization in Large Hierarchical Codebases

Siemens AG(西门子股份公司);Technical University of Munich(慕尼黑工业大学);Kings College London(伦敦国王学院)

Yongjian Tang, Ezgi Sarikayak, Doruk Tuncel, Jie M. Zhang, Thomas Runkler

AI总结:

提出多智能体框架Agent4cs,通过自底向上方式对大型代码库进行摘要,包含摘要、关键词提取和质量保证三个智能体,在语义一致性和关键词覆盖率上分别提升8%和38%。

摘要:

理解大型复杂代码库,尤其是那些结构混淆且文档不完整的代码库,仍然是一个重大挑战。现有的代码摘要解决方案通常依赖单一语言模型或编码助手(如Claude Code),并将源代码视为平面文本,未能充分利用代码库中丰富的相互依赖和层次信息。为了解决这些不足,我们提出了Agent4cs——一个多智能体框架,它以自底向上的方式总结大型代码库,其中摘要智能体专注于生成稳健的摘要;关键词提取智能体主动从子文件夹中识别关键信息;质量保证智能体迭代优化输出的可读性、连贯性和完整性。在7个前沿模型上的评估表明,与两种使用代码片段的结构化提示基线相比,Agent4cs在所有文件夹级别上的语义一致性平均提高了8%。此外,在真实世界数据集上的广泛评估显示,与相同基线相比,归一化关键词覆盖率提升了高达38%。

英文摘要:

Understanding large, complex codebases, especially those with obfuscated structures and incomplete documentation, remains a significant challenge. Existing code summarization solutions often rely on a single language model or coding assistant like Claude Code, and treat source code as flat text, underutilizing the rich interdependencies and hierarchical information within a repository. To address these shortcomings, we propose Agent4cs - a multi-agent framework that summarizes large codebases in a bottom-up fashion, where a summarization agent focuses on producing robust summaries; a keyword-extraction agent proactively identifies critical information from subfolders; and a quality-assurance agent iteratively refines the outputs for readability, coherence, and completeness. Evaluated on 7 frontier models, Agent4cs improves semantic consistency across all folder levels by average 8% compared to two structured prompting baselines with code segments. Furthermore, extensive evaluation on real-world datasets demonstrates up to 38% gains in normalized keyword coverage rate over the same baselines.

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

↑