English

Past as a Guide: Leveraging Retrospective Learning for Python Code Completion

Software Engineering 2023-11-15 v1 Artificial Intelligence Computation and Language

Abstract

This work presents Past as a Guide (PaG), a simple approach for Large Language Models (LLMs) to improve the coding capabilities by integrating the past history with interactive and iterative code refinements. To be specific, inspired by human cognitive processes, the proposed method enables LLMs to utilize previous programming and debugging experiences to enhance the Python code completion tasks. The framework facilitates LLMs to iteratively refine the Python code based on previous execution and debugging results and optimize learning and reasoning capabilities. The proposed methodology achieved a 92\% pass@1 on HumanEval, demonstrating the potential to advance the field by leveraging retrospection from past experiences and interactive and iterative refinement processes without external correctness indicators.

Keywords

Cite

@article{arxiv.2311.07635,
  title  = {Past as a Guide: Leveraging Retrospective Learning for Python Code Completion},
  author = {Seunggyoon Shin and Seunggyu Chang and Sungjoon Choi},
  journal= {arXiv preprint arXiv:2311.07635},
  year   = {2023}
}

Comments

Neurips2023 Workshop

R2 v1 2026-06-28T13:19:49.418Z