大規模言語モデルによる自己デバッグコード生成
Large Language Model Guided Self-Debugging Code Generation
February 5, 2025
著者: Muntasir Adnan, Zhiwei Xu, Carlos C. N. Kuhn
cs.AI
要旨
自動コード生成は、知的コンピュータプログラミングとシステム展開において重要性を増しています。しかしながら、現行のアプローチは、計算効率の課題やコードの解析およびエラー修正のための堅牢なメカニズムの不足に直面しています。本研究では、Pythonコード生成のための効率的な自己デバッグモジュールと、シンプルかつ効果的な2つのエージェントパイプラインを備えた新しいフレームワークであるPyCapsuleを提案しています。PyCapsuleは洗練されたプロンプト推論、反復的なエラーハンドリング、およびケーステストを特徴とし、高い生成安定性、安全性、および正確性を確保します。経験的には、PyCapsuleは、HumanEvalにおいて成功率が最大5.7%、HumanEval-ETにおいて10.3%、BigCodeBenchにおいて24.4%向上し、最先端の手法と比較して正確性が向上しています。また、自己デバッグの試行回数が増えると正規化された成功率が低下する傾向が見られ、これは保持されたエラーフィードバックが限られておりノイズがあることに影響を受ける可能性があります。PyCapsuleは、人工知能システムのための軽量かつ効率的なコード生成の推進に広範な影響を示しています。
English
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.Summary
AI-Generated Summary