Leveraging ChatGPT to Predict Requirements Testability with Differential In-Context Learning

  • Mahima Dahiya
  • , Rashminder Gill
  • , Nan Niu
  • , Hemanth Gudaparthi
  • , Zedong Peng

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

3 Scopus citations

Abstract

Testability is a desired property of requirements, indicating how easy or difficult a requirements artifact supports its own testing. Prior work predicts natural language (NL) requirements' testability by training a decision tree (DT) via some readability and word measures. To explore better ways of predicting requirements testability, we examine in this paper large language models-ChatGPT in particular. Our experiments on a total of 1,181 requirements from six software systems show that ChatGPT's zero-shot learning performs worse than the DT. A main reason is due to the lack of context specific to the testability prediction task. However, applying ChatGPT's incontext learning (ICL) reveals a limitation of skewed examples caused by the imbalanced data. Thus, we propose a novel approach, called differential ICL, to address the challenges by exploiting the DT and show quantitatively the higher accuracy achieved by differential ICL.

Original languageEnglish
Title of host publicationProceedings - 2024 IEEE International Conference on Information Reuse and Integration for Data Science, IRI 2024
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages170-175
Number of pages6
ISBN (Electronic)9798350351187
DOIs
StatePublished - 2024
Event25th IEEE International Conference on Information Reuse and Integration for Data Science, IRI 2024 - San Jose, United States
Duration: Aug 7 2024Aug 9 2024

Publication series

NameProceedings - 2024 IEEE International Conference on Information Reuse and Integration for Data Science, IRI 2024

Conference

Conference25th IEEE International Conference on Information Reuse and Integration for Data Science, IRI 2024
Country/TerritoryUnited States
CitySan Jose
Period08/7/2408/9/24

Keywords

  • large language models
  • machine learning
  • requirements testability
  • software testing

Fingerprint

Dive into the research topics of 'Leveraging ChatGPT to Predict Requirements Testability with Differential In-Context Learning'. Together they form a unique fingerprint.

Cite this