Debug like a Human: A Large Language Model Debugger via Verifying Runtime Execution Step by Step

被引:0
|
作者
Zhong, Li [1 ]
Wang, Zilong [1 ]
Shang, Jingbo [1 ]
机构
[1] Univ Calif San Diego, San Diego, CA 92103 USA
关键词
D O I
暂无
中图分类号
学科分类号
摘要
Large language models (LLMs) are leading significant progress in code generation. Beyond one-pass code generation, recent works further integrate unit tests and program verifiers into LLMs to iteratively refine the generated programs. However, these works consider the generated program as an indivisible entity, which falls short for LLMs in debugging the programs, especially when the programs contain complex logic flows and data operations. In contrast, when human developers debug programs, they typically set breakpoints and selectively examine runtime execution information. The execution flow and the intermediate variables play a crucial role in the debugging process, yet they are underutilized in the existing literature on code generation. In this study, we introduce Large Language Model Debugger (LDB), a novel debugging framework that enables LLMs to refine their generated programs with the runtime execution information. Specifically, LDB segments programs into basic blocks and tracks the values of intermediate variables after each block throughout runtime execution. This allows LLMs to concentrate on simpler code units within the overall execution flow, verify their correctness against the task description block by block, and effectively pinpoint any potential errors. Experiments demonstrate that LDB consistently enhances the baseline performance by up to 9.8% across the HumanEval, MBPP, and TransCoder benchmarks, archiving new state-of-the-art performance in code debugging for various LLM selections.
引用
收藏
页码:851 / 870
页数:20
相关论文
共 11 条
  • [1] Emotion Recognition in Conversation with Multi-step Prompting Using Large Language Model
    Hama, Kenta
    Otsuka, Atsushi
    Ishii, Ryo
    SOCIAL COMPUTING AND SOCIAL MEDIA, PT I, SCSM 2024, 2024, 14703 : 338 - 346
  • [2] LocLLM: Exploiting Generalizable Human Keypoint Localization via Large Language Model
    Wang, Dongkai
    Xuan, Shiyu
    Zhang, Shiliang
    2024 IEEE/CVF CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION, CVPR 2024, 2024, : 614 - 623
  • [3] Excitable Madden-Julian Oscillation like behaviour of a simple model of equatorial moist dynamics results from a time step that is too large
    Davison, Matthew
    Haynes, Peter
    QUARTERLY JOURNAL OF THE ROYAL METEOROLOGICAL SOCIETY, 2022, 148 (743) : 770 - 777
  • [4] Nadine: A large language model-driven intelligent social robot with affective capabilities and human-like memory
    Kang, Hangyeol
    Ben Moussa, Maher
    Thalmann, Nadia Magnenat
    COMPUTER ANIMATION AND VIRTUAL WORLDS, 2024, 35 (04)
  • [5] GexMolGen: cross-modal generation of hit-like molecules via large language model encoding of gene expression signatures
    Cheng, Jiabei
    Pan, Xiaoyong
    Fang, Yi
    Yang, Kaiyuan
    Xue, Yiming
    Yan, Qingran
    Yuan, Ye
    BRIEFINGS IN BIOINFORMATICS, 2024, 25 (06)
  • [6] A Step Towards Generating Human-Like Walking Gait via Trajectory Optimization through Contact for a Bipedal Robot with One-Sided Springs on Toes
    Chao, Kenneth
    Hur, Pilwon
    2017 IEEE/RSJ INTERNATIONAL CONFERENCE ON INTELLIGENT ROBOTS AND SYSTEMS (IROS), 2017, : 4848 - 4853
  • [7] Long term functionality and growth of tissue-engineered living, autologous vascular grafts in a large animal model: the final step towards human application?
    Emmert, M. Y.
    Weber, B.
    Schmidt, D.
    Kelm, J.
    Jenni, R.
    Frauenfelder, T.
    Leschka, S.
    Falk, V.
    Zund, G.
    Hoerstrup, S. P.
    EUROPEAN HEART JOURNAL, 2010, 31 : 80 - 80
  • [8] Assessing the placental transfer of dexamethasone via ex vivo human placenta perfusions: a step-up towards model informed-drug dosing in pregnancy
    van Hove, H.
    van der Heijden, J. E. M.
    van den Broek, P.
    van Elst, N.
    van Drongelen, J.
    Colbers, A.
    de Wildt, S. N.
    Greupink, R.
    TOXICOLOGY LETTERS, 2022, 368 : S197 - S198
  • [9] NVP-HRI: Zero shot natural voice and posture-based human-robot interaction via large language model
    Lai, Yuzhi
    Yuan, Shenghai
    Nassar, Youssef
    Fan, Mingyu
    Weber, Thomas
    Raetsch, Matthias
    EXPERT SYSTEMS WITH APPLICATIONS, 2025, 268
  • [10] Two-step method fabricating a 3D nerve cell model with brain-like mechanical properties and tunable porosity vascular structures via coaxial printing
    Wang, Zhichao
    Huang, Chuanzhen
    Liu, Hanlian
    Shi, Zhenyu
    Han, Xu
    Li, Shuying
    Huang, Jun
    Wang, Zhen
    Yan, Yonggan
    Chen, Zhuang
    COLLOIDS AND SURFACES B-BIOINTERFACES, 2023, 224