Large Language Models for Classification of Functional and Nonfunctional Requirements
摘要
The classification of software requirements into functional and nonfunctional is an important part of software engineering. Software engineers need to understand what the function of the software is to model the system and verify its viability as described by the requirements. The classification of requirements using Machine Learning and Artificial Intelligence has been done many times in the past decades with notably high success. Of course, these classification models are not perfect, and an analyst or software engineer will likely still need to spend time perfecting the classifications. In recent years there have been significant advancements in Artificial Intelligence in the form of Large Language Models. These Large Language models can be used to classify requirements. In this research we fine-tuned a Large Language Model to classify functional and nonfunctional requirements and compare it to some base-line Machine Learning Models, Randomforest, XGboost, and Multi-layer Perceptron, trained for the same task. The results show the Large Language Model has a recall of “1” and an accuracy of 98.8% if trained with requirements that have some connectivity between the requirements. Information about connectivity is included in the dataset used to fine-tune the model. This type of training with connectivity may only be possible with Large Language Models. The method of training including prompts, and the fine-tuned model are the primary contributions of this research.