title: Large Language Model Guided Self-Debugging Code Generation
summary: 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.
paper_authors._id: 67a4213c54bfb820ffb26f4a
paper_authors.name: Muntasir Adnan
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2025-02-06T14:15:07.849Z
paper_authors._id: 65eef9ce7443c09267513796
paper_authors.avatarUrl: /avatars/62547f99130557f54093b2ff4d6c9c24.svg
paper_authors.fullname: Muntasir Adnan
paper_authors.type: user
paper_authors.user: adnaan525
paper_authors._id: 67a4213c54bfb820ffb26f4b
paper_authors.name: Zhiwei Xu
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2025-02-06T16:13:47.448Z
paper_authors._id: 659fa5d10183046e16b6f993
paper_authors.avatarUrl: /avatars/744497ac023d9ebc21e0c297d4f15fca.svg
paper_authors.fullname: Zhiwei Xu
paper_authors.type: user
paper_authors.user: zhiwei555
paper_authors._id: 67a4213c54bfb820ffb26f4c
paper_authors.name: Carlos C. N. Kuhn
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2025-02-06T16:13:58.336Z
paper_authors._id: 6510df53469c325dc4dc69a5
paper_authors.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/no-auth/NBydVZ-3cc8ORQpQeQCf_.png
paper_authors.fullname: Carlos Kuhn
paper_authors.type: user
paper_authors.user: CarlosKuhn
paper_title: Large Language Model Guided Self-Debugging Code Generation
paper_summary: 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.