SEJul 9

Programmers Are Poor and Overconfident Judges of LLM-Generated Assertions

arXiv:2607.0888512.4h-index: 10
Predicted impact top 30% in SE · last 90 daysOriginality Synthesis-oriented
AI Analysis

For software engineers and AI tool developers, this work reveals a critical limitation in using LLMs for code comprehension and review, showing that programmers are poor judges of generated assertions and that explanations may not help.

This paper investigates how well programmers can judge the correctness of LLM-generated assertions and whether natural-language explanations help. The study found that programmers are overconfident and perform poorly at detecting incorrect assertions (49% accuracy) compared to correct ones (74% accuracy), and that explanations do not improve accuracy and can even impair it.

Code comprehension and code review are already critically important software engineering tasks, and the rising use of AI code generation tools is only increasing that importance. Generative AI has the possibility of supporting these activities, for example by augmenting code with assertions and natural-language explanations describing code behavior. However, little is known about how effective such support may be. We conduct a controlled experiment with 86 Python programmers and a follow-up think-aloud study to examine developers' ability to assess the correctness and completeness of generated assertions of varying quality, and to investigate how natural-language explanations influence these assessments. While programmers can somewhat accurately judge correct assertions (74% accuracy), they perform poorly when shown incorrect assertions (49% accuracy), despite reporting similar levels of confidence in both judgments. This difference in judgment accuracy is statistically significant (p < 0.001): the odds of a developer accurately judging a correct assertion was nearly three times higher than the odds of accurately judging an incorrect assertion (OR = 2.94). Surprisingly, natural-language explanations of assertions provided no overall benefit. Furthermore, low-quality explanations could impair specification assessment accuracy (p = 0.037, OR = 0.58) while simultaneously increasing developer confidence (p = 0.005, 3.99/5 vs. 4.25/5). Our findings suggest that, contrary to common assumptions, AI assistance may not improve the reliability of code comprehension and review. More broadly, our findings highlight the importance of helping developers evaluate machine-generated reliability artifacts, in addition to generating them.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes