基于混合评估的软件需求到架构生成基准测试
Benchmarking Requirement-to-Architecture Generation with Hybrid Evaluation
AI总结:
本文提出R2ABench基准,包含真实软件项目及PRD和PlantUML图,通过多维混合评估框架评估生成架构,发现LLM在关系推理上存在不足,代码专用模型和代理框架各有优劣。
摘要:
近年来,大型语言模型(LLMs)在自动化软件工程任务中展现出巨大潜力。从需求文档生成软件架构设计是软件开发的关键步骤。然而,目前缺乏专门为此任务设计的功能数据集。为此,我们引入R2ABench(需求到架构基准),包含多样化的现实软件项目,配以详尽的产品需求文档(PRDs)和专家编写的PlantUML参考图。此外,我们提出一种多维混合评估框架,从结构图度量、多维评分和架构反模式检测三个互补层面评估生成的图。利用此框架,我们进行了全面的实证研究,评估了最先进的模型和代理工作流。研究表明,LLMs在语法有效性及实体提取方面表现良好,但关系推理能力不足,导致架构结构碎片化。代码专用模型部分缓解了这一限制,而代理框架引入了显著的不稳定性而非一致的改进。R2ABench为推进LLM驱动的软件架构生成提供了稳健且标准化的基础。
英文摘要:
Software architecture serves as the blueprint of a software system, capturing high-level structural decisions that shape downstream implementation and system quality. Despite this central role, generating architecture designs from requirement documents remains underexplored, with limited task-specific benchmarks for generation or rigorous evaluation. To bridge this gap, we introduce R2ABench, a benchmark for requirements-to-architecture (R2A) reasoning. R2ABench contains 68 projects with human-validated references collected from both educational-style settings and GitHub repositories. Each project is packaged as a unified instance that provides a structured software requirements specification (SRS), a reference architecture view in PlantUML, and the corresponding source requirement artifacts. To evaluate generated architecture views, we design a layered hybrid evaluation framework spanning syntax validation, structural graph diagnostics, and semantic and evidence-based architecture scoring. Using this framework, we conduct a comprehensive empirical study of state-of-the-art LLMs and agents on R2ABench. We find that current systems can often generate syntactically valid and readable architecture views, but still struggle with relation-level architecture modeling across both subsets: component identification is substantially stronger than edge recovery, and edge hallucination is the dominant structural failure mode. Semantically, structural fidelity does not guarantee requirement coverage or traceability, which emerge as the primary quality gaps. The associated data files are available at https://figshare.com/s/01f0a5fb6243a6a60f23.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。