

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# 取得拡張生成と微調整の比較
<a name="rag-vs-fine-tuning"></a>

次の表に、ファインチューニングと RAG ベースのアプローチの利点と欠点を示します。


****  

| アプローチ | 利点 | 欠点 | 
| --- | --- | --- | 
| ファインチューニング | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/retrieval-augmented-generation-options/rag-vs-fine-tuning.html) | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/retrieval-augmented-generation-options/rag-vs-fine-tuning.html) | 
| RAG | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/retrieval-augmented-generation-options/rag-vs-fine-tuning.html) | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/retrieval-augmented-generation-options/rag-vs-fine-tuning.html) | 

カスタムドキュメントを参照する質疑応答ソリューションを構築する必要がある場合は、RAG ベースのアプローチから始めることをお勧めします。要約などの追加のタスクを実行するためにモデルが必要な場合は、ファインチューニングを使用します。

ファインチューニングアプローチと RAG アプローチを 1 つのモデルにまとめることができます。この場合、RAG アーキテクチャは変更されませんが、回答を生成する LLM もカスタムドキュメントと微調整されます。これにより、両方の長所が組み合わされ、ユースケースに最適なソリューションになる可能性があります。教師ありファインチューニングと RAG を組み合わせる方法の詳細については、 の[「RAFT: Adapting Language Model to Domain Specific RAG](https://arxiv.org/pdf/2403.10131) research」を参照してくださいUniversity of California, Berkeley。