[論文レビュー] ChatGPT Prompt Patterns for Improving Code Quality, Refactoring, Requirements Elicitation, and Software Design
この論文は、ChatGPTを用いたソフトウェア工学タスク向けのプロンプトパターンのカタログを提案し、要件 elicitation、システム設計、コード品質、リファクタリングの向上、およびパターンが組み合わさって効果的なLLM支援開発になる方法を詳述する。
This paper presents prompt design techniques for software engineering, in the form of patterns, to solve common problems when using large language models (LLMs), such as ChatGPT to automate common software engineering activities, such as ensuring code is decoupled from third-party libraries and simulating a web application API before it is implemented. This paper provides two contributions to research on using LLMs for software engineering. First, it provides a catalog of patterns for software engineering that classifies patterns according to the types of problems they solve. Second, it explores several prompt patterns that have been applied to improve requirements elicitation, rapid prototyping, code quality, refactoring, and system design.
研究の動機と目的
- LLMのようなChatGPTを用いたソフトウェア工学タスクの再利用可能なプロンプトパターンのカタログを紹介する。
- パターンを問題タイプで分類し、ソフトウェアライフサイクル全体での実践的な利用を guiding する。
- パターンが組み合わさる(パターンの化合物)ことで、獲得、設計、コード品質、テストを強化できることを実証する。
提案手法
- プロンプトパターンの正式な構造を定義する(名前、分類、意図、動機、構造、実装、結果)。
- カテゴリ(Requirements Elicitation、System Design and Simulation、Code Quality、Refactoring)に整理された13パターンのカタログを提供する。
- 具体的なプロンプトパターンの実装を記述する(例:Requirements Simulator、Specification Disambiguation、API Generator、API Simulator、Few-shot Code Example Generation、DSL Creation)。
- パターンが相互作用し、トークン制限や反復設計に対処するためにどのように組み合わせられるかを示す。
- ChatGPTを用いて適用性を検証した例に基づいてパターンを実証する。
実験結果
リサーチクエスチョン
- RQ1LLMsを用いてシステム要件の効果的な獲得と仕様化を可能にするプロンプトパターンは何か?
- RQ2プロンプトパターンは、探索的なシステム設計、API設計、ソフトウェア挙動のシミュレーションをLLMsで支援することができるのか?
- RQ3LLMsを使用する際にコード品質とリファクタリングを改善する技術は何か、そしてそれらをより良い結果のためにどのように組み合わせられるのか?
主な発見
- 13のプロンプトパターンのカタログが提案され、LLMsを用いたソフトウェア工学の4つのタスク領域に分類される。
- パターンは要件獲得、システム設計、API生成/シミュレーション、コード品質、リファクタリングを支援する。
- パターンはコンパウンド(複合体)に組み合わせて設計課題とトークン制限の問題に対処できる。
- API GeneratorとAPI Simulatorパターンは、初期のAPI設計探索とインタラクティブなテストを可能にする。
- Requirements SimulatorとVisualization Generatorは、視覚化を用いた探索を通じて要件の忠実度を高める。
- プロンプトパターンは、仕様の曖昧さを減らす自動的な仲介推論(例:Specification Disambiguation)として機能し得る。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。