ChatAssert: LLM-Based Test Oracle Generation With External Tools Assistance

被引:0
|
作者
Hayet, Ishrak [1 ]
Scott, Adam [1 ]
d'Amorim, Marcelo [1 ]
机构
[1] North Carolina State Univ, Raleigh, NC 27695 USA
基金
美国国家科学基金会;
关键词
Chatbots; Codes; Measurement; Prompt engineering; Maintenance engineering; Large language models; Accuracy; Static analysis; Standards; Semantics; Test oracle generation; large language models (LLMs); tool-augmented LLMs; prompt engineering framework;
D O I
10.1109/TSE.2024.3519159
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Test oracle generation is an important and challenging problem. Neural-based solutions have been recently proposed for oracle generation but they are still inaccurate. For example, the accuracy of the state-of-the-art technique teco is only 27.5% on its dataset including 3,540 test cases. We propose ChatAssert, a prompt engineering framework designed for oracle generation that uses dynamic and static information to iteratively refine prompts for querying large language models (LLMs). ChatAssert uses code summaries and examples to assist an LLM in generating candidate test oracles, uses a lightweight static analysis to assist the LLM in repairing generated oracles that fail to compile, and uses dynamic information obtained from test runs to help the LLM in repairing oracles that compile but do not pass. Experimental results using an independent publicly-available dataset show that ChatAssert improves the state-of-the-art technique, teco, on key evaluation metrics. For example, it improves Acc@1 by 15%. Overall, results provide initial yet strong evidence that using external tools in the formulation of prompts is an important aid in LLM-based oracle generation.
引用
收藏
页码:305 / 319
页数:15
相关论文
共 11 条
  • [1] ChatUniTest: A Framework for LLM-Based Test Generation
    Chen, Yinghao
    Hu, Zehao
    Zhi, Chen
    Han, Junxiao
    Deng, Shuiguang
    Yin, Jianwei
    COMPANION PROCEEDINGS OF THE 32ND ACM INTERNATIONAL CONFERENCE ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, FSE COMPANION 2024, 2024, : 572 - 576
  • [2] LLM-Based Guided Generation of Ontology Term Definitions
    Bischof, Stefan
    Filtz, Erwin
    Parreira, Josiane Xavier
    Steyskal, Simon
    SEMANTIC WEB: ESWC 2024 SATELLITE EVENTS, PT I, 2025, 15344 : 133 - 137
  • [3] LLM-based and Retrieval-Augmented Control Code Generation
    Koziolek, Heiko
    Gruener, Sten
    Hark, Rhaban
    Ashiwal, Virendra
    Linsbauer, Sofia
    Eskandani, Nafise
    2024 INTERNATIONAL WORKSHOP ON LARGE LANGUAGE MODELS FOR CODE, LLM4CODE 2024, 2024, : 22 - 29
  • [4] LLM-based Control Code Generation using Image Recognition
    Koziolek, Heiko
    Koziolek, Anne
    2024 INTERNATIONAL WORKSHOP ON LARGE LANGUAGE MODELS FOR CODE, LLM4CODE 2024, 2024, : 38 - 45
  • [5] Boosting LLM-Based Software Generation by Aligning Code with Requirements
    Yaacov, Tom
    Elyasaf, Achiya
    Weiss, Gera
    32ND INTERNATIONAL REQUIREMENTS ENGINEERING CONFERENCE WORKSHOPS, REW 2024, 2024, : 301 - 305
  • [6] LLM-Based Interaction for Content Generation: A Case Study on the Perception of Employees in an IT Department
    Agossah, Alexandre
    Krupa, Frederique
    Perreira Da Silva, Matthieu
    Le Callet, Patrick
    PROCEEDINGS OF THE 2023 ACM INTERNATIONAL CONFERENCE ON INTERACTIVE MEDIA EXPERIENCES, IMX 2023, 2023, : 237 - 241
  • [7] LLM-based code generation and system migration in language-driven engineering
    Daniel Busch
    Alexander Bainczyk
    Steven Smyth
    Bernhard Steffen
    International Journal on Software Tools for Technology Transfer, 2025, 27 (1) : 137 - 147
  • [8] Speak From Heart: An Emotion-Guided LLM-Based Multimodal Method for Emotional Dialogue Generation
    Liu, Chenxiao
    Xie, Zheyong
    Zhao, Sirui
    Zhou, Jin
    Xu, Tong
    Li, Minglei
    Chen, Enhong
    PROCEEDINGS OF THE 4TH ANNUAL ACM INTERNATIONAL CONFERENCE ON MULTIMEDIA RETRIEVAL, ICMR 2024, 2024, : 533 - 542
  • [9] Evaluating LLM-based generative AI tools in emergency triage: A comparative study of ChatGPT Plus, Copilot Pro, and triage nurses
    Arslan, B.
    Nuhoglu, C.
    Satici, M. O.
    Altinbilek, E.
    AMERICAN JOURNAL OF EMERGENCY MEDICINE, 2025, 89 : 174 - 181
  • [10] An Innovative Solution to Design Problems: Applying the Chain-of-Thought Technique to Integrate LLM-Based Agents With Concept Generation Methods
    Ge, Shijun
    Sun, Yuanbo
    Cui, Yin
    Wei, Dapeng
    IEEE ACCESS, 2025, 13 : 10499 - 10512