Paper Reading AI Learner

Large Language Model Guided Self-Debugging Code Generation

2025-02-05 06:43:40
Muntasir Adnan, Zhiwei Xu, Carlos C. N. Kuhn

Abstract

Automated code generation is gaining significant importance in intelligent computer programming and system deployment. However, current approaches often face challenges in computational efficiency and lack robust mechanisms for code parsing and error correction. In this work, we propose a novel framework, PyCapsule, with a simple yet effective two-agent pipeline and efficient self-debugging modules for Python code generation. PyCapsule features sophisticated prompt inference, iterative error handling, and case testing, ensuring high generation stability, safety, and correctness. Empirically, PyCapsule achieves up to 5.7% improvement of success rate on HumanEval, 10.3% on HumanEval-ET, and 24.4% on BigCodeBench compared to the state-of-art methods. We also observe a decrease in normalized success rate given more self-debugging attempts, potentially affected by limited and noisy error feedback in retention. PyCapsule demonstrates broader impacts on advancing lightweight and efficient code generation for artificial intelligence systems.

Abstract (translated)

自动化代码生成在智能计算机编程和系统部署中日益重要。然而,当前的方法常常面临计算效率低下的挑战,并且缺乏强大的代码解析和错误修正机制。为此,我们提出了一种新颖的框架——PyCapsule,该框架采用简单而有效的双代理管道以及高效的自我调试模块来实现Python代码生成。PyCapsule具有复杂的提示推理、迭代错误处理及案例测试功能,确保了生成的高度稳定性、安全性和正确性。 在实践中,与最先进的方法相比,PyCapsule在HumanEval上的成功率提高了5.7%,在HumanEval-ET上提高了10.3%,在BigCodeBench上则大幅提升了24.4%。我们还观察到,在更多的自我调试尝试中,标准化的成功率有所下降,这可能是由于保留过程中有限和噪声的错误反馈导致的影响。 PyCapsule展示了其对促进轻量级且高效的代码生成技术应用于人工智能系统中的广泛影响。

URL

https://arxiv.org/abs/2502.02928

PDF

https://arxiv.org/pdf/2502.02928.pdf


Tags
3D Action Action_Localization Action_Recognition Activity Adversarial Agent Attention Autonomous Bert Boundary_Detection Caption Chat Classification CNN Compressive_Sensing Contour Contrastive_Learning Deep_Learning Denoising Detection Dialog Diffusion Drone Dynamic_Memory_Network Edge_Detection Embedding Embodied Emotion Enhancement Face Face_Detection Face_Recognition Facial_Landmark Few-Shot Gait_Recognition GAN Gaze_Estimation Gesture Gradient_Descent Handwriting Human_Parsing Image_Caption Image_Classification Image_Compression Image_Enhancement Image_Generation Image_Matting Image_Retrieval Inference Inpainting Intelligent_Chip Knowledge Knowledge_Graph Language_Model LLM Matching Medical Memory_Networks Multi_Modal Multi_Task NAS NMT Object_Detection Object_Tracking OCR Ontology Optical_Character Optical_Flow Optimization Person_Re-identification Point_Cloud Portrait_Generation Pose Pose_Estimation Prediction QA Quantitative Quantitative_Finance Quantization Re-identification Recognition Recommendation Reconstruction Regularization Reinforcement_Learning Relation Relation_Extraction Represenation Represenation_Learning Restoration Review RNN Robot Salient Scene_Classification Scene_Generation Scene_Parsing Scene_Text Segmentation Self-Supervised Semantic_Instance_Segmentation Semantic_Segmentation Semi_Global Semi_Supervised Sence_graph Sentiment Sentiment_Classification Sketch SLAM Sparse Speech Speech_Recognition Style_Transfer Summarization Super_Resolution Surveillance Survey Text_Classification Text_Generation Time_Series Tracking Transfer_Learning Transformer Unsupervised Video_Caption Video_Classification Video_Indexing Video_Prediction Video_Retrieval Visual_Relation VQA Weakly_Supervised Zero-Shot