選取您的 Cookie 偏好設定

我們使用提供自身網站和服務所需的基本 Cookie 和類似工具。我們使用效能 Cookie 收集匿名統計資料,以便了解客戶如何使用我們的網站並進行改進。基本 Cookie 無法停用,但可以按一下「自訂」或「拒絕」以拒絕效能 Cookie。

如果您同意,AWS 與經核准的第三方也會使用 Cookie 提供實用的網站功能、記住您的偏好設定,並顯示相關內容,包括相關廣告。若要接受或拒絕所有非必要 Cookie,請按一下「接受」或「拒絕」。若要進行更詳細的選擇,請按一下「自訂」。

為使用人力的模型評估任務建立自訂提示資料集

焦點模式
為使用人力的模型評估任務建立自訂提示資料集 - Amazon Bedrock

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

若要建立使用人力工作者的模型評估任務,您必須指定自訂提示資料集。然後,這些提示會在推論期間與您選取要評估的模型搭配使用。

如果您想要使用已產生的回應來評估非 Amazon Bedrock 模型,請將它們包含在提示資料集,如 中所述使用您自己的推論回應資料執行評估任務。當您提供自己的推論回應資料時,Amazon Bedrock 會略過模型叫用步驟,並使用您提供的資料執行評估任務。

自訂提示資料集必須存放在 Amazon S3 中,並使用 JSON 行格式及使用 .jsonl 檔案副檔名。每一行都必須是有效的 JSON 物件。每個自動評估任務在您的資料集中最多可有 1000 個提示。

對於使用主控台建立的任務,您必須更新 S3 儲存貯體上的跨來源資源共享 (CORS) 組態。若要進一步了解必要的 CORS 許可,請參閱 S3 儲存貯體上所需的跨來源資源共享 (CORS) 許可

執行 Amazon Bedrock 為您叫用模型的評估任務

若要執行 Amazon Bedrock 為您叫用模型的評估任務,請提供包含下列鍵值對的提示資料集:

  • prompt – 您希望模型回應的提示。

  • referenceResponse – (選用) 您的工作者可以在評估期間參考的 Ground Truth 回應。

  • category– (選用) 在模型評估報告卡中檢閱結果時可用來篩選結果的金鑰。

在工作者 UI 中,您的人力工作者可看見您為 promptreferenceResponse 指定的內容。

以下是包含 6 個輸入並使用 JSON 行格式的自訂資料集範例。

{"prompt":"Provide the prompt you want the model to use during inference","category":"(Optional) Specify an optional category","referenceResponse":"(Optional) Specify a ground truth response."} {"prompt":"Provide the prompt you want the model to use during inference","category":"(Optional) Specify an optional category","referenceResponse":"(Optional) Specify a ground truth response."} {"prompt":"Provide the prompt you want the model to use during inference","category":"(Optional) Specify an optional category","referenceResponse":"(Optional) Specify a ground truth response."} {"prompt":"Provide the prompt you want the model to use during inference","category":"(Optional) Specify an optional category","referenceResponse":"(Optional) Specify a ground truth response."} {"prompt":"Provide the prompt you want the model to use during inference","category":"(Optional) Specify an optional category","referenceResponse":"(Optional) Specify a ground truth response."} {"prompt":"Provide the prompt you want the model to use during inference","category":"(Optional) Specify an optional category","referenceResponse":"(Optional) Specify a ground truth response."}

下列範例是為了清楚起見而擴展的單一項目。在實際提示資料集中,每一行必須是有效的 JSON 物件。

{ "prompt": "What is high intensity interval training?", "category": "Fitness", "referenceResponse": "High-Intensity Interval Training (HIIT) is a cardiovascular exercise approach that involves short, intense bursts of exercise followed by brief recovery or rest periods." }

使用您自己的推論回應資料執行評估任務

若要使用您已產生的回應執行評估任務,請提供包含下列鍵值對的提示資料集:

  • prompt – 您的模型用來產生回應的提示。

  • referenceResponse – (選用) 您的工作者可以在評估期間參考的 Ground Truth 回應。

  • category– (選用) 在模型評估報告卡中檢閱結果時可用來篩選結果的金鑰。

  • modelResponses – 您要評估之自有推論的回應。您可以在modelResponses清單中提供一或兩個具有下列屬性的項目。

    • response – 包含模型推論回應的字串。

    • modelIdentifier – 識別產生回應之模型的字串。

提示資料集中的每一行都必須包含相同數量的回應 (一或二)。此外,您必須在每一行中指定相同的模型識別符或識別符,且單一資料集modelIdentifier中的 不能使用超過 2 個唯一值。

以下是自訂範例資料集,其中包含 6 個 JSON 行格式的輸入。

{"prompt":"The prompt you used to generate the model responses","referenceResponse":"(Optional) a ground truth response","category":"(Optional) a category for the prompt","modelResponses":[{"response":"The response your first model generated","modelIdentifier":"A string identifying your first model"},{"response":"The response your second model generated","modelIdentifier":"A string identifying your second model"}]} {"prompt":"The prompt you used to generate the model responses","referenceResponse":"(Optional) a ground truth response","category":"(Optional) a category for the prompt","modelResponses":[{"response":"The response your first model generated","modelIdentifier":"A string identifying your first model"},{"response":"The response your second model generated","modelIdentifier":"A string identifying your second model"}]} {"prompt":"The prompt you used to generate the model responses","referenceResponse":"(Optional) a ground truth response","category":"(Optional) a category for the prompt","modelResponses":[{"response":"The response your first model generated","modelIdentifier":"A string identifying your first model"},{"response":"The response your second model generated","modelIdentifier":"A string identifying your second model"}]} {"prompt":"The prompt you used to generate the model responses","referenceResponse":"(Optional) a ground truth response","category":"(Optional) a category for the prompt","modelResponses":[{"response":"The response your first model generated","modelIdentifier":"A string identifying your first model"},{"response":"The response your second model generated","modelIdentifier":"A string identifying your second model"}]} {"prompt":"The prompt you used to generate the model responses","referenceResponse":"(Optional) a ground truth response","category":"(Optional) a category for the prompt","modelResponses":[{"response":"The response your first model generated","modelIdentifier":"A string identifying your first model"},{"response":"The response your second model generated","modelIdentifier":"A string identifying your second model"}]} {"prompt":"The prompt you used to generate the model responses","referenceResponse":"(Optional) a ground truth response","category":"(Optional) a category for the prompt","modelResponses":[{"response":"The response your first model generated","modelIdentifier":"A string identifying your first model"},{"response":"The response your second model generated","modelIdentifier":"A string identifying your second model"}]}

下列範例顯示為了清楚起見而展開的提示資料集中的單一項目。

{ "prompt": "What is high intensity interval training?", "referenceResponse": "High-Intensity Interval Training (HIIT) is a cardiovascular exercise approach that involves short, intense bursts of exercise followed by brief recovery or rest periods.", "category": "Fitness", "modelResponses": [ { "response": "High intensity interval training (HIIT) is a workout strategy that alternates between short bursts of intense, maximum-effort exercise and brief recovery periods, designed to maximize calorie burn and improve cardiovascular fitness.", "modelIdentifier": "Model1" }, { "response": "High-intensity interval training (HIIT) is a cardiovascular exercise strategy that alternates short bursts of intense, anaerobic exercise with less intense recovery periods, designed to maximize calorie burn, improve fitness, and boost metabolic rate.", "modelIdentifier": "Model2" } ] }
隱私權網站條款Cookie 偏好設定
© 2025, Amazon Web Services, Inc.或其附屬公司。保留所有權利。