Can LLMs Replace Manual Annotation of Software Engineering Artifacts?

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Ahmed, Toufique, Devanbu, Premkumar, Treude, Christoph, Pradel, Michael
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916597718843392
author Ahmed, Toufique
Devanbu, Premkumar
Treude, Christoph
Pradel, Michael
author_facet Ahmed, Toufique
Devanbu, Premkumar
Treude, Christoph
Pradel, Michael
contents Experimental evaluations of software engineering innovations, e.g., tools and processes, often include human-subject studies as a component of a multi-pronged strategy to obtain greater generalizability of the findings. However, human-subject studies in our field are challenging, due to the cost and difficulty of finding and employing suitable subjects, ideally, professional programmers with varying degrees of experience. Meanwhile, large language models (LLMs) have recently started to demonstrate human-level performance in several areas. This paper explores the possibility of substituting costly human subjects with much cheaper LLM queries in evaluations of code and code-related artifacts. We study this idea by applying six state-of-the-art LLMs to ten annotation tasks from five datasets created by prior work, such as judging the accuracy of a natural language summary of a method or deciding whether a code change fixes a static analysis warning. Our results show that replacing some human annotation effort with LLMs can produce inter-rater agreements equal or close to human-rater agreement. To help decide when and how to use LLMs in human-subject studies, we propose model-model agreement as a predictor of whether a given task is suitable for LLMs at all, and model confidence as a means to select specific samples where LLMs can safely replace human annotators. Overall, our work is the first step toward mixed human-LLM evaluations in software engineering.
format Preprint
id arxiv_https___arxiv_org_abs_2408_05534
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Can LLMs Replace Manual Annotation of Software Engineering Artifacts?
Ahmed, Toufique
Devanbu, Premkumar
Treude, Christoph
Pradel, Michael
Software Engineering
Human-Computer Interaction
Machine Learning
Experimental evaluations of software engineering innovations, e.g., tools and processes, often include human-subject studies as a component of a multi-pronged strategy to obtain greater generalizability of the findings. However, human-subject studies in our field are challenging, due to the cost and difficulty of finding and employing suitable subjects, ideally, professional programmers with varying degrees of experience. Meanwhile, large language models (LLMs) have recently started to demonstrate human-level performance in several areas. This paper explores the possibility of substituting costly human subjects with much cheaper LLM queries in evaluations of code and code-related artifacts. We study this idea by applying six state-of-the-art LLMs to ten annotation tasks from five datasets created by prior work, such as judging the accuracy of a natural language summary of a method or deciding whether a code change fixes a static analysis warning. Our results show that replacing some human annotation effort with LLMs can produce inter-rater agreements equal or close to human-rater agreement. To help decide when and how to use LLMs in human-subject studies, we propose model-model agreement as a predictor of whether a given task is suitable for LLMs at all, and model confidence as a means to select specific samples where LLMs can safely replace human annotators. Overall, our work is the first step toward mixed human-LLM evaluations in software engineering.
title Can LLMs Replace Manual Annotation of Software Engineering Artifacts?
topic Software Engineering
Human-Computer Interaction
Machine Learning
url https://arxiv.org/abs/2408.05534