Generative language models potential for requirement engineering applications: insights into current strengths and limitations

Summra Saleem, Muhammad Nabeel Asim, Ludger van Elst, Andreas Dengel

Abstract

Traditional language models have been extensively evaluated for the software engineering domain; however, the potential of ChatGPT and Gemini has not been fully explored. To fulfill this gap, this paper presents a comprehensive case study investigating the potential of both language models for the development of diverse types of requirement engineering (RE) applications. It deeply explores the impact of varying levels of expert knowledge prompts on the prediction accuracies of both language models. Across four different public benchmark datasets of RE tasks, it compares the performance of both language models with existing task-specific machine/deep learning predictors and traditional language models. Specifically, the paper utilizes four benchmark datasets: Pure (requirements extraction), PROMISE (requirements classification), REQuestA (question answering), and Aerospace (NER tagging). Our experiments reveal that, in comparison to ChatGPT, Gemini requires more careful prompt engineering to provide accurate predictions. Except for question-answering, both models under-perform compared to current state-of-the-art predictors across other tasks.

Introduction

Software Requirement Engineering (RE) is a critical, labor-intensive process involving the extraction, classification, and management of stakeholder needs. Historically, this has been automated using traditional machine learning and fine-tuned models like BERT. Recently, massive Generative Language Models (GLMs) such as ChatGPT and Gemini have demonstrated remarkable capabilities in general NLP tasks. However, their effectiveness in the highly specialized domain of software requirements remains a subject of investigation. This study explores whether these generalist models can replace specialized, fine-tuned models and how domain expertise embedded in prompts influences their performance.

Timeline of Large Language Model development from 2017 to 2024

Methodology

The researchers evaluated ChatGPT (version 3.5) and Gemini across four distinct RE tasks: extraction, classification, named entity recognition (NER), and question answering (QA). Instead of fine-tuning, the study relied on prompt engineering, testing three distinct levels of domain knowledge:

  • Level 1 (Low Knowledge): Basic instructions and simple queries.
  • Level 2 (Medium Knowledge): Includes background knowledge and comprehensive task definitions.
  • Level 3 (Expert Knowledge): In-depth background knowledge paired with concrete few-shot examples.
Overview of the research methodology for evaluating GLMs in Requirement Engineering tasks

Experimental Results

The performance was measured against established state-of-the-art (SOTA) predictors using four public benchmark datasets:

1. Requirements Extraction (Pure Dataset)

SOTA models (BERT) achieved an F1-score of 0.86. In contrast, Gemini and ChatGPT reached 0.79 and 0.76, respectively. While capable, the GLMs did not surpass specialized extraction models.

2. Requirements Classification (PROMISE Dataset)

Sorting requirements into functional vs. non-functional categories proved challenging for GLMs. While the SOTA (FnReq-net) achieved an F1-score of 0.96, both ChatGPT and Gemini peaked at 0.78.

3. Named Entity Recognition (Aerospace Dataset)

This task showed the widest performance gap. The specialized Aero-BERT model dominated with an F1-score of 0.92. ChatGPT managed only 0.36, and Gemini scored 0.25. The GLMs struggled with precision-recall trade-offs, often misclassifying specific entities as "OTHER" when prompts became overly complex.

4. Question Answering (REQuestA Dataset)

QA is the primary area where GLMs excelled. ChatGPT achieved an F1-score of 0.91 and Gemini 0.88, outperforming the previous SOTA (Albert) at 0.90. ChatGPT also demonstrated superior performance across ROUGE, BLEU, and METEOR scores.

Key Insights and Discussion

  • The Context Paradox: Surprisingly, injecting highly specific domain knowledge (Level 3 prompts) sometimes degraded performance. Overly detailed prompts occasionally introduced bias, causing models to over-predict certain classes.
  • Model Sensitivity: Gemini proved significantly more sensitive to prompt phrasing than ChatGPT. It required highly precise, expert-level prompts to reach its potential, whereas ChatGPT was more robust with simpler instructions.
  • Generalists vs. Specialists: GLMs currently lack the deep semantic understanding of software requirements that fine-tuned models possess. Their training on broad corpora makes them "jacks of all trades" but less effective for rigid classification and extraction tasks compared to specialized tools.

Conclusion and Future Work

While generative models are highly effective for synthesis-heavy tasks like Question Answering, they are not yet ready to replace specialized models for structured RE tasks like NER and classification. Future research should explore automated prompt optimization techniques, such as "soft prompts" or automated hard-prompt tuning, to bridge the performance gap between generalist GLMs and task-specific predictors.

Summary updated

BibTeX
@inproceedings{saleem2025generative,
  author = {Summra Saleem and Muhammad Nabeel Asim and Ludger van Elst and Andreas Dengel},
  title = {{Generative language models potential for requirement engineering applications: insights into current strengths and limitations}},
  booktitle = {Complex},
  year = {2025},
  doi = {10.1007/s40747-024-01707-6},
}
Figure