Page 64 - 《软件学报》2026年第2期
P. 64

软件学报 ISSN 1000-9825, CODEN RUXUEW                                        E-mail: jos@iscas.ac.cn
                 2026,37(2):543−562 [doi: 10.13328/j.cnki.jos.007421] [CSTR: 32375.14.jos.007421]  http://www.jos.org.cn
                 ©中国科学院软件研究所版权所有.                                                          Tel: +86-10-62562563



                                                   *
                 智能问答系统逻辑推理测试

                 沈庆超,    李行健,    姜佳君,    陈俊洁,    齐一先,    王    赞


                 (天津大学 智能与计算学部, 天津 300350)
                 通信作者: 姜佳君, E-mail: jiangjiajun@tju.edu.cn

                 摘 要: 智能问答系统利用信息检索和自然语言处理技术, 实现对问题的自动化回复. 然而, 与其他人工智能软件
                 相似, 智能问答系统同样存在缺陷. 存在缺陷的智能问答系统会降低用户体验, 造成企业的经济损失, 甚至引发社
                 会层面的恐慌. 因此, 及时检测并修复智能问答系统中的缺陷至关重要. 目前, 智能问答系统自动测试方法主要分
                 为两类. 其一, 基于问题与预测答案合成假定事实, 并基于假定事实生成新问题和预期答案, 以此揭示问答系统中
                 的缺陷. 其二, 从现有数据集中提取不影响原问题答案的知识片段并融入原始测试输入中生成答案一致的新测试
                 输入, 实现对问答系统的缺陷检测任务. 然而, 这两类方法均着重于测试模型的语义理解能力, 未能充分测试模型
                 的逻辑推理能力. 此外, 这两类方法分别依赖于问答系统的回答范式和模型自带的数据集来生成新的测试用例, 限
                 制了其在基于大规模语言模型的问答系统中的测试效能. 针对上述挑战, 提出一种逻辑引导的蜕变测试技术
                 QALT. QALT  设计了  3  种逻辑相关的蜕变关系, 并使用了语义相似度度量和依存句法分析等技术指导生成高质量
                 的测试用例, 实现对智能问答系统的精准测试. 实验结果表明, QALT                   在两类智能问答系统上一共检测            9 247  个缺
                 陷, 分别比当前两种最先进的技术           (即  QAQA  和  QAAskeR) 多检测  3 150  和  3 897  个缺陷. 基于人工采样标注结果
                 的统计分析, QALT      在两个智能问答系统上检测到真阳性缺陷的期望数量总和为                         8  073, 预期比  QAQA  和
                 QAAskeR  分别多检测   2 142  和  4 867  个真阳性缺陷. 此外, 使用  QALT  生成的测试输入通过模型微调对被测软件中
                 的缺陷进行修复. 微调后模型的错误率成功地从 22.33% 降至               14.37%.
                 关键词: 智能问答系统; 测试用例生成; 蜕变测试; 大型语言模型
                 中图法分类号: TP311

                 中文引用格式: 沈庆超, 李行健, 姜佳君, 陈俊洁, 齐一先, 王赞. 智能问答系统逻辑推理测试. 软件学报, 2026, 37(2): 543–562. http://
                 www.jos.org.cn/1000-9825/7421.htm
                 英文引用格式: Shen QC, Li XJ, Jiang JJ, Chen JJ, Qi YX, Wang Z. Logical Reasoning Testing of Intelligent Question Answering
                 System. Ruan Jian Xue Bao/Journal of Software, 2026, 37(2): 543–562 (in Chinese). http://www.jos.org.cn/1000-9825/7421.htm

                 Logical Reasoning Testing of Intelligent Question Answering System
                 SHEN Qing-Chao, LI Xing-Jian, JIANG Jia-Jun, CHEN Jun-Jie, QI Yi-Xian, WANG Zan
                 (College of Intelligence and Computing, Tianjin University, Tianjin 300350, China)
                 Abstract:  Intelligent  question  answering  (QA)  system  utilizes  information  retrieval  and  natural  language  processing  techniques  to  deliver
                 automated  responses  to  user  inquiries.  Like  other  artificial  intelligence  software,  intelligent  QA  system  is  prone  to  bugs.  These  bugs  can
                 degrade user experience, cause financial losses, or even trigger social panic. Therefore, it is crucial to detect and fix bugs in intelligent QA
                 system  promptly.  Automated  testing  approaches  fall  into  two  categories.  The  first  approach  synthesizes  hypothetical  facts  based  on
                 questions  and  predicted  answers,  then  generates  new  questions  and  expected  answers  to  detect  bugs.  The  second  approach  generates
                 semantically  equivalent  test  inputs  by  injecting  knowledge  from  existing  datasets,  ensuring  the  answer  to  the  question  remains  unchanged.


                 *    基金项目: 国家自然科学基金  (62202324, 62322208, 62472310)
                  沈庆超、李行健有相同贡献.
                  收稿时间: 2024-01-30; 修改时间: 2024-06-30, 2025-02-20; 采用时间: 2025-03-06; jos 在线出版时间: 2025-07-23
                  CNKI 网络首发时间: 2025-07-23
   59   60   61   62   63   64   65   66   67   68   69