Using LLMs in Generating Design Rationale for Software Architecture Decisions

Xiyu Zhou, Ruiyin Li, Peng Liang, Beiqi Zhang, Mojtaba Shahin, Zengyang Li, Chen YangarXiv 2025 · DOI

Introduction

Software architecture decisions are critical to a system's long-term health, yet the reasoning behind them—the Design Rationale (DR)—is frequently left undocumented. This lack of documentation creates significant hurdles for maintenance and evolution. This study investigates the potential of Large Language Models (LLMs) to automate the recovery and generation of DR, evaluating their accuracy and practical utility for software architects.

Methodology

The researchers evaluated five prominent LLMs across three distinct prompting paradigms to determine their effectiveness in generating DR. The study followed a structured six-phase approach, from specifying research questions to interviewing practitioners.

Overview of the research methodology across six phases.

The models selected for this study included both proprietary and open-source options, ensuring a broad comparison of current state-of-the-art capabilities. Key details such as knowledge cut-off dates were carefully considered to ensure the validity of the benchmark.

Detailed characteristics of the LLMs evaluated in the study.

The three prompting strategies tested were:

  1. Zero-shot: Direct requests for rationale without prior examples.
  2. Chain of Thought (CoT): A structured four-step reasoning process guiding the model through analysis, advantages, disadvantages, and trade-offs.
  3. LLM-based Agents: A sophisticated multi-agent framework (MetaGPT) where specialized agents (e.g., Information Collector, Reviewer) collaborate, utilizing external search and vector databases to ground their reasoning.

Dataset Construction

To benchmark these models, the authors created a new dataset of 100 real-world architecture problems. These were sourced from Stack Overflow (50 posts), GitHub Issues (25), and GitHub Discussions (25). To prevent data leakage, the researchers exclusively selected posts published after the knowledge cut-off dates of the models.

Key Insights and Results

The evaluation utilized standard metrics (Precision, Recall, F1) alongside a qualitative framework called IHUM (Insightful, Helpful, Uncertain, Misleading).

  • Performance Metrics: LLMs demonstrated high recall (0.62–0.715) but relatively low precision (~0.27). This indicates that while LLMs are excellent at identifying relevant architectural points, they also generate significant additional content.
  • Value of "Extra" Content: Interestingly, 64-69% of the arguments generated by LLMs that were not in the human-authored ground truth were still rated as "Helpful." LLMs often provided a more comprehensive, multi-dimensional analysis than human experts in brief online comments.
  • Agent Superiority: The multi-agent approach yielded the highest recall (0.715) and the lowest rate of misleading information (1.59%), thanks to internal "Reviewer" agents that filtered errors.
  • Practitioner Perspectives: Interviews with six professionals revealed that LLMs are viewed as "efficient assistants." While not yet capable of replacing human experts—largely due to a "context gap" regarding private business requirements—they are highly valued for exploring alternatives and learning new architectures.

Conclusion and Future Work

While LLMs are not yet autonomous architects, they serve as powerful supplementary tools for DR documentation. Future improvements should focus on reducing textual verbosity, incorporating project-specific knowledge via Retrieval-Augmented Generation (RAG), and moving toward multimodal capabilities that can interpret and generate architectural diagrams.

Summary updated

BibTeX
@misc{zhou2025using,
  author = {Xiyu Zhou and Ruiyin Li and Peng Liang and Beiqi Zhang and Mojtaba Shahin and Zengyang Li and Chen Yang},
  title = {{Using LLMs in Generating Design Rationale for Software Architecture Decisions}},
  year = {2025},
  eprint = {2504.20781},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.20781},
}
Figure