arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.01952cs.SE
收藏

基于人类与大语言模型协作的上下文自适应需求缺陷预测

Context-Adaptive Requirements Defect Prediction through Human-LLM Collaboration

University of Duisburg-Essen(杜伊斯堡-埃森大学);paluno -- The Ruhr Institute for Software Technology(鲁尔软件技术研究所 paluno)

Max Unterbusch, Andreas Vogelsang

AI总结:

本文提出基于人类与大语言模型协作的上下文自适应需求缺陷预测方法,通过反馈循环和少量样本学习提升预测性能,优于传统方法。

摘要:

传统的自动化需求评估通常依赖于通用模式作为缺陷性的代理,通过基于规则的启发式方法或在大规模标注数据集上训练的机器学习分类器来实现。然而,什么是“缺陷”本质上是依赖于上下文的,并且在不同项目、领域和利益相关者解释中会有所不同。在本文中,我们提出了一种人类-大语言模型协作(HLC)方法,将缺陷预测视为一种适应性过程,而不是静态的分类任务。HLC利用大语言模型的链式推理能力,在反馈循环中进行学习:用户在验证预测的同时验证其解释,这些经过验证的例子通过少量样本学习指导未来的预测。我们通过弱词气味在QuRE基准测试中的1,266个标注梅赛德斯-奔驰需求上评估了这种方法。我们的结果表明,HLC能够有效地适应经过验证的例子的提供,从20个经过验证的例子中就能迅速获得性能提升。将经过验证的解释纳入其中,而不是仅仅标签,使HLC能够显著优于标准的少量样本提示和微调的BERT模型,同时保持高召回率。这些结果突显了大语言模型的上下文学习和链式推理能力如何使适应性分类方法超越了“一刀切”模型,为能够持续从利益相关者反馈中学习的工具创造了机会。

英文摘要:

Automated requirements assessment traditionally relies on universal patterns as proxies for defectiveness, implemented through rule-based heuristics or machine learning classifiers trained on large annotated datasets. However, what constitutes a "defect" is inherently context-dependent and varies across projects, domains, and stakeholder interpretations. In this paper, we propose a Human-LLM Collaboration (HLC) approach that treats defect prediction as an adaptive process rather than a static classification task. HLC leverages LLM Chain-of-Thought reasoning in a feedback loop: users validate predictions alongside their explanations, and these validated examples adaptively guide future predictions through few-shot learning. We evaluate this approach using the weak word smell on the QuRE benchmark of 1,266 annotated Mercedes-Benz requirements. Our results show that HLC effectively adapts to the provision of validated examples, with rapid performance gains from as few as 20 validated examples. Incorporating validated explanations, not just labels, enables HLC to substantially outperform both standard few-shot prompting and fine-tuned BERT models while maintaining high recall. These results highlight how the in-context and Chain-of-Thought learning capabilities of LLMs enable adaptive classification approaches that move beyond one-size-fits-all models, creating opportunities for tools that learn continuously from stakeholder feedback.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑