MORTAR: Multi-turn Metamorphic Testing for LLM-based Dialogue Systems

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Guo, Guoxiang, Aleti, Aldeida, Neelofar, Neelofar, Tantithamthavorn, Chakkrit, Qi, Yuanyuan, Chen, Tsong Yueh
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913906135400448
author Guo, Guoxiang
Aleti, Aldeida
Neelofar, Neelofar
Tantithamthavorn, Chakkrit
Qi, Yuanyuan
Chen, Tsong Yueh
author_facet Guo, Guoxiang
Aleti, Aldeida
Neelofar, Neelofar
Tantithamthavorn, Chakkrit
Qi, Yuanyuan
Chen, Tsong Yueh
contents With the widespread application of LLM-based dialogue systems in daily life, quality assurance has become more important than ever. Recent research has successfully introduced methods to identify unexpected behaviour in single-turn testing scenarios. However, multi-turn interaction is the common real-world usage of dialogue systems, yet testing methods for such interactions remain underexplored. This is largely due to the oracle problem in multi-turn testing, which continues to pose a significant challenge for dialogue system developers and researchers. In this paper, we propose MORTAR, a metamorphic multi-turn dialogue testing approach, which mitigates the test oracle problem in testing LLM-based dialogue systems. MORTAR formalises the multi-turn testing for dialogue systems, and automates the generation of question-answer dialogue test cases with multiple dialogue-level perturbations and metamorphic relations (MRs). The automated MR matching mechanism allows MORTAR more flexibility and efficiency in metamorphic testing. The proposed approach is fully automated without reliance on LLM judges. In testing six popular LLM-based dialogue systems, MORTAR reaches significantly better effectiveness with over 150\% more bugs revealed per test case when compared to the single-turn metamorphic testing baseline. Regarding the quality of bugs, MORTAR reveals higher-quality bugs in terms of diversity, precision and uniqueness. MORTAR is expected to inspire more multi-turn testing approaches, and assist developers in evaluating the dialogue system performance more comprehensively with constrained test resources and budget.
format Preprint
id arxiv_https___arxiv_org_abs_2412_15557
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle MORTAR: Multi-turn Metamorphic Testing for LLM-based Dialogue Systems
Guo, Guoxiang
Aleti, Aldeida
Neelofar, Neelofar
Tantithamthavorn, Chakkrit
Qi, Yuanyuan
Chen, Tsong Yueh
Software Engineering
Computation and Language
With the widespread application of LLM-based dialogue systems in daily life, quality assurance has become more important than ever. Recent research has successfully introduced methods to identify unexpected behaviour in single-turn testing scenarios. However, multi-turn interaction is the common real-world usage of dialogue systems, yet testing methods for such interactions remain underexplored. This is largely due to the oracle problem in multi-turn testing, which continues to pose a significant challenge for dialogue system developers and researchers. In this paper, we propose MORTAR, a metamorphic multi-turn dialogue testing approach, which mitigates the test oracle problem in testing LLM-based dialogue systems. MORTAR formalises the multi-turn testing for dialogue systems, and automates the generation of question-answer dialogue test cases with multiple dialogue-level perturbations and metamorphic relations (MRs). The automated MR matching mechanism allows MORTAR more flexibility and efficiency in metamorphic testing. The proposed approach is fully automated without reliance on LLM judges. In testing six popular LLM-based dialogue systems, MORTAR reaches significantly better effectiveness with over 150\% more bugs revealed per test case when compared to the single-turn metamorphic testing baseline. Regarding the quality of bugs, MORTAR reveals higher-quality bugs in terms of diversity, precision and uniqueness. MORTAR is expected to inspire more multi-turn testing approaches, and assist developers in evaluating the dialogue system performance more comprehensively with constrained test resources and budget.
title MORTAR: Multi-turn Metamorphic Testing for LLM-based Dialogue Systems
topic Software Engineering
Computation and Language
url https://arxiv.org/abs/2412.15557