arrow
返回

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

delete2025-01-01
delete0
PRE
AI
I
Ishrak Hayet *
A
Adam Scott
M
Marcelo d’Amorim
DOI:10.1109/TSE.2024.3519159delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
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.
Keyword:
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

期刊

IEEE Transactions on Software Engineering 封面图
IEEE Transactions on Software Engineering
IF:
5.6
论文数:
2.8K
被引数:
1.1W

机构

N
North Carolina State University
学者数:
2.6W
论文数: 2.3W
被引数: 3.7W
引用论文

引用论文

err分享
err收藏
Caveolin-1 and -2 regulate cell motility in castration-resistant prostate cancer
err2018-10-01
err0
errOAAI
errToyoharu Kamibeppu; Koji Yamasaki; Kozue Nakahara; Takahiro Nagai; Naoki Terada; Hiromasa Tsukino; Shoichiro Mukai; Toshiyuki Kamoto
err分享
err收藏
A Research Agenda for Smarter Cyber-Physical Systems更智能的赛博物理系统研究议程
err2022-05-30
err0
errOAAI
errDanny Weyns; Jesper Andersson; Mauro Caporuscio; Francesco Flammini; Andreas Kerren; Welf Löwe
err分享
err收藏
SequenceR: Sequence-to-Sequence Learning for End-to-End Program RepairSequenceR: 用于端到端程序修复的序列到序列学习
err2021-01-01
err217
errOAAI
errChen, Zimin; Kommrusch, Steve; Tufano, Michele; Pouchet, Louis-Noel; Poshyvanyk, Denys; Monperrus, Martin
err分享
err收藏
ATG24 Represses Autophagy and Differentiation and Is Essential for Homeostasy of the Flagellar Pocket in Trypanosoma brucei
err2015-06-19
err0
errOAAI
errAna Brennand; Eva Rico; Daniel J. Rigden; Patrick Van Der Smissen; Pierre J. Courtoy; Paul A. M. Michels
err分享
err收藏
err分享
err收藏
学者 查看更多内容