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.
翻译:本文提出“过去即指南”(Past as a Guide, PaG)方法,这是一种通过整合历史经验与交互式迭代精炼过程来提升大型语言模型(LLMs)编程能力的简易方案。具体而言,受人类认知过程的启发,本方法使LLMs能够利用先前的编程与调试经验来增强Python代码补全任务。该框架促使LLMs基于先前执行与调试结果迭代精炼Python代码,从而优化学习与推理能力。所提方法在HumanEval基准测试中实现了92%的pass@1指标,通过利用过往经验的回溯机制及无需外部正确性指示的交互式迭代精炼过程,展现了推动该领域发展的潜力。