arXiv:2509.11942cs.SEcs.AI2025-09被引 2

用智能体系统自动生成代码可视化文档,提升开发理解效率。

VisDocSketcher: Towards Scalable Visual Documentation with Agentic Systems

  • 结合静态分析与大模型智能体识别代码关键元素
  • 自动生成可视化文档覆盖74.4%的样本,优于基线26.7%-39.8%
  • 提出可量化评估框架,能可靠区分高质量与低质量文档

视觉文档能有效降低开发者理解陌生代码的认知负担,提供系统结构和数据流的高层洞察。相比文字文档,开发者更偏好大型系统的可视化表示。然而,视觉文档的生成困难且评估主观,难以标准化。本文首次探索使用代理式大语言模型系统自动生成高层视觉文档,提出VisDocSketcher——首个结合静态分析与LLM代理的方法,可识别代码关键元素并生成对应可视化。我们设计了新型评估框架AutoSketchEval,基于代码级指标衡量生成质量。实验表明,该方法对74.4%的样本生成了有效视觉文档,较模板基线提升26.7%-39.8%。评估框架在区分高质量(代码对齐)与低质量(非对齐)文档上表现优异,AUC超过0.87。本工作为自动化视觉文档研究奠定了基础,提供了可生成且可评估的实际工具。

原文摘要 · Abstract (English)

Visual documentation is an effective tool for reducing the cognitive barrier developers face when understanding unfamiliar code, enabling more intuitive comprehension. Compared to textual documentation, it provides a higher-level understanding of the system structure and data flow. Developers usually prefer visual representations over lengthy textual descriptions for large software systems. Visual documentation is both difficult to produce and challenging to evaluate. Manually creating it is time-consuming, and currently, no existing approach can automatically generate high-level visual documentation directly from code. Its evaluation is often subjective, making it difficult to standardize and automate. To address these challenges, this paper presents the first exploration of using agentic LLM systems to automatically generate visual documentation. We introduce VisDocSketcher, the first agent-based approach that combines static analysis with LLM agents to identify key elements in the code and produce corresponding visual representations. We propose a novel evaluation framework, AutoSketchEval, for assessing the quality of generated visual documentation using code-level metrics. The experimental results show that our approach can valid visual documentation for 74.4% of the samples. It shows an improvement of 26.7-39.8% over a simple template-based baseline. Our evaluation framework can reliably distinguish high-quality (code-aligned) visual documentation from low-quality (non-aligned) ones, achieving an AUC exceeding 0.87. Our work lays the foundation for future research on automated visual documentation by introducing practical tools that not only generate valid visual representations but also reliably assess their quality.

视觉文档智能体系统代码理解自动评估

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。