Evaluating the Capability of Prompted LLMs to Recommend NFR from User Stories: A Preliminary Study
[Context] Non-functional requirements (NFRs) are critical to software quality but are often underspecified in agile projects. Previous work proposed NFRec, a k-nearest neighbors (kNN) recommender system, to support NFR elicitation based on structured User Story metadata. [Objective] This study investigates whether Large Language Models (LLMs), when prompted with structured representations of User Stories, can generate relevant NFRs comparable to those recommended by NFRec. [Method] We reused the original dataset of 246 User Stories and adopted the same evaluation protocol. The gpt-4.1-mini model was queried using zero-shot prompting, instruction tuning, and role-playing strategies. Predicted NFRs were evaluated using effectiveness measures against the original ground truth. [Results] The LLM achieved high recall and moderate F1 performance but lower precision due to frequent overgeneration. The quality of recommendations was highly sensitive to prompt design. In several cases, the model produced plausible NFRs not present in the baseline, suggesting that traditional metrics may understate its practical value. [Conclusion] Prompted LLMs offer a viable and flexible alternative for NFR elicitation, especially in cold-start scenarios where historical data is scarce. This study serves as an initial step toward LLM-assisted requirements engineering, opening up new directions for research in prompt engineering, hybrid models, and evaluation metrics that better reflect semantic relevance and practical utility.
Authors
- Felipe Ramos (ORCID: https://orcid.org/0000-0002-0937-811X)
- Ângelo Perkusich (ORCID: https://orcid.org/0000-0002-7377-1258)
- Kyller Gorgônio (ORCID: https://orcid.org/0000-0001-9796-1382)
- Danyllo Albuquerque
- Mirko Perkusich (ORCID: https://orcid.org/0000-0002-9433-4962)
- J. R. Pereira (ORCID: https://orcid.org/0000-0002-2110-6790)
Institutions
- Instituto Federal de Educação Ciência e Tecnologia da Paraíba (BR)
Publication Details
- Published
- 2025-09-22
- DOI
- https://doi.org/10.5753/sbes.2025.11042
- Primary Topic
- Artificial Intelligence in Law
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Ministério da Ciência, Tecnologia e Inovação
- Empresa Brasileira de Pesquisa e Inovação Industrial