arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2401.08138cs.SEcs.AI
收藏

面向语义缓存的测试输入生成的大语言模型

LLMs for Test Input Generation for Semantic Caches

Applied Artificial Intelligence Institute, Deakin University(迪肯大学应用人工智能研究所)

Zafaryab Rasool, Scott Barnett, David Willie, Stefanus Kurniawan, Sherwin Balugo, Srikanth Thudumu, Mohamed Abdelrazek

AI总结:

本文提出VaryGen方法,利用大语言模型从非结构化文本生成相似查询以测试语义缓存的有效性,并通过定性分析和开源语义缓存案例研究验证其能揭示缓存失败案例。

摘要:

大语言模型(LLMs)使最先进的语义能力能够被添加到软件系统中,例如非结构化文档的语义搜索和文本生成。然而,这些模型计算成本高昂。在大规模场景下,服务数千用户的成本大幅增加,同时也影响用户体验。为了解决这一问题,语义缓存被用于检查相似查询(可能以不同措辞表达)的答案,而无需访问LLM服务。由于这些语义缓存技术依赖于查询嵌入,存在较高的出错概率,从而影响用户对系统的信心。采用语义缓存技术通常需要测试语义缓存的有效性(准确的缓存命中和未命中),这需要一组带标签的相似查询和响应测试集,而这样的测试集通常不可用。在本文中,我们提出了VaryGen,一种使用LLM进行测试输入生成的方法,该方法从非结构化文本文档中生成相似问题。我们的新方法利用LLM的推理能力来:1)使查询适应领域,2)合成查询的细微变化,以及3)评估合成的测试数据集。我们在一个学生问答系统领域评估了我们的方法,通过对100个生成的查询和结果对进行定性分析,并使用一个开源语义缓存进行了实证案例研究。我们的结果表明,查询对满足人类对相似性的期望,并且我们生成的数据展示了语义缓存的失败案例。此外,我们还在Qasper数据集上评估了我们的方法。这项工作是面向语义应用的测试输入生成的重要第一步,并为实践者在校准语义缓存时提供了考虑因素。

英文摘要:

Large language models (LLMs) enable state-of-the-art semantic capabilities to be added to software systems such as semantic search of unstructured documents and text generation. However, these models are computationally expensive. At scale, the cost of serving thousands of users increases massively affecting also user experience. To address this problem, semantic caches are used to check for answers to similar queries (that may have been phrased differently) without hitting the LLM service. Due to the nature of these semantic cache techniques that rely on query embeddings, there is a high chance of errors impacting user confidence in the system. Adopting semantic cache techniques usually requires testing the effectiveness of a semantic cache (accurate cache hits and misses) which requires a labelled test set of similar queries and responses which is often unavailable. In this paper, we present VaryGen, an approach for using LLMs for test input generation that produces similar questions from unstructured text documents. Our novel approach uses the reasoning capabilities of LLMs to 1) adapt queries to the domain, 2) synthesise subtle variations to queries, and 3) evaluate the synthesised test dataset. We evaluated our approach in the domain of a student question and answer system by qualitatively analysing 100 generated queries and result pairs, and conducting an empirical case study with an open source semantic cache. Our results show that query pairs satisfy human expectations of similarity and our generated data demonstrates failure cases of a semantic cache. Additionally, we also evaluate our approach on Qasper dataset. This work is an important first step into test input generation for semantic applications and presents considerations for practitioners when calibrating a semantic cache.

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

↑