GenAI助力软件架构设计,但仍面临幻觉与评估难题。
Generative AI for Software Architecture. Applications, Challenges, and Future Directions
- 用GPT等模型通过提示工程支持架构决策与重构
- 多数研究聚焦需求到架构、架构到代码的早期阶段
- 适合关注AI辅助架构设计的研究者与开发者
背景:生成式人工智能(GenAI)正重塑软件开发,但在软件架构领域的应用仍处于起步阶段,此前尚无系统性研究。目标:系统梳理GenAI在软件架构中的应用、动机、场景、可用性及未来挑战。方法:开展多源文献综述(MLR),分析同行评审与灰色文献,通过开放式编码提取主题。结果:发现GenAI广泛用于架构决策支持与架构重建,以OpenAI GPT模型为主,常用少样本提示和检索增强生成(RAG)技术。主要应用于软件开发生命周期(SDLC)初期,如需求转架构、架构转代码阶段,目标架构以单体和微服务为主。然而,多数研究缺乏对生成结果的严格测试。常见挑战包括模型精度不足、幻觉问题、伦理与隐私风险、缺乏架构专用数据集及健全评估框架。结论:GenAI在软件设计中潜力巨大,但仍需构建通用评估方法、提升透明度与可解释性、推动领域特定数据集与基准建设,以弥合理论与实践差距。
原文摘要 · Abstract (English)
Context: Generative Artificial Intelligence (GenAI) is transforming much of software development, yet its application in software architecture is still in its infancy, and no prior study has systematically addressed the topic. Aim: We aim to systematically synthesize the use, rationale, contexts, usability, and future challenges of GenAI in software architecture. Method: We performed a multivocal literature review (MLR), analyzing peer-reviewed and gray literature, identifying current practices, models, adoption contexts, and reported challenges, extracting themes via open coding. Results: Our review identified significant adoption of GenAI for architectural decision support and architectural reconstruction. OpenAI GPT models are predominantly applied, and there is consistent use of techniques such as few-shot prompting and retrieved-augmented generation (RAG). GenAI has been applied mostly to initial stages of the Software Development Life Cycle (SDLC), such as Requirements-to-Architecture and Architecture-to-Code. Monolithic and microservice architectures were the dominant targets. However, rigorous testing of GenAI outputs was typically missing from the studies. Among the most frequent challenges are model precision, hallucinations, ethical aspects, privacy issues, lack of architecture-specific datasets, and the absence of sound evaluation frameworks. Conclusions: GenAI shows significant potential in software design, but several challenges remain on its path to greater adoption. Research efforts should target designing general evaluation methodologies, handling ethics and precision, increasing transparency and explainability, and promoting architecture-specific datasets and benchmarks to bridge the gap between theoretical possibilities and practical use.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。