# Context Matters: Evaluating Context Strategies for Automated ADR Generation Using LLMs

**Authors:** Aviral Gupta, Rudra Dhar, Daniel Feitosa, Karthik Vaidhyanathan  
**arXiv:** [2604.03826](https://arxiv.org/abs/2604.03826)  
**Date:** 2026-04-04  
**Summary page:** https://www.summarizepaper.com/en/arxiv-id/2604.03826v2/

## Key points

- Architecture Decision Records (ADRs) are crucial for preserving system design rationale
- Large Language Models (LLMs) can help alleviate the burden of creating and maintaining ADRs
- Context-aware prompting enhances ADR generation fidelity
- Recency-based context selection is recommended for automated ADR generation
- Effective ADR automation relies more on context engineering than model scale alone

## Summary

, , , , 


Architecture Decision Records (ADRs) are crucial for preserving the rationale behind system design, but their creation and maintenance often face neglect due to authoring overhead. This study explores how Large Language Models (LLMs) can alleviate this burden and examines different strategies for presenting historical ADRs as context to enhance generation quality. By analyzing a vast corpus of sequential ADRs from open-source repositories, five context selection strategies were evaluated across various model families. The results indicate that context-aware prompting significantly enhances ADR generation fidelity, with a small recency window (typically 3-5 prior records) striking the best balance between quality and efficiency. <break>
Retrieval-based context selection offers marginal gains in non-sequential or cross-cutting decision scenarios but does not show significant advantages in linear ADR workflows. The study emphasizes that effective ADR automation relies more on context engineering than model scale alone. Furthermore, the longitudinal analysis reveals that foundational decisions shape system structure, while subsequent decisions evolve based on their immediate predecessors. The RAFG strategy excels in addressing cross-cutting concerns that span multiple components or reactivate dormant architectural patterns, emphasizing the importance of considering architectural scope in context selection. <break>
The study also identifies common documentation issues such as external content dependency and knowledge vaporization affecting ADR quality. Practitioners are advised to prioritize recency-based context selection as a default strategy for automated ADR generation, leveraging simpler approaches like Last-K to reduce implementation barriers. Model scale is found to be less critical than previously assumed, with compact models demonstrating comparable quality when provided with appropriate context. <break>
Organizations are encouraged to maintain self-contained architectural documentation to enhance both automated tool performance and long-term utility. Addressing incomplete documentation through automated generation can help recover undocumented architectural decisions and mitigate documentation debt effectively. In conclusion, this research provides valuable insights for practitioners implementing automated ADR generation, highlighting the significance of strategic factors like context selection, model scale considerations, and comprehensive documentation practices in optimizing the effectiveness of automated tools for architectural knowledge management.
