Improving Requirements Completeness: Automated Assistance through Large Language Models
Dipeeka Luitel, Shabnam Hassani, Mehrdad Sabetzadeh
TL;DR
The paper tackles incompleteness in natural-language requirements by leveraging BERT's masked language modeling as an external knowledge source to predict missing terminology. It simulates omissions by withholding content, generates multiple predictions per masked token, and then uses a domain-corpus–based ML filter to reduce noise, achieving better precision-recall trade-offs. The study identifies 15 predictions per mask as the optimal setting, shows BERT predictions outperform three simple baselines, and demonstrates that the domain-aware filtering significantly improves accuracy while reducing non-relevant suggestions on 40 PURE dataset specifications. While promising, the work acknowledges limitations such as dataset size, lack of real-user studies, and evaluation only with BERT, suggesting future work with larger corpora, domain experts, and newer LLMs to validate practical benefits.
Abstract
Natural language (NL) is arguably the most prevalent medium for expressing systems and software requirements. Detecting incompleteness in NL requirements is a major challenge. One approach to identify incompleteness is to compare requirements with external sources. Given the rise of large language models (LLMs), an interesting question arises: Are LLMs useful external sources of knowledge for detecting potential incompleteness in NL requirements? This article explores this question by utilizing BERT. Specifically, we employ BERT's masked language model (MLM) to generate contextualized predictions for filling masked slots in requirements. To simulate incompleteness, we withhold content from the requirements and assess BERT's ability to predict terminology that is present in the withheld content but absent in the disclosed content. BERT can produce multiple predictions per mask. Our first contribution is determining the optimal number of predictions per mask, striking a balance between effectively identifying omissions in requirements and mitigating noise present in the predictions. Our second contribution involves designing a machine learning-based filter to post-process BERT's predictions and further reduce noise. We conduct an empirical evaluation using 40 requirements specifications from the PURE dataset. Our findings indicate that: (1) BERT's predictions effectively highlight terminology that is missing from requirements, (2) BERT outperforms simpler baselines in identifying relevant yet missing terminology, and (3) our filter significantly reduces noise in the predictions, enhancing BERT's effectiveness as a tool for completeness checking of requirements.
