ReqCompletion: domain-enhanced automatic completion for software requirements
摘要
Software requirements are the driving force behind software development. As the cornerstone of the entire software lifecycle, the efficiency of crafting requirement specifications and the quality of these requirements significantly influence the duration of software development. Despite massive research on requirements elicitation, the reality is that requirements are often painstakingly crafted manually, word by word. This manual process is not only time-consuming but also prone to issues such as the misuse of terminology. To address these challenges, we introduce ReqCompletion, an approach designed to recommend the next token in real-time for given prefix of requirements description. ReqCompletion comprises two phases.Firstly, we have designed and implemented the token completion approach. We integrate a knowledge-injection module and a pointer network into GPT-2, which stands as the largest available GPT model that allows for fine-tuning on specialized downstream tasks. Second, we design a distil phase to speed up the completion by downsizing the ReqCompletion. Empirical evaluations using two public datasets demonstrate that ReqCompletion surpasses all baselines in performance (Recall@7 gains up to 65.87% than the second-best model). Furthermore, the effectiveness of its two pivotal design elements has been substantiated through rigorous ablation studies. Regarding the distillation phase, we downsized the model to just 11.6% of its original size, resulting in a 4.07-fold speedup while maintaining a recall value of 98.9%. The utility of our work has been evaluated preliminarily through a small user study.