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

Institutions

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

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Evaluating the Capability of Prompted LLMs to Recommend NFR from User Stories: A Preliminary Study

Felipe Ramos, Ângelo Perkusich, Kyller Gorgônio, Danyllo Albuquerque et al.
Artificial Intelligence in Law
article

Evaluating the Capability of Prompted LLMs to Recommend NFR from User Stories: A Preliminary Study

Felipe Ramos, Ângelo Perkusich, Kyller Gorgônio, Danyllo Albuquerque, Mirko Perkusich, J. R. Pereira
article en

Abstract

[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.

Instituto Federal de Educação Ciência e Tecnologia da Paraíba (BR)
Ministério da Ciência, Tecnologia e Inovação, Empresa Brasileira de Pesquisa e Inovação Industrial
Openalex Percentile: Top 67%
Artificial Intelligence in Law
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.