View a markdown version of this page

Amazon Nova 2 での SFT のデータの準備 - Amazon Nova

Amazon Nova 2 での SFT のデータの準備

Amazon Nova 2 の SFT は、推論サポートの有無にかかわらず、テキスト、画像、動画、ドキュメントの理解およびツール呼び出しをサポートしています。このページでは、Amazon Nova 2 理解モデルの SFT トレーニングデータを準備するための制約、サポートされている機能、およびベストプラクティスについて説明します。

ヒント

トレーニングジョブを開始する前にデータセット形式を検証するには、検証ツール を参照してください。

データ形式

Amazon Nova 2 SFT データは、Amazon Nova 1 と同じ Converse API 形式を使用し、オプションの 推論コンテンツ フィールドが追加されています。

JSONL トレーニングファイルの各行は、次の最上位フィールドを持つ JSON オブジェクトです。詳細については、各セクションを展開してください。

必須。messages フィールドはメッセージオブジェクトの配列であり、それぞれが会話のターンを定義します。メッセージオブジェクトには、以下のフィールドが含まれています。

  • role – 必須。メッセージの送信元が user (モデルに送信されたプロンプト) か assistant (モデルレスポンス) かを定義します。最初のターンは user で、最後のターンは assistant で、ターンは交互にする必要があります。

  • content – 必須。このターンのコンテンツブロックの配列。

content フィールドはコンテンツブロッの配列にマッピングされます。Amazon Nova 2 SFT データは、次のブロックをサポートしています。

text

テキストコンテンツを指定する文字列。user と assistant の両方のターンでサポートされています。

以下は、text コンテンツブロックのみを含む content 配列を持つ Message オブジェクトの例を示しています。

{ "role": "user", "content": [ { "text": "string" } ] }
image

形式と S3 の場所を指定する画像オブジェクト。 ターンでのみサポートされます。

以下は、画像コンテンツブロックのみを含むコンテンツ配列を持つサンプル Message オブジェクトを示しています。

{ "role": "user", "content": [ { "image": { "format": "jpeg", "source": { "s3Location": { "uri": "s3://your-bucket/your-image.jpg", "bucketOwner": "account-id" } } } } ] }
video

形式と S3 の場所を指定する動画オブジェクト。 ターンでのみサポートされます。

以下は、動画コンテンツブロックのみを含むコンテンツ配列を持つサンプル Message オブジェクトを示しています。

{ "role": "user", "content": [ { "video": { "format": "mp4", "source": { "s3Location": { "uri": "s3://your-bucket/your-video.mp4", "bucketOwner": "account-id" } } } } ] }
document

形式と S3 の場所を指定するドキュメントオブジェクト。user ターンでのみサポートされます。

以下は、ドキュメントコンテンツブロックのみを含むコンテンツ配列を持つサンプル Message オブジェクトを示しています。

{ "role": "user", "content": [ { "document": { "format": "pdf", "source": { "s3Location": { "uri": "s3://your-bucket/your-document.pdf", "bucketOwner": "account-id" } } } } ] }
reasoningContent

推論トレースオブジェクト。assistant ターンでのみサポートされます。テキストベースの推論のみがサポートされています。画像ベースの推論コンテンツはサポートされていません。

以下は、推論コンテンツブロックのみを含むコンテンツ配列を持つサンプル Message オブジェクトを示しています。

{ "role": "assistant", "content": [ { "reasoningContent": { "reasoningText": { "text": "string" } } }, { "text": "final answer" } ] }
toolUse

ツール呼び出しオブジェクト。assistant ターンでのみサポートされます。toolUseId は会話ごとに一意である必要があり、name は toolConfig で定義されたツールと一致する必要があります。

以下は、ツール使用コンテンツブロックのみを含むコンテンツ配列を持つサンプル Message オブジェクトを示しています。

{ "role": "assistant", "content": [ { "toolUse": { "toolUseId": "unique-id", "name": "tool-name", "input": { ... } } } ] }
toolResult

ツール結果オブジェクト。user ターンでのみサポートされます。各 toolUseId は前述の toolUse を参照し、1 回だけ使用する必要があります。コンテンツはテキストまたは JSON のみである必要があります。

以下は、ツール結果コンテンツブロックのみを含むコンテンツ配列を持つサンプル Message オブジェクトを示しています。

{ "role": "user", "content": [ { "toolResult": { "toolUseId": "matching-id", "content": [ { "text": "result" } ] } } ] }

システムプロンプトを定義するオプションの配列です。モデルが実行するタスクまたは採用するペルソナに関する指示またはコンテキストを指定します。最適な結果を得るには、トレーニングと推論の両方で同じシステムプロンプトを使用します。

"system": [ { "text": "You are a helpful assistant." } ]

会話中にモデルが使用できるツールを定義するオプションのオブジェクト。各ツールは、名前、説明、および入力パラメータの JSON スキーマで定義されます。

"toolConfig": { "tools": [ { "toolSpec": { "name": "tool-name", "description": "tool-description", "inputSchema": { "json": { "type": "object", "properties": { "param": { "type": "string", "description": "param-description" } }, "required": ["param"] } } } } ] }

必須。スキーマバージョンを識別する文字列フィールド。任意の文字列値にすることができます

"schemaVersion": "bedrock-conversation-2024"

データの検証

トレーニングジョブを送信する前に、データセットを検証してフォーマットの問題を早期に検出してください。使用可能な検証ツールについては、検証ツール を参照してください。

入力例

以下は、さまざまなモダリティに対応したフィールドとコンテンツブロックの組み合わせ方を示す、完全な JSON オブジェクトの例です。

Text-only (Nova 1.0 compatible)
{ "schemaVersion": "bedrock-conversation-2024", "system": [ { "text": "You are a digital assistant with a friendly personality" } ], "messages": [ { "role": "user", "content": [ { "text": "What country is right next to Australia?" } ] }, { "role": "assistant", "content": [ { "text": "The closest country is New Zealand" } ] } ] }
Image + text input
{ "schemaVersion": "bedrock-conversation-2024", "system": [ { "text": "You are a helpful assistant." } ], "messages": [ { "role": "user", "content": [ { "image": { "format": "jpeg", "source": { "s3Location": { "uri": "s3://your-bucket/your-path/your-image.jpg", "bucketOwner": "your-aws-account-id" } } } }, { "text": "Which country is highlighted in the image?" } ] }, { "role": "assistant", "content": [ { "reasoningContent": { "reasoningText": { "text": "I will determine the highlighted country by examining its location on the map and using my geographical knowledge" } } }, { "text": "The highlighted country is New Zealand" } ] } ] }
Video + text input
{ "schemaVersion": "bedrock-conversation-2024", "system": [ { "text": "You are a helpful assistant." } ], "messages": [ { "role": "user", "content": [ { "video": { "format": "mp4", "source": { "s3Location": { "uri": "s3://your-bucket/your-path/your-video.mp4", "bucketOwner": "your-aws-account-id" } } } }, { "text": "What is shown in this video?" } ] }, { "role": "assistant", "content": [ { "reasoningContent": { "reasoningText": { "text": "I will analyze the video content to identify key elements" } } }, { "text": "The video shows a map with New Zealand highlighted" } ] } ] }
Document + text input
{ "schemaVersion": "bedrock-conversation-2024", "messages": [ { "role": "user", "content": [ { "text": "What are the ways in which a customer can experience issues during checkout on Amazon?" }, { "document": { "format": "pdf", "source": { "s3Location": { "uri": "s3://my-bucket-name/path/to/documents/customer_service_debugging.pdf", "bucketOwner": "123456789012" } } } } ] }, { "role": "assistant", "content": [ { "reasoningContent": { "reasoningText": { "text": "I need to find the relevant section in the document to answer the question." } } }, { "text": "Customers can experience issues with 1. Data entry, 2. Payment methods, 3. Connectivity while placing the order. Which one would you like to dive into?" } ] } ] }
Text with tool calling
{ "schemaVersion": "bedrock-conversation-2024", "system": [ { "text": "You are an expert in composing function calls." } ], "toolConfig": { "tools": [ { "toolSpec": { "name": "getItemAvailability", "description": "Retrieve whether an item is available in a given location", "inputSchema": { "json": { "type": "object", "properties": { "zipcode": { "type": "string", "description": "The zipcode of the location to check in" }, "quantity": { "type": "integer", "description": "The number of items to check availability for" }, "item_id": { "type": "string", "description": "The ASIN of item to check availability for" } }, "required": ["item_id", "zipcode"] } } } } ] }, "messages": [ { "role": "user", "content": [ { "text": "I need to check whether there are twenty pieces of the following item available. Here is the item ASIN on Amazon: id-123. Please check for the zipcode 94086" } ] }, { "role": "assistant", "content": [ { "reasoningContent": { "reasoningText": { "text": "The user wants to check how many pieces of the item with ASIN id-123 are available in the zipcode 94086" } } }, { "toolUse": { "toolUseId": "getItemAvailability_0", "name": "getItemAvailability", "input": { "zipcode": "94086", "quantity": 20, "item_id": "id-123" } } } ] }, { "role": "user", "content": [ { "toolResult": { "toolUseId": "getItemAvailability_0", "content": [ { "text": "[{\"name\": \"getItemAvailability\", \"results\": {\"availability\": true}}]" } ] } } ] }, { "role": "assistant", "content": [ { "text": "Yes, there are twenty pieces of item id-123 available at 94086. Would you like to place an order or know the total cost?" } ] } ] }
Text with reasoning
{ "schemaVersion": "bedrock-conversation-2024", "system": [ { "text": "You are a digital assistant with a friendly personality" } ], "messages": [ { "role": "user", "content": [ { "text": "What country is right next to Australia?" } ] }, { "role": "assistant", "content": [ { "reasoningContent": { "reasoningText": { "text": "I need to use my world knowledge of geography to answer this question" } } }, { "text": "The closest country to Australia is New Zealand, located to the southeast across the Tasman Sea." } ] } ] }

サポートされている機能

次の表は、Nova モデルバージョン間での SFT の機能サポートを比較したものです。

モデルバージョン別の SFT 機能サポート
機能 Nova 2.0 での SFT
テキスト理解 Nova 2.0 Lite でサポートされています。「一般的/テキスト理解」を参照してください。
画像理解 Nova 2.0 Lite でサポートされています。「画像理解」を参照してください。
動画理解 Nova 2.0 Lite でサポートされています。「動画理解」を参照してください。
ドキュメント理解 Nova 2.0 Lite でサポートされています。「ドキュメント理解」を参照してください。
ツール呼び出し Nova 2.0 Lite でサポートされています。「ツール呼び出し」を参照してください。
推論 Nova 2.0 Lite でサポートされています。「推論」を参照してください。

一般的/テキスト理解

このセクションでは、Amazon Nova 2 トレーニングデータの SFT を準備するための一般的な制約をまとめています。

制約

一般的なデータセットの制約
制約 詳細
データセット形式 JSONL (1 行につき 1 つの JSON オブジェクト)。ファイル名は、英数字、アンダースコア、ハイフン、スラッシュ、ドットのみで構成されます。
最小サンプル 8
最大サンプル 20k
コンテキストの長さ 32k
データセットの均質性 データセットに異なるメディアモダリティを混在させることはできません。画像を含むテキスト、動画を含むテキスト、またはドキュメントを含むテキストを使用しますが、これらを組み合わせることはできません。
予約済みキーワード User:、Bot:、Assistant:、System:、<image>、<video>、[EOS]。これらのキーワードを含むプロンプトは、トレーニングジョブの失敗の原因となります。それらを同様の意味を持つ別のキーワードに置き換えてください。

ベストプラクティス:

  • ファインチューニングの最小データサイズはタスク (複雑か単純か) によって異なりますが、モデルに学習させるタスクごとに少なくとも 200 個のサンプルを用意することをお勧めします。

  • 最適な結果を得るには、トレーニングと推論の両方で最適化されたプロンプトをゼロショット設定で使用することをお勧めします。

  • 数量よりも品質を優先します。数百の高品質で一貫した例が、通常、数千のノイズの多い例や矛盾する例よりも優れています。

入力例

  • schemaVersion は任意の文字列値にすることができます

  • サポートされているロールは user および assistant です。(オプション) system ターンは、お客様が用意したカスタムシステムプロンプトにすることができます。

  • messages の最初のターンインは常に "role": "user" で始まる必要があります。最後のターンはボットのレスポンスであり、"role": "assistant" で示されます。

{ "schemaVersion": "bedrock-conversation-2024", "system": [ { "text": "You are a digital assistant with a friendly personality" } ], "messages": [ { "role": "user", "content": [ { "text": "What country is right next to Australia?" } ] }, { "role": "assistant", "content": [ { "text": "The closest country is New Zealand" } ] } ] }

画像理解

SFT は画像ベースのタスクのトレーニングをサポートし、モデルが画像に関する質問を分析して応答する方法を学習できるようにします。

制約

画像の制約
制約 詳細
サポートされる形式 PNG、JPEG、GIF、WebP
サンプルあたりの最大画像数 10
画像ファイルの最大サイズ 10 MB
データセットの均質性 サンプルには画像とテキストを含めることができますが、画像を他のモダリティ (動画、ドキュメント) と組み合わせることはできません
S3 の場所 image.source.s3Location.uri は、データセットと同じ Amazon S3 バケットにある必要があります。例えば、データセットが s3://amzn-s3-demo-bucket/train/train.jsonl にある場合、画像や動画は s3://amzn-s3-demo-bucket にある必要があります。

ベストプラクティス:

  • 画像が高品質で、タスクに関連していることを確認します。

  • さまざまな画像タイプと質問形式をカバーするさまざまな例を提供します

  • 画像コンテンツの特定の側面を参照する明確な質問を含めます。

入力例

{ "schemaVersion": "bedrock-conversation-2024", "system": [ { "text": "You are a helpful assistant." } ], "messages": [ { "role": "user", "content": [ { "image": { "format": "jpeg", "source": { "s3Location": { "uri": "s3://your-bucket/your-path/your-image.jpg", "bucketOwner": "your-aws-account-id" } } } }, { "text": "Which country is highlighted in the image?" } ] }, { "role": "assistant", "content": [ { "text": "The highlighted country is New Zealand" } ] } ] }

動画理解

SFT は動画ベースのタスクのトレーニングをサポートし、モデルが動画コンテンツに関する質問を分析して応答する方法を学習できるようにします。

制約

動画の制約
制約 詳細
サポートされる形式 MOV、MKV、MP4、WebM
サンプルあたりの最大動画数 1
動画ファイルの最大サイズ 50 MB
最大動画再生時間 15 分
データセットの均質性 サンプルには動画とテキストを含めることができますが、動画を他のモダリティ (画像、ドキュメント) と組み合わせることはできません
S3 の場所 video.source.s3Location.uri は、データセットと同じ Amazon S3 バケットにある必要があります。例えば、データセットが s3://amzn-s3-demo-bucket/train/train.jsonl にある場合、動画は s3://amzn-s3-demo-bucket にある必要があります。

ベストプラクティス:

  • 動画を簡潔に保ち、タスクに関連するコンテンツに集中させます。

  • モデルが意味のある情報を抽出するのに動画の品質が十分であることを確認します。

  • 動画コンテンツの特定の側面を参照する明確な質問を提供します。

  • さまざまな動画タイプと質問形式をカバーするさまざまな例を含めます。

入力例

{ "schemaVersion": "bedrock-conversation-2024", "messages": [ { "role": "user", "content": [ { "text": "What are the ways in which a customer can experience issues during checkout on Amazon?" }, { "video": { "format": "mp4", "source": { "s3Location": { "uri": "s3://my-bucket-name/path/to/videos/customer_service_debugging.mp4", "bucketOwner": "123456789012" } } } } ] }, { "role": "assistant", "content": [ { "text": "Customers can experience issues with 1. Data entry, 2. Payment methods, 3. Connectivity while placing the order. Which one would you like to dive into?" } ] } ] }

ドキュメント理解

SFT はドキュメントベースのタスクのトレーニングをサポートしているため、モデルは PDF ドキュメントに関する質問を分析して回答する方法を学習できます。

制約

ドキュメントの制約
制約 詳細
サポートされる形式 PDF
最大ドキュメントサイズ 10 MB
データセットの均質性 サンプルにはドキュメントとテキストを含めることができますが、ドキュメントを他のモダリティ (画像、動画) と混ぜ合わせることはできません
S3 の場所 document.source.s3Location.uri は、データセットと同じ Amazon S3 バケットにある必要があります。例えば、データセットが s3://amzn-s3-demo-bucket/train/train.jsonl にある場合、ドキュメントは s3://amzn-s3-demo-bucket にある必要があります。

ベストプラクティス:

  • ドキュメントが明確にフォーマットされ、テキストが抽出可能であることを確認します。

  • さまざまなドキュメントタイプと質問形式をカバーするさまざまな例を提供します。

  • モデルがドキュメント分析パターンを学習するのに役立つ推論コンテンツを含めます。

入力例

{ "schemaVersion": "bedrock-conversation-2024", "messages": [ { "role": "user", "content": [ { "text": "What are the ways in which a customer can experience issues during checkout on Amazon?" }, { "document": { "format": "pdf", "source": { "s3Location": { "uri": "s3://my-bucket-name/path/to/documents/customer_service_debugging.pdf", "bucketOwner": "123456789012" } } } } ] }, { "role": "assistant", "content": [ { "text": "Customers can experience issues with 1. Data entry, 2. Payment methods, 3. Connectivity while placing the order. Which one would you like to dive into?" } ] } ] }

ツール呼び出し

SFT は、ツール呼び出しパターンに関するモデルのトレーニングをサポートしているため、モデルは外部ツールまたは関数を呼び出すタイミングと方法を学習できます。

制約

ツール呼び出しの制約
制約 詳細
サポートされる形式 ToolResult コンテンツのテキストまたは JSON
ToolUse 配置 ToolUse はアシスタントターンにのみ表示する必要があります
ToolResult の配置 ToolResult はユーザーターンにのみ表示する必要があります
inputSchema 形式 toolSpec 内の inputSchema は有効な JSON Schema オブジェクトである必要があります
toolUseId マッチング 各 ToolResult は、前述のアシスタント ToolUse の有効な toolUseId を参照し、各 toolUseId は会話ごとに 1 回だけ使用する必要があります

ベストプラクティス:

  • ツール定義がすべてのトレーニングサンプルで一貫しているようにしてください

  • このモデルは、提供するデモンストレーションからツール呼び出しパターンを学習します

  • 各ツールを使用するタイミングと使用しないタイミングのさまざまな例を含めます

入力例

{ "schemaVersion": "bedrock-conversation-2024", "system": [ { "text": "You are an expert in composing function calls." } ], "toolConfig": { "tools": [ { "toolSpec": { "name": "getItemAvailability", "description": "Retrieve whether an item is available in a given location", "inputSchema": { "json": { "type": "object", "properties": { "zipcode": { "type": "string", "description": "The zipcode of the location to check in" }, "quantity": { "type": "integer", "description": "The number of items to check availability for" }, "item_id": { "type": "string", "description": "The ASIN of item to check availability for" } }, "required": ["item_id", "zipcode"] } } } } ] }, "messages": [ { "role": "user", "content": [ { "text": "I need to check whether there are twenty pieces of the following item available. Here is the item ASIN on Amazon: id-123. Please check for the zipcode 94086" } ] }, { "role": "assistant", "content": [ { "toolUse": { "toolUseId": "getItemAvailability_0", "name": "getItemAvailability", "input": { "zipcode": "94086", "quantity": 20, "item_id": "id-123" } } } ] }, { "role": "user", "content": [ { "toolResult": { "toolUseId": "getItemAvailability_0", "content": [ { "text": "[{\"name\": \"getItemAvailability\", \"results\": {\"availability\": true}}]" } ] } } ] }, { "role": "assistant", "content": [ { "text": "Yes, there are twenty pieces of item id-123 available at 94086. Would you like to place an order or know the total cost?" } ] } ] }

推論

推論コンテンツ (思考の連鎖とも呼ばれます) は、最終的な回答を生成する前に、モデルの中間思考ステップをキャプチャします。

制約

推論の制約
制約 詳細
サポートされる形式 テキストのみ。イメージベースの推論コンテンツはサポートされていません。
配置 アシスタントターンのみ、 reasoningContent フィールドを介して行います。
フォーマット プレーンテキストを使用してください。タスクで特に必要な場合を除いて、<thinking> や </thinking> などのマークアップタグは避けてください。

ベストプラクティス:

  • 高品質の推論コンテンツには、中間的な思考、論理的推論、ステップバイステップの問題解決アプローチ、および各ステップと結論の間の明示的なつながりを含める必要があります。

  • マルチターン会話では、複数のアシスタントターンにまたがって reasoningContent を含めることができます。

  • データセットに推論トレースがない場合は、Nova Premier のような推論可能なモデルを使用して作成できます。

入力例

{ "schemaVersion": "bedrock-conversation-2024", "system": [ { "text": "You are a digital assistant with a friendly personality" } ], "messages": [ { "role": "user", "content": [ { "text": "What country is right next to Australia?" } ] }, { "role": "assistant", "content": [ { "reasoningContent": { "reasoningText": { "text": "I need to use my world knowledge of geography to answer this question" } } }, { "text": "The closest country to Australia is New Zealand, located to the southeast across the Tasman Sea." } ] } ] }

追加のメモ:

損失の計算方法

  • 推論コンテンツあり – トレーニング損失には、推論トークンと最終出力トークンの両方が含まれます

  • 推論コンテンツなし – トレーニング損失は最終的な出力トークンでのみ計算されます

トレーニングデータに推論トークンがある場合、最終出力を生成する前にモデルで思考トークンを生成する場合、または複雑な推論タスクのパフォーマンスを向上させる必要がある場合は、トレーニング設定で reasoning_enabled: true を設定します。

トレーニングデータに推論トークンがない場合、明示的な推論手順の恩恵を受けない単純なタスクでトレーニングしている場合、または速度を最適化してトークン使用量を削減する場合は、reasoning_enabled: false を設定します。

reasoning_enabled = true を使用して推論なしのデータセットで Nova をトレーニングすることは許可されています。ただし、Nova は主に推論を適用せずにデータに表示されるレスポンスを生成することを学習するため、モデルが推論機能を失う可能性があります。一般的に、推論データセットを使用する場合はトレーニングと推論の両方で推論を有効にし、非推論データセットを使用する場合は両方で推論を無効にします。

効果的なトレーニング例の設計

トレーニングデータは、モデルに表してもらいたい動作を示す必要があります。SFT はモデルに、知っておくべきことではなく、応答する方法を教えます。主に事実に関する知識を注入するためのトレーニング例を作成している場合 (例:「エラーコード E-45 とは?」で、回答は「E-45 はセンサーのタイムアウトを示します」)、RAG またはプロンプトエンジニアリングがファインチューニングなしで同じ結果を達成できるかどうかを検討してください。

ソースデータを会話形式に変換する場合は、次の原則に従います。

  1. 実際のユーザークエリから開始します。エンドユーザーが実稼働環境でモデルを実際にプロンプトする方法を反映するユーザーターンを書き込みます。実際の使用パターンを反映していない、人為的な質問や単純すぎる質問は避けてください。

  2. ゴールドスタンダードのアシスタントレスポンスを書き込みます。各アシスタントターンは、モデルに生成してもらいたい理想的なレスポンスである必要があります。正しく、適切にフォーマットされ、すべての例でトーンと構造が一貫するようにします。

  3. システムプロンプトを戦略的に使用します。出力形式、ペルソナ、ドメインコンテキストなどの永続的な指示をシステムターンに配置します。最適な結果を得るには、トレーニングと推論の両方で同じシステムプロンプトを使用します。

  4. サンプルごとに 1 つのスキルに焦点を当てた例であるようにします。モデルが分類し、質問に回答し、要約する必要がある場合は、複数のスキルを単一のサンプルにまとめるのではなく、スキルごとに個別の例のセットを作成します。

  5. 数量よりも品質を優先します。数百の高品質で一貫した例が、通常、数千のノイズの多い例や矛盾する例よりも優れています。トレーニング前にデータの重複を削除して確認します。

一般的なデータ変換パターン

次のパターンは、一般的なエンタープライズデータ形式を効果的な SFT トレーニング例に変換する方法を示しています。

パターン 1: 分類または検索するための構造化レコード

ソースデータが issue、cause、resolution などのフィールドを持つレコードのテーブルまたはデータベースである場合、関連する入力フィールドとターゲット出力フィールドとしてのアシスタントレスポンスを使用して、ユーザー質問として各レコードをフレーム化します。

// train.jsonl { "schemaVersion": "bedrock-conversation-2024", "system": [ { "text": "You are a technical support assistant. Given an issue description, identify the most likely root cause and recommended resolution." } ], "messages": [ { "role": "user", "content": [ { "text": "A user reports: 'Application crashes on startup after the latest update.' What is the likely cause and resolution?" } ] }, { "role": "assistant", "content": [ { "text": "Cause: Incompatible configuration file from the previous version.\nResolution: Delete the local configuration cache and restart the application to regenerate default settings." } ] } ] }
パターン 2: 構造化 Q&A への階層データまたは分類データ

ソースデータが製品カテゴリツリーや分類システムなどのコード階層または分類である場合は、モデルに階層のナビゲートを求める質問を生成します。分類コンテキストをシステムプロンプトまたはユーザーターンに含めます。

// train.jsonl { "schemaVersion": "bedrock-conversation-2024", "system": [ { "text": "You are a product catalog assistant. Answer questions about product categories and classifications accurately." } ], "messages": [ { "role": "user", "content": [ { "text": "What top-level category does product code 'EL-4520' belong to, and what subcategories does it include?" } ] }, { "role": "assistant", "content": [ { "text": "Product code EL-4520 belongs to the Electronics category. It includes the subcategories: Audio Equipment, Portable Speakers, and Wireless Accessories." } ] } ] }
パターン 3: 手順ドキュメントから指示ダイアログへ

ソースデータが標準運用手順、ランブック、またはステップバイステップガイドで構成されている場合は、手順をタスク指向の質問に変換します。ユーザーはタスクの実行方法を尋ね、アシスタントは一貫した形式でステップを提供します。

// train.jsonl { "schemaVersion": "bedrock-conversation-2024", "system": [ { "text": "You are an IT operations assistant. Provide step-by-step instructions based on approved runbooks and standard operating procedures." } ], "messages": [ { "role": "user", "content": [ { "text": "How do I reset a user's multi-factor authentication when they have lost access to their device?" } ] }, { "role": "assistant", "content": [ { "text": "Follow these steps to reset a user's multi-factor authentication:\n1. Verify the user's identity using the approved verification procedure.\n2. Disable the existing MFA configuration in the identity management console.\n3. Generate a new temporary access code and send it to the user's verified email.\n4. Instruct the user to log in with the temporary code and re-enroll their new device.\n5. Confirm the new MFA device is working by requesting a test authentication.\n6. Document the reset in the support ticket." } ] } ] }
注記

パターン 1 と 2 で、事実の内容 (コード、カテゴリ、解決策など) がモデルの事前トレーニングデータにまだない場合は、SFT だけに頼って記憶するのではなく、RAG を使用して推論時にこの情報を提供することを検討してください。SFT は応答形式と推論パターンをモデルに教えるのに最も効果的ですが、RAG は事実に基づくグラウンディングを処理します。