arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.21178cs.SEcs.AI
收藏

基于LLM的自动架构视图生成:我们目前处于什么位置?

LLM-based Automated Architecture View Generation: Where Are We Now?

Software Engineering Research Centre(软件工程研究中心);IIIT Hyderabad, India(海得拉巴印度理工学院)

Miryala Sathvika, Rudra Dhar, Karthik Vaidhyanathan

AI总结:

研究评估了LLM和代理方法在从源代码生成架构视图的能力,发现提示策略略有提升,定制代理在清晰度和细节水平上表现最佳,但仍存在粒度不匹配问题。

摘要:

架构视图对软件架构文档至关重要,但手动创建耗时且常导致过时的产物。随着系统复杂性增加,从源代码自动生成视图变得越来越有价值。目标:我们实证评估了LLM和代理方法生成架构视图的能力。方法:我们分析了340个开源仓库,使用3个LLM和3种提示技术以及2种代理方法,生成了4137个视图。我们通过自动化指标和人工评估比较生成的视图与真实值。结果:提示策略有微小提升。Few-shot提示相比零shot基线减少了9.2%的清晰度失败。定制代理一致优于通用代理,在清晰度(22.6%失败率)和细节水平成功(50%)上表现最佳。结论:LLM和代理方法能够生成语法正确的架构视图,但普遍存在粒度不匹配问题,停留在代码层面而非架构抽象层面。这表明仍需人类专业知识,LLM和代理被视为辅助工具而非自主建筑师。

英文摘要:

Architecture views are essential for software architecture documentation, yet their manual creation is labor intensive and often leads to outdated artifacts. As systems grow in complexity, the automated generation of views from source code becomes increasingly valuable. Goal: We empirically evaluate the ability of LLMs and agentic approaches to generate architecture views from source code. Method: We analyze 340 open-source repositories across 13 experimental configurations using 3 LLMs with 3 prompting techniques and 2 agentic approaches, yielding 4,137 generated views. We evaluate the generated views by comparing them with the ground-truth using a combination of automated metrics complemented by human evaluations. Results: Prompting strategies offer marginal improvements. Few-shot prompting reduces clarity failures by 9.2% compared to zero-shot baselines. The custom agentic approach consistently outperforms the general-purpose agent, achieving the best clarity (22.6% failure rate) and level-of-detail success (50%). Conclusions: LLM and agentic approaches demonstrate capabilities in generating syntactically valid architecture views. However, they consistently exhibit granularity mismatches, operating at the code level rather than architectural abstractions. This suggests that there is still a need for human expertise, positioning LLMs and agents as assistive tools rather than autonomous architects.

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

↑