arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2408.00161cs.CLcs.AIcs.ETcs.LG
收藏

利用聚类与提示自动生成自然语言处理行为测试用例

Automatic Generation of Behavioral Test Cases For Natural Language Processing Using Clustering and Prompting

Wells Fargo(富国银行);H2O.ai;UNC Charlotte(北卡罗来纳大学夏洛特分校)

Ying Li, Rahul Singh, Tarun Joshi, Agus Sudjianto

AI总结:

本文提出利用大型语言模型与聚类提示技术自动生成NLP行为测试用例,并在Amazon Reviews上分析四种分类算法的行为测试画像及优劣。

摘要:

近期自然语言处理(NLP)模型行为测试方面的工作,例如Checklist,受到软件工程测试中相关范式的启发。它们能够评估一般语言能力和领域理解,因此有助于评估概念合理性并识别模型弱点。然而,一个主要挑战是测试用例的创建。现有工具包依赖半自动化方法,需要人工开发,这既要求领域专业知识,又可能非常耗时。本文提出一种自动化方法,通过利用大型语言模型和统计技术的能力来开发测试用例。该方法对文本表示进行聚类,以精心构建有意义的组,然后应用提示技术自动生成最小功能测试(MFT)。我们使用著名的Amazon Reviews语料库来演示所提出的方法。我们分析了四种不同分类算法的行为测试画像,并讨论了这些模型的局限性与优势。

英文摘要:

Recent work in behavioral testing for natural language processing (NLP) models, such as Checklist, is inspired by related paradigms in software engineering testing. They allow evaluation of general linguistic capabilities and domain understanding, hence can help evaluate conceptual soundness and identify model weaknesses. However, a major challenge is the creation of test cases. The current packages rely on semi-automated approach using manual development which requires domain expertise and can be time consuming. This paper introduces an automated approach to develop test cases by exploiting the power of large language models and statistical techniques. It clusters the text representations to carefully construct meaningful groups and then apply prompting techniques to automatically generate Minimal Functionality Tests (MFT). The well-known Amazon Reviews corpus is used to demonstrate our approach. We analyze the behavioral test profiles across four different classification algorithms and discuss the limitations and strengths of those models.

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

↑