Creating Thorough Tests for AI-Generated Code is Hard

被引:0
|
作者
Singhal, Shreya [1 ]
Kumar, Viraj [2 ]
机构
[1] Indian Inst Technol Madras, Chennai, Tamil Nadu, India
[2] Indian Inst Sci, Bangalore, Karnataka, India
关键词
D O I
10.1145/3627217.3627238
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Before implementing a function, programmers are encouraged to write a suite of test cases that specify its intended behaviour on several inputs. A suite of tests is thorough if any buggy implementation fails at least one of these tests. We posit that as the proportion of code generated by Large Language Models (LLMs) grows, so must the ability of students to create test suites that are thorough enough to detect subtle bugs in such code. Our paper makes two contributions. First, we demonstrate how difficult it can be to create thorough tests for LLM-generated code by evaluating 27 test suites from a public dataset (EvalPlus). Second, by identifying deficiencies in these test suites, we propose strategies for improving the ability of students to develop thorough test suites for LLM-generated code.
引用
收藏
页码:108 / 111
页数:4
相关论文
共 50 条
  • [31] Avoid patenting AI-generated inventions
    Daniel Gervais
    Nature, 2023, 622 : 31 - 31
  • [32] Double-Edged Sword of LLMs: Mitigating Security Risks of AI-Generated Code
    Bharadwaj, Ramesh
    Parker, Ilya
    DISRUPTIVE TECHNOLOGIES IN INFORMATION SCIENCES VII, 2023, 12542
  • [33] Computational Power and Subjective Quality of AI-Generated Outputs: The Case of Aesthetic Judgement and Positive Emotions in AI-Generated Art
    Grassini, Simone
    INTERNATIONAL JOURNAL OF HUMAN-COMPUTER INTERACTION, 2024,
  • [34] AI vs. AI: Can AI Detect AI-Generated Images?
    Baraheem, Samah S.
    Nguyen, Tam V.
    JOURNAL OF IMAGING, 2023, 9 (10)
  • [35] How secure is AI-generated code: a large-scale comparison of large language models
    Tihanyi, Norbert
    Bisztray, Tamas
    Ferrag, Mohamed Amine
    Jain, Ridhi
    Cordeiro, Lucas C.
    EMPIRICAL SOFTWARE ENGINEERING, 2025, 30 (02)
  • [36] AI Usage Cards: Responsibly Reporting AI-generated Content
    Wahle, Jan Philip
    Ruas, Terry
    Mohammad, Saif M.
    Meuschke, Norman
    Gipp, Bela
    2023 ACM/IEEE JOINT CONFERENCE ON DIGITAL LIBRARIES, JCDL, 2023, : 282 - 284
  • [37] Assessing the laboratory performance of AI-generated enzymes
    Zelezniak, Aleksej
    Yang, Kevin K.
    Johnson, Sean
    NATURE BIOTECHNOLOGY, 2024, 43 (3) : 308 - 309
  • [38] ChatGPT, AI-generated content, and engineering management
    Zuge Yu
    Yeming Gong
    Frontiers of Engineering Management, 2024, 11 : 159 - 166
  • [39] Astronomers explore uses for AI-generated images
    Castelvecchi, Davide
    NATURE, 2017, 542 (7639) : 16 - 17
  • [40] Presentation matters for AI-generated clinical advice
    Marzyeh Ghassemi
    Nature Human Behaviour, 2023, 7 : 1833 - 1835