INTERVENOR: Prompting the Coding Ability of Large Language Models with the Interactive Chain of Repair

要約

この文書では、コード診断とコード修復の両方を含む、人間で観察される対話型コード修復プロセスをエミュレートするように設計されたシステムである INTERVENOR (INTERactiVE Chain Of Repair) を紹介します。
INTERVENOR は、大規模言語モデル (LLM) に、コード修復プロセス中に異なる役割を果たすよう促し、コード学習者とコード教師の両方として機能します。
具体的には、コード学習者はコードを生成または修復するための指示に従うという任務を負い、コード教師はコード学習者へのガイダンスとして機能する修復チェーン (CoR) を作成する責任を負います。
CoR の生成中に、コード学習者はコード学習者から生成されたコードをチェックし、コンパイラーから受け取ったエラー フィードバックに基づいてコードのバグに対処する方法を再評価する必要があります。
実験結果は、INTERVENOR がベースライン モデルを上回っており、コード生成タスクとコード変換タスクにおいて GPT-3.5 と比較してそれぞれ約 18% と 4.3% の改善を示していることを示しています。
さらなる分析により、CoR はバグの背後にある理由を解明し、自然言語で解決策の概要を説明するのに効果的であることがわかりました。
コード コンパイラのフィードバックにより、INTERVENOR は構文エラーとアサーション エラーを正確に特定し、コードを修復するための正確な指示を提供できます。
すべてのデータとコードは https://github.com/NEUIR/INTERVENOR で入手できます。

要約(オリジナル)

This paper introduces INTERVENOR (INTERactiVE chaiN Of Repair), a system designed to emulate the interactive code repair processes observed in humans, encompassing both code diagnosis and code repair. INTERVENOR prompts Large Language Models (LLMs) to play distinct roles during the code repair process, functioning as both a Code Learner and a Code Teacher. Specifically, the Code Learner is tasked with adhering to instructions to generate or repair code, while the Code Teacher is responsible for crafting a Chain-of-Repair (CoR) to serve as guidance for the Code Learner. During generating the CoR, the Code Learner needs to check the generated codes from Code Learner and reassess how to address code bugs based on error feedback received from compilers. Experimental results demonstrate that INTERVENOR surpasses baseline models, exhibiting improvements of approximately 18% and 4.3% over GPT-3.5 in code generation and code translation tasks, respectively. Our further analyses show that CoR is effective to illuminate the reasons behind bugs and outline solution plans in natural language. With the feedback of code compilers, INTERVENOR can accurately identify syntax errors and assertion errors and provide precise instructions to repair codes. All data and codes are available at https://github.com/NEUIR/INTERVENOR

arxiv情報

著者 Hanbin Wang,Zhenghao Liu,Shuo Wang,Ganqu Cui,Ning Ding,Zhiyuan Liu,Ge Yu
発行日 2024-02-20 16:26:30+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.SE パーマリンク