DocAgent: A Multi-Agent System for Automated Code Documentation Generation
Fuente:
arXiv
Saved in:
| Main Authors: | , , , , , , |
|---|---|
| Format: | Preprint |
| Published: |
2025
|
| Subjects: | |
| Online Access: | |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| _version_ | 1866909621797519360 |
|---|---|
| author | Yang, Dayu Simoulin, Antoine Qian, Xin Liu, Xiaoyi Cao, Yuwei Teng, Zhaopu Yang, Grey |
| author_facet | Yang, Dayu Simoulin, Antoine Qian, Xin Liu, Xiaoyi Cao, Yuwei Teng, Zhaopu Yang, Grey |
| contents | High-quality code documentation is crucial for software development especially in the era of AI. However, generating it automatically using Large Language Models (LLMs) remains challenging, as existing approaches often produce incomplete, unhelpful, or factually incorrect outputs. We introduce DocAgent, a novel multi-agent collaborative system using topological code processing for incremental context building. Specialized agents (Reader, Searcher, Writer, Verifier, Orchestrator) then collaboratively generate documentation. We also propose a multi-faceted evaluation framework assessing Completeness, Helpfulness, and Truthfulness. Comprehensive experiments show DocAgent significantly outperforms baselines consistently. Our ablation study confirms the vital role of the topological processing order. DocAgent offers a robust approach for reliable code documentation generation in complex and proprietary repositories. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2504_08725 |
| institution | arXiv |
| publishDate | 2025 |
| record_format | arxiv |
| spellingShingle | DocAgent: A Multi-Agent System for Automated Code Documentation Generation Yang, Dayu Simoulin, Antoine Qian, Xin Liu, Xiaoyi Cao, Yuwei Teng, Zhaopu Yang, Grey Software Engineering Artificial Intelligence Computation and Language Machine Learning High-quality code documentation is crucial for software development especially in the era of AI. However, generating it automatically using Large Language Models (LLMs) remains challenging, as existing approaches often produce incomplete, unhelpful, or factually incorrect outputs. We introduce DocAgent, a novel multi-agent collaborative system using topological code processing for incremental context building. Specialized agents (Reader, Searcher, Writer, Verifier, Orchestrator) then collaboratively generate documentation. We also propose a multi-faceted evaluation framework assessing Completeness, Helpfulness, and Truthfulness. Comprehensive experiments show DocAgent significantly outperforms baselines consistently. Our ablation study confirms the vital role of the topological processing order. DocAgent offers a robust approach for reliable code documentation generation in complex and proprietary repositories. |
| title | DocAgent: A Multi-Agent System for Automated Code Documentation Generation |
| topic | Software Engineering Artificial Intelligence Computation and Language Machine Learning |
| url | https://arxiv.org/abs/2504.08725 |