基于大语言模型的非功能需求生成方法
CSTR:
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

TP311

基金项目:

国家自然科学基金(62172153); 国家社会科学基金(21BZX055)


Non-functional Requirements Generation Method Based on Large Language Model
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    在软件工程领域中, 非功能需求(NFR)获取一直是需求工程实践中的重要内容, 但容易被忽视. 传统的NFR获取方法主要依赖需求工程师的经验和人工分析, 不仅效率低下, 而且容易出现遗漏和不一致. 近年来, 大语言模型在自然语言处理领域取得突破性进展, 为自动化获取非功能需求提供了新的技术手段. 然而, 直接使用大语言模型生成非功能需求常面临知识幻觉、领域专业性不足等问题. 为此, 提出了一种基于大语言模型的非功能需求自动获取方法, 实现高质量的非功能需求生成. 构建了包含3856条功能需求和5723条非功能需求的结构化关联数据集, 形成22647对FR-NFR关联关系. 通过融合检索增强生成(RAG)技术, 构建了包含3个核心模块的系统化解决方案: 基于最大边际相关性算法的语义案例检索模块、面向非功能需求生成的提示工程模块和基于参数优化的大语言模型生成模块. 通过软件工程专家的专业评分和对BLEU、ROUGE等自动评分指标的多维度评估, 实验结果表明方法在需求的完整性、准确性和可测试性等方面优于现有方法.

    Abstract:

    In software engineering, eliciting non-functional requirements (NFR) remains a critical yet often overlooked task in requirements engineering practice. Traditional NFR elicitation methods predominantly rely on the experience and manual analysis of requirements engineers, leading to inefficiency, omissions, and inconsistencies. Recent breakthroughs in large language models (LLM) in natural language processing have provided new technological means for the automated NFR elicitation. However, directly employing LLM for NFR generation often faces challenges such as hallucination and insufficient domain expertise. To address these issues, this study proposes an automated NFR elicitation method based on LLM to achieve high-quality NFR generation. A structured and correlated dataset comprising 3856 functional requirements and 5723 NFR is constructed, establishing 22647 FR-NFR association pairs. The proposed method integrates retrieval-augmented generation (RAG) technology through three core modules: a semantic case retrieval module based on the maximum marginal relevance algorithm, a prompt engineering module designed for NFR generation, and an optimized LLM generation module. Through professional evaluation by software engineering experts and automatic metrics including BLEU and ROUGE, experimental results demonstrate that the proposed method outperforms existing approaches in terms of completeness, accuracy, and testability of requirements.

    参考文献
    相似文献
    引证文献
引用本文

欧阳柳波,叶巧莹,孟心如,杜漫茹.基于大语言模型的非功能需求生成方法.软件学报,,():1-23

复制
相关视频

分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2025-04-24
  • 最后修改日期:2025-05-31
  • 录用日期:
  • 在线发布日期: 2025-12-24
  • 出版日期:
文章二维码
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号