An empirical study on LLM-based classification of requirements-related provisions in food-safety regulations

被引:0
|
作者
Hassani, Shabnam [1 ]
Sabetzadeh, Mehrdad [1 ]
Amyot, Daniel [1 ]
机构
[1] Univ Ottawa, Ottawa, ON, Canada
基金
加拿大自然科学与工程研究理事会;
关键词
Requirements engineering; Legal requirements; Classification; Large language models (LLMs); Food safety; Internet of things; PRIVACY;
D O I
10.1007/s10664-025-10619-z
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
As Industry 4.0 transforms the food industry, the role of software in achieving compliance with food-safety regulations is becoming increasingly critical. Food-safety regulations, like those in many legal domains, have largely been articulated in a technology-independent manner to ensure their longevity and broad applicability. However, this approach leaves a gap between the regulations and the modern systems and software increasingly used to implement them. In this article, we pursue two main goals. First, we conduct a Grounded Theory study of food-safety regulations and develop a conceptual characterization of food-safety concepts that closely relate to systems and software requirements. Second, we examine the effectiveness of two families of large language models (LLMs) - BERT and GPT - in automatically classifying legal provisions based on requirements-related food-safety concepts. Our results show that: (a) when fine-tuned, the accuracy differences between the best-performing models in the BERT and GPT families are relatively small. Nevertheless, the most powerful model in our experiments, GPT-4o, still achieves the highest accuracy, with an average Precision of 89% and an average Recall of 87%; (b) few-shot learning with GPT-4o increases Recall to 97% but decreases Precision to 65%, suggesting a trade-off between fine-tuning and few-shot learning; (c) despite our training examples being drawn exclusively from Canadian regulations, LLM-based classification performs consistently well on test provisions from the US, indicating a degree of generalizability across regulatory jurisdictions; and (d) for our classification task, LLMs significantly outperform simpler baselines constructed using long short-term memory (LSTM) networks and automatic keyword extraction.
引用
收藏
页数:40
相关论文
共 13 条
  • [1] Effective Context Selection in LLM-Based Leaderboard Generation: An Empirical Study
    Kabongo, Salomon
    D'Souza, Jennifer
    Auer, Soren
    NATURAL LANGUAGE PROCESSING AND INFORMATION SYSTEMS, PT II, NLDB 2024, 2024, 14763 : 150 - 160
  • [2] An Empirical Study of the Impact of Waterfall and Agile Methods on Numbers of Requirements-Related Defects
    Rahman, Anzira
    Cysneiros, Luiz Marcio
    Berry, Daniel M.
    39TH ANNUAL ACM SYMPOSIUM ON APPLIED COMPUTING, SAC 2024, 2024, : 1143 - 1152
  • [3] Exploring the application of LLM-based AI in UX design: an empirical case study of ChatGPT
    Zhou, Zhibin
    Li, Yaoqi
    Yu, Junnan
    HUMAN-COMPUTER INTERACTION, 2024,
  • [4] LLM-Based Test-Driven Interactive Code Generation: User Study and Empirical Evaluation
    Fakhoury, Sarah
    Naik, Aaditya
    Sakkas, Georgios
    Chakraborty, Saikat
    Lahiri, Shuvendu K.
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2024, 50 (09) : 2254 - 2268
  • [5] Empirical Study of Chinese Food Safety Situation and Related Governance
    Sun, Chu-Lv
    Wang, Rui
    2016 INTERNATIONAL CONFERENCE ON ENVIRONMENTAL SCIENCE AND ENGINEERING (ESE 2016), 2016, : 154 - 160
  • [6] Regional Regulations and Public Safety Perceptions of Quality-of-Life Issues: Empirical Study on Food Safety in China
    Han, Guanghua
    Yan, Simin
    Fan, Bo
    HEALTHCARE, 2020, 8 (03)
  • [7] An Empirical Study on Software Requirements Classification Method based on Mobile App User Comments
    Jin, Huan
    Wan, Hongyan
    Li, Ziruo
    Wang, Wenxuan
    2022 IEEE 22ND INTERNATIONAL CONFERENCE ON SOFTWARE QUALITY, RELIABILITY, AND SECURITY COMPANION, QRS-C, 2022, : 533 - 541
  • [8] An Empirical Study on Food Safety Early-warning Based on Internet Information
    Yu, Hong-wei
    PROCEEDINGS OF THE 5TH INTERNATIONAL ASIA CONFERENCE ON INDUSTRIAL ENGINEERING AND MANAGEMENT INNOVATION (IEMI2014), 2015, : 199 - 202
  • [9] Research on college students' safety awareness and behavior in food consumption: An empirical study based on the college students in Suzhou
    Chen, Chong
    Advance Journal of Food Science and Technology, 2015, 7 (12) : 977 - 982
  • [10] Monitoring and Guidance of Public Opinions on Food Safety Based on Information Retrieval and Data Mining: An Empirical Study of Microblog Public Opinions on Food Safety in Large Farmers’ Markets
    Xu B.
    Shipin Kexue/Food Science, 2023, 44 (07): : 404 - 412