ChatDBG: An AI-Powered Debugging Assistant

要約

デバッグはプログラマにとって重要ですが、やりがいのある作業です。
このペーパーでは、AI を活用したデバッグ アシスタントである ChatDBG を提案します。
ChatDBG は大規模言語モデル (LLM) を統合し、従来のデバッガーの機能と使いやすさを大幅に強化します。
ChatDBG を使用すると、プログラマはデバッガと共同対話を行うことができ、プログラムの状態に関する複雑な質問をしたり、クラッシュやアサーションの失敗の根本原因分析を実行したり、「なぜ x は null ですか?」などのオープンエンドのクエリを調査したりすることができます。
これらのクエリを処理するために、ChatDBG は LLM に「ハンドルを握る」自律性を与えます。LLM は、デバッガをクエリおよび制御してスタックを移動し、プログラムの状態を検査できる独立したエージェントとして機能します。
次に、その結​​果を報告し、制御をプログラマに戻します。
ChatDBG プロトタイプは、ネイティブ コード用の LLDB と GDB、Python 用の Pdb などの標準デバッガと統合されています。
既知のバグを含む C/C++ コードや、スタンドアロン スクリプトや Jupyter ノートブックを含む Python コード スイートなど、さまざまなコード セットにわたる評価では、ChatDBG が根本原因を適切に分析し、バグを説明し、幅広い範囲に対して正確な修正を生成できることが実証されました。
現実世界のエラー。
Python プログラムの場合、1 つのクエリで 67% の確率で実用的なバグ修正につながりました。
フォローアップ クエリを 1 つ追加すると、成功率が 85% に増加しました。
ChatDBG は急速に普及しています。
すでに約 50,000 回ダウンロードされています。

要約(オリジナル)

Debugging is a critical but challenging task for programmers. This paper proposes ChatDBG, an AI-powered debugging assistant. ChatDBG integrates large language models (LLMs) to significantly enhance the capabilities and user-friendliness of conventional debuggers. ChatDBG lets programmers engage in a collaborative dialogue with the debugger, allowing them to pose complex questions about program state, perform root cause analysis for crashes or assertion failures, and explore open-ended queries like `why is x null?’. To handle these queries, ChatDBG grants the LLM autonomy to ‘take the wheel’: it can act as an independent agent capable of querying and controlling the debugger to navigate through stacks and inspect program state. It then reports its findings and yields back control to the programmer. Our ChatDBG prototype integrates with standard debuggers including LLDB and GDB for native code and Pdb for Python. Our evaluation across a diverse set of code, including C/C++ code with known bugs and a suite of Python code including standalone scripts and Jupyter notebooks, demonstrates that ChatDBG can successfully analyze root causes, explain bugs, and generate accurate fixes for a wide range of real-world errors. For the Python programs, a single query led to an actionable bug fix 67% of the time; one additional follow-up query increased the success rate to 85%. ChatDBG has seen rapid uptake; it has already been downloaded roughly 50,000 times.

arxiv情報

著者 Kyla Levin,Nicolas van Kempen,Emery D. Berger,Stephen N. Freund
発行日 2024-09-24 15:07:24+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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