TL;DR
This paper introduces ProReFiCIA, an LLM-driven approach to automatically identify impacted requirements when changes occur. By leveraging advanced prompt engineering and post-processing techniques, ProReFiCIA achieves high accuracy in detecting impacted requirements while significantly reducing the manual effort required for analysis, making it a cost-effective solution for software development.
What Problem Does This Paper Address?
In software development, requirements are constantly evolving. When a requirement changes, it's crucial to understand which other requirements might be affected – a process called Change Impact Analysis (CIA). Manually performing CIA is time-consuming, error-prone, and doesn't scale well for complex systems. Existing automated methods often struggle with the nuances of natural language requirements, especially when change descriptions are implicit or use different terminology than the requirements themselves. This can lead to overlooked impacts, causing downstream issues and increasing development costs. The paper aims to address this by using Large Language Models (LLMs) to automate and improve the accuracy and efficiency of CIA.
Methods
The core of ProReFiCIA involves several key stages:
- Prompt Engineering: The authors systematically designed and evaluated 64 different prompt variations for LLMs, exploring the impact of various details (role, instruction, context) on performance. They used the RICE template (Role, Instruction, Context, Examples) as a foundation, excluding examples for a zero-shot evaluation.
- LLM Selection: Five prominent LLMs (GPT-4o, Deepseek, LLaMa, Mistral, Gemini) were evaluated to understand their robustness and generalizability across different prompts and datasets.
- Post-processing (Refinement & Filtering): To address LLM limitations like overlooking requirements (the "lost-in-the-middle" problem) and reduce false positives, ProReFiCIA employs two post-processing steps:
- Refinement: Re-processes requirements that were initially missed.
- Filtering: Uses a Natural Language Inference (NLI) model and a ranking phase to further refine the impact set, prioritizing likely impacted requirements and removing false positives.
- Retrieval-Augmented Generation (RAG): For RQ5, domain-specific knowledge (Wikipedia articles) was integrated using RAG to provide LLMs with richer context, aiming to improve understanding of implicit concepts and domain-specific terms.
Datasets
The study utilized two main datasets:
- WASP: A publicly available benchmark dataset for context-aware mobile service platforms. It contains 5 change rationales and 72 requirements. This dataset was used for initial model evaluation and training.
- SAT-DLink & SAT-DLink-Test: A newly introduced real-world dataset from a satellite data link management system. SAT-DLink (5 change rationales, 192 requirements) was used for training and initial evaluation, while SAT-DLink-Test (11 change rationales, 33 impacted requirements) served as a more complex, unseen test set for evaluating ProReFiCIA's performance and comparing it against baselines.
Key Insights and Ideas
- LLM Robustness Varies: Not all LLMs are created equal for CIA. GPT-4o and LLaMa emerged as the most robust and consistent performers across different prompts and datasets, showing stable accuracy.
- Prompt Details Matter, But Context is King: While instruction details can be helpful, especially for complex datasets, context-related prompt details (like explaining the CIA task or providing domain information) consistently proved influential for robust performance.
- Post-processing is Crucial: Simply using LLMs with well-crafted prompts isn't enough. The refinement and filtering steps significantly improve effectiveness (recall) and reduce the cost (effort to review) by addressing LLM limitations.
- Domain Knowledge Boosts Performance: Integrating external domain knowledge via RAG significantly improves ProReFiCIA's ability to capture impacts, especially when change rationales are implicit or rely on specialized terminology.
- Full Context Window is Preferred: For CIA tasks, providing the LLM with the entire set of requirements in its context window (when feasible) yields better results than iterative processing or smaller batching, suggesting LLMs benefit from a holistic view.
Key Results
- ProReFiCIA Performance: Without RAG, ProReFiCIA achieved an average effectiveness (recall) of 85.7% on the SAT-DLink-Test dataset, requiring analysts to inspect only 3.0% of the total requirements.
- RAG Enhancement: Incorporating domain knowledge via RAG boosted effectiveness to 95.8%, with a slight increase in cost to 3.4%.
- LLM Performance: GPT-40 and LLaMa were identified as the most robust models, exhibiting strong accuracy and stable performance.
- Baseline Comparison: ProReFiCIA significantly outperformed baseline methods (CoT, semantic similarity with different cutoff strategies) in both effectiveness and cost. For instance, it achieved 85.7% effectiveness with 3.0% cost, compared to a baseline with 35.1% effectiveness and 8.1% cost.
Limitations and Future Work
- Dataset Size: While the SAT-DLink-Test dataset is more complex, the authors acknowledge that the number of requirements is still smaller than in very large real-world systems. Further experiments on larger datasets are needed to strengthen external validity.
- False Positives: The paper notes that LLMs sometimes rely on correlational signals rather than true causal reasoning, leading to false positives. Further investigation into LLMs' reasoning patterns is suggested to mitigate this.
- Generalizability of Prompt Selection: The authors suggest that the optimal model-prompt selection procedure might need to be performed for each new context and dataset.
- Future Work: The authors plan to investigate the types and causes of false positives and explore adapting ProReFiCIA for other software artifacts like source code and test cases, potentially using LLMs specialized for programming languages. They also plan to explore iterative querying with smaller batches of requirements if the full context window is insufficient.
Summary updated