Using LLMs in Software Requirements Specifications: An Empirical Evaluation

📄 arXiv: 2404.17842v1 📥 PDF

作者: Madhava Krishna, Bhagesh Gaur, Arsh Verma, Pankaj Jalote

分类: cs.SE, cs.AI

发布日期: 2024-04-27

备注: Accepted to RE@Next! at the IEEE International Requirements Engineering Conference 2024 at Reykjavik, Iceland

期刊: 2024 IEEE 32nd International Requirements Engineering Conference (RE)

DOI: 10.1109/RE59067.2024.00056


💡 一句话要点

利用大型语言模型提高软件需求规格文档的生成效率

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大型语言模型 软件需求规格 自动化生成 文档验证 软件工程 效率提升

📋 核心要点

  1. 现有软件需求规格文档的生成过程耗时且容易出错,初级软件工程师在此方面的能力有限。
  2. 本研究利用大型语言模型(如GPT-4和CodeLlama)自动生成SRS文档,以提高效率和准确性。
  3. 实验结果显示,LLMs的输出质量与初级软件工程师相当,并且能够有效识别和纠正需求文档中的问题。

📝 摘要(中文)

软件需求规格(SRS)文档的创建对任何软件开发项目至关重要。鉴于大型语言模型(LLMs)在自然语言查询和生成复杂文本输出方面的最新能力,本研究探讨了它们在加速软件开发生命周期中生成准确、连贯和结构化的SRS草稿的能力。我们评估了GPT-4和CodeLlama在为大学俱乐部管理系统草拟SRS方面的表现,并与人类基准进行了比较。结果表明,LLMs的输出质量可与初级软件工程师相媲美,能够生成完整且一致的草稿。此外,我们还评估了LLMs识别和纠正需求文档中问题的能力。实验表明,GPT-4能够识别问题并提供建设性反馈,而CodeLlama的验证结果则不尽如人意。我们对四个不同用例重复了生成实验,研究了使用LLMs进行SRS生成所节省的时间。实验表明,LLMs可能显著减少初级软件工程师的开发时间,因此我们得出结论,LLMs可以有效提高软件工程师的生产力,节省生成、验证和纠正软件需求的时间和精力。

🔬 方法详解

问题定义:本论文旨在解决软件需求规格(SRS)文档生成过程中的效率低下和质量不稳定的问题。现有方法依赖于人工撰写,容易出现遗漏和错误,特别是对于初级软件工程师而言。

核心思路:论文提出利用大型语言模型(LLMs)自动生成SRS文档,借助其强大的自然语言处理能力,旨在提高文档的生成效率和质量。通过比较LLMs与人类基准的表现,验证其在实际应用中的有效性。

技术框架:整体架构包括需求文档的输入、LLMs的生成过程、输出的评估和反馈机制。主要模块包括输入需求分析、LLMs生成草稿、输出质量评估和问题识别与反馈。

关键创新:最重要的技术创新在于将LLMs应用于SRS文档的生成和验证,首次系统性地评估了其在这一领域的表现,与传统人工撰写方法相比,提供了新的解决方案。

关键设计:在实验中,使用了GPT-4和CodeLlama两种模型,设置了不同的评估标准,包括文档的完整性、一致性和准确性等,确保生成的SRS符合实际需求。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,GPT-4生成的SRS文档质量与初级软件工程师相当,且能够有效识别文档中的问题并提供反馈。与人工撰写相比,使用LLMs生成SRS文档可显著缩短开发时间,提升工作效率。

🎯 应用场景

该研究的潜在应用领域包括软件开发、项目管理和需求分析等。通过利用LLMs生成和验证SRS文档,可以显著提高软件开发团队的工作效率,减少开发周期,降低人力成本,未来可能在软件工程领域产生深远影响。

📄 摘要(原文)

The creation of a Software Requirements Specification (SRS) document is important for any software development project. Given the recent prowess of Large Language Models (LLMs) in answering natural language queries and generating sophisticated textual outputs, our study explores their capability to produce accurate, coherent, and structured drafts of these documents to accelerate the software development lifecycle. We assess the performance of GPT-4 and CodeLlama in drafting an SRS for a university club management system and compare it against human benchmarks using eight distinct criteria. Our results suggest that LLMs can match the output quality of an entry-level software engineer to generate an SRS, delivering complete and consistent drafts. We also evaluate the capabilities of LLMs to identify and rectify problems in a given requirements document. Our experiments indicate that GPT-4 is capable of identifying issues and giving constructive feedback for rectifying them, while CodeLlama's results for validation were not as encouraging. We repeated the generation exercise for four distinct use cases to study the time saved by employing LLMs for SRS generation. The experiment demonstrates that LLMs may facilitate a significant reduction in development time for entry-level software engineers. Hence, we conclude that the LLMs can be gainfully used by software engineers to increase productivity by saving time and effort in generating, validating and rectifying software requirements.