『書き込み式Kaggle攻略法』Powered by GPT-4 Code Interpreter

## はじめに
いきなりですが、結論です。
『書き込み式Kaggle攻略法』という、Kaggleに取り組むにあたって、書き込みながらコンペティションの理解を深めていけるチェックリストを作りました。Word形式にしているので、PCはもちろん、印刷して直接書き込むこともできます。

『書き込み式Kaggle攻略法』のWordは、下記からダウンロードできます
- [**『書き込み式Kaggle攻略法』（English）**](https://github.com/Isaka-code/openai-api-hands-on/blob/main/Kaggle_Competition_Checklist.docx)
- [**『書き込み式Kaggle攻略法』（日本語）**](https://github.com/Isaka-code/openai-api-hands-on/blob/main/%E6%9B%B8%E3%81%8D%E8%BE%BC%E3%81%BF%E5%BC%8FKaggle%E6%94%BB%E7%95%A5%E6%B3%95.docx)

**<details><summary>『書き込み式Kaggle攻略法』（English）</summary><div>**



```『書き込み式Kaggle攻略法』（English）
Kaggle Competition Checklist
Competition Overview
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Data Analysis
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Model Development
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Evaluation and Metrics
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Progress Tracking
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Challenges and Insights
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Key Learnings and Takeaways
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Schedule
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Key Metrics
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Related Competitions
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Data Overview
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Data Size and Format
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Submission Format
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Notable Discussions
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Notable Notebooks
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Data Cleaning and Preprocessing
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Feature Engineering
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Model Selection
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Hyperparameter Tuning
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Cross-validation Strategies
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Team Collaboration Strategy
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Resource Allocation
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Risk Assessment
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Backup Plans
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Literature Review
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Technology Stack
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Experiment Logging
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Result Analysis
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
Final Submission Preparation
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................

```

</div></details>


**<details><summary>『書き込み式Kaggle攻略法』（日本語）</summary><div>**



```『書き込み式Kaggle攻略法』（日本語）
Kaggleコンペティションチェックリスト
コンペティション概要
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
データ分析
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
モデル開発
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
評価と指標
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
進捗追跡
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
課題と洞察
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
主要な学びと持ち帰りポイント
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
スケジュール
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
重要な指標
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
関連するコンペティション
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
データ概要
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
データのサイズとフォーマット
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
提出形式
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
注目のディスカッション
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
注目のノートブック
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
データのクリーニングと前処理
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
特徴量エンジニアリング
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
モデル選択
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
ハイパーパラメータチューニング
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
クロスバリデーション戦略
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
チームコラボレーション戦略
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
リソース配分
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
リスク評価
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
バックアッププラン
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
文献レビュー
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
技術スタック
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
実験記録
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
結果分析
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
最終提出物の準備
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
```

</div></details>




## この記事のタイトルに`Powered by GPT-4 Code Interpreter`を入れた理由
この『書き込み式Kaggle攻略法』は、[GPT-4 Code Interpreter](https://chat.openai.com/?model=gpt-4-code-interpreter)によってほぼ生成させました。ChatGPTを用いることでテキスト生成ができることは広く知られていると思いますが、Code Interpreterによって任意のファイル形式で出力できることは、あまり知られていないと思ったので手順を簡単に説明したいと思います。

## Code InterpreterによってWord形式で出力させる手順（『書き込み式Kaggle攻略法』を例に）

### １次依頼

下記のようにやりたいことを箇条書きでまとめます。
出力形式を指定することでダウンロード可能な形で出力させることが可能です。
参考情報があれば添付します。

```入力プロンプト
- 『書き込み式Kaggle攻略法』を作りたいです。
- Kaggleに取り組むにあたって、書き込みながらコンペの理解を深めていくチェックリストを作りたいです。
- フォーマットは添付のような感じでお願いします。
- Word形式でダウンロードしたいです。
```

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/2627015/76d0eb72-98d3-b2e7-96af-c20ebeb2eeed.png)

:::note info
- ハイフン形式の箇条書きなど、マークダウン記法でプロンプトを書くとChatGPTに意図が伝わりやすいです
- 参考情報など例示を行うことで、フォーマットをソフトに指定することができます
:::


### n次依頼（nは2以上の整数）

出力に物足りなさを感じたので、追加の依頼を行ないます。
満足いくクオリティになるまでやり取りを繰り返します。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/2627015/843704f8-2395-fc3d-c8cd-bbac572fbfdf.png)

:::note info
- 一度に全てを実現する`神プロンプト`を書くというよりは、対話を通して徐々に目標に近づいていくイメージです（いわゆる`Few-shot Prompting`です）
:::

## おわりに

この記事を書くにあたって、`Few-shot Prompting`などのプロンプトエンジニアリングの技法をいくつか活用しました。ただ、これらの手法は専門的な表現に見えるかもしれませんが、実は多くの人が無意識のうちに使用していると思います。さらに、ChatGPTがWord形式など、様々なファイル形式で出力できることは、まだあまり知られていないようです。そこで、この点を記事の主題にしました。

また、『書き込み式Kaggle攻略法』は、実際にKaggleのコンペティションで役立つものになると思います。このチェックリストは基本的にはそのままで使える状態ですが、より効果的にするためには、ご自身で細かい調整を加えていただくことをお勧めします。


**関連記事**


https://qiita.com/Isaka-code/items/3935cdb2a0bda331e07c