arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.00481cs.SEcs.AI
收藏

测试基于大型语言模型的软件所面临的挑战:一种分面分类法

Challenges in Testing Large Language Model Based Software: A Faceted Taxonomy

Mid Sweden University(Mid Sweden大学);Chalmers University of Technology(查尔姆斯理工大学);KAIST(韩国科学技术院)

Felix Dobslaw, Robert Feldt, Juyeon Yoon, Shin Yoo

AI总结:

本文提出面向 LLM 测试用例设计的四分面分类法,通过框架分析、智能体系统敏感性研究和示例对比,指出现有工具缺乏聚合与可变性建模,应以结果分布而非二元属性理解正确性。

摘要:

大型语言模型(LLM)和多智能体 LLM(MALLM)带来了不同于传统软件或机器学习软件的非确定性,因此需要新的正确性验证方法,而不能仅依赖简单的输出比较或测试数据集上的统计准确率。本文提出了一种用于 LLM 测试用例设计的分类法,其依据来自研究文献和我们的经验。文中对每个分面都给出示例,并对六个开源测试框架进行了 LLM 辅助分析,针对一个基于智能体的系统在不同模型配置下开展敏感性研究,还提供了对比原子测试用例与聚合测试用例的可运行示例。我们识别出影响测试正确性的关键变化点,并强调随着 LLM 成为软件系统不可或缺的组成部分,研究界、工业界和开源社区必须应对的开放挑战。该分类法定义了 LLM 测试用例设计的四个分面,在建立最佳实践的同时处理输入和输出中的歧义。它区分了目标、被测系统和输入中的可变性,并引入两种关键 oracle 类型:原子型和聚合型。研究结果表明,当前工具将测试执行视为孤立事件,缺乏显式聚合机制,并且不能充分捕捉跨模型版本、配置和重复运行的可变性。这凸显出有必要将正确性视为结果的分布,而非二元属性,并要求学术界与实践人员更紧密合作,以建立成熟的、具备可变性意识的测试方法。

英文摘要:

Large Language Models (LLMs) and Multi-Agent LLMs (MALLMs) introduce non-determinism unlike traditional or machine learning software, requiring new approaches to verifying correctness beyond simple output comparisons or statistical accuracy over test datasets. This paper presents a taxonomy for LLM test case design, informed by research literature and our experience. Each facet is exemplified, and we conduct an LLM-assisted analysis of six open-source testing frameworks, perform a sensitivity study of an agent-based system across different model configurations, and provide working examples contrasting atomic and aggregated test cases. We identify key variation points that impact test correctness and highlight open challenges that the research, industry, and open-source communities must address as LLMs become integral to software systems. Our taxonomy defines four facets of LLM test case design, addressing ambiguity in both inputs and outputs while establishing best practices. It distinguishes variability in goals, the system under test, and inputs, and introduces two key oracle types: atomic and aggregated. Our findings reveal that current tools treat test executions as isolated events, lack explicit aggregation mechanisms, and inadequately capture variability across model versions, configurations, and repeated runs. This highlights the need for viewing correctness as a distribution of outcomes rather than a binary property, requiring closer collaboration between academia and practitioners to establish mature, variability-aware testing methodologies.

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

↑