모델 평가 작업 결과가 Amazon S3에 저장되는 방식을 이해하십시오. - Amazon Bedrock

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

모델 평가 작업 결과가 Amazon S3에 저장되는 방식을 이해하십시오.

모델 평가 작업의 출력은 모델 평가 작업을 생성할 때 지정한 Amazon S3 버킷에 저장됩니다. 모델 평가 작업의 결과는 JSON 라인 파일 (.jsonl) 로 저장됩니다.

모델 평가 작업의 결과는 다음과 같이 지정한 S3 버킷에 저장됩니다.

  • 작업자를 사용하는 모델 평가 작업의 경우:

    s3://user-specified-S3-output-path/job-name/job-uuid/datasets/dataset-name/file-uuid_output.jsonl

  • 자동 모델 평가 작업의 경우:

    s3://user-specified-S3-output-path/job-name/job-uuid/models/model-id/taskTypes/task-type/datasets/dataset/file-uuid_output.jsonl

다음 주제에서는 자동 모델 평가 작업 및 작업자 기반 모델 평가 작업의 결과를 Amazon S3에 저장하는 방법을 설명합니다.

자동 모델 평가 작업의 출력 데이터

작업 상태가 완료됨으로 변경되면 자동 평가 작업의 결과가 datasets 디렉터리에 저장됩니다.

모델 평가 작업을 생성할 때 선택한 각 지표와 해당 프롬프트 데이터세트에 대해 datasets 디렉토리에 JSON 라인 파일이 생성됩니다. 파일은 다음 명명 규칙(metric_input-dataset.jsonl)을 사용합니다.

모델 평가 작업의 각 결과는 automatedEvaluationResult 키로 시작합니다. 첫 번째 하위 scores 키에는 Amazon Bedrock 콘솔에서 선택한 지표가 들어 있습니다. 이 예제에서는 지표 Accuracy 하나만 선택되었습니다. 선택한 지표의 계산된 값인 result도 포함됩니다. 계산되는 특정 값에 대한 자세한 내용은 Amazon Bedrock의 자동 모델 평가 작업에 대한 지표 검토 (콘솔) 섹션을 참조하세요.

두 번째 키는 입력 프롬프트 데이터 세트에 제공한 내용의 사본인 inputRecord입니다.

세 번째 키는 모델 평가 작업을 생성할 때 선택한 모델을 포함하는 JSON 개체 목록을 포함합니다. modelResponses ARN 또한 제공된 프롬프트에 따른 모델의 전체 응답도 포함됩니다.

다음은 정확도라는 하나의 지표만 선택한 텍스트 요약 작업 유형에 대한 예제 출력입니다.

{ "automatedEvaluationResult": { "scores": [{ "metricName": "Accuracy", "result": 0.31920555233955383 }] }, "inputRecord": { "prompt": "Human: two bodies have been recovered from a flooded coal mine in yiyang city , central china 's henan province , as of #:## thursday morning , rescuers said . Assistant:", "referenceResponse": "two bodies recovered from flooded coal mine in c. china" }, "modelResponses": [{ "modelIdentifier": "arn:aws:bedrock:us-west-2::foundation-model/anthropic.claude-v2", "response": " Here are the key points I gathered from your news summary:\n\n- Two bodies have been recovered from a flooded coal mine in Yiyang City, in China's Henan province.\n\n- This happened as of Thursday morning, according to rescuers.\n\n- The location is central China's Henan province. \n\n- Yiyang City is where the flooded coal mine is located.\n\n- The coal mine was flooded, leading to the two deaths and need for rescue/recovery efforts.\n\n- This news is developing as of Thursday morning, so the death toll and rescue details may still be unfolding.\n\nPlease let me know if I have accurately summarized the key information or if you would like me to expand on any part of it." }] }

작업자를 사용하는 모델 평가 작업의 출력 데이터입니다.

모델 평가 작업이 완료되면 인적 검토 작업에서 반환된 출력 데이터에 다음 파라미터가 표시됩니다.

파라미터 값 유형 예제 값 설명
flowDefinitionArn

String

arn:aws:sagemaker:us-west-2:111122223333:flow-definition/flow-definition-name

휴먼 루프를 생성하는 데 사용된 휴먼 리뷰 워크플로 (플로우 정의) 의 Amazon 리소스 번호 (). ARN

humanAnswers

JSON객체 목록

"answerContent": { "evaluationResults": { "thumbsUpDown": [{ "metricName": "Relevance", "modelResponseId": "0", "result": false }] } }

작업자 응답이 포함된 JSON 객체 목록answerContent.

humanLoopName

String system-generated-hash 시스템에서 40자의 16진수 문자열을 생성했습니다.
inputRecord JSON객체
"inputRecord": { "prompt": "What does vitamin C serum do for skin?", "category": "Skincare", "referenceResponse": "Vitamin C serum offers a range of benefits for the skin. Firstly, it acts.... }
입력 데이터셋의 입력 프롬프트가 포함된 JSON 객체입니다.
modelResponses 개체 목록 JSON
"modelResponses": [{ "modelIdentifier": "arn:aws:bedrock:us-west-2::foundation-model/model-id", "response": "the-models-response-to-the-prompt" }]
모델의 개별 응답입니다.
inputContent

객체

{ "additionalDataS3Uri":"s3://user-specified-S3-URI-path/datasets/dataset-name/records/record-number/human-loop-additional-data.json", "evaluationMetrics":[ { "description":"testing", "metricName":"IndividualLikertScale", "ratingMethod":"IndividualLikertScale" } ], "instructions":"example instructions" }

S3 버킷에서 휴먼 루프를 시작하는 데 필요한 휴먼 루프 입력 콘텐츠.

modelResponseIdMap

객체

{ "0":"arn:aws:bedrock:us-west-2::foundation-model/model-id" }

humanAnswers.answerContent.evaluationResultsmodelResponseIds가 들어 있습니다. modelResponseIdMapmodelResponseId 를 모델 이름에 연결합니다.

다음은 모델 평가 작업의 출력 데이터 예제입니다.

{ "humanEvaluationResult": [{ "flowDefinitionArn": "arn:aws:sagemaker:us-west-2:111122223333:flow-definition/flow-definition-name", "humanAnswers": [{ "acceptanceTime": "2023-11-09T19:17:43.107Z", "answerContent": { "evaluationResults": { "thumbsUpDown": [{ "metricName": "Coherence", "modelResponseId": "0", "result": false }, { "metricName": "Accuracy", "modelResponseId": "0", "result": true }], "individualLikertScale": [{ "metricName": "Toxicity", "modelResponseId": "0", "result": 1 }] } }, "submissionTime": "2023-11-09T19:17:52.101Z", "timeSpentInSeconds": 8.994, "workerId": "444455556666", "workerMetadata": { "identityData": { "identityProviderType": "Cognito", "issuer": "https://cognito-idp.AWS 리전.amazonaws.com/AWS 리전_111222", "sub": "c6aa8eb7-9944-42e9-a6b9-" } } }], ...Additional response have been truncated for clarity... }], "humanLoopName": "b3b1c64a2166e001e094123456789012", "inputContent":{ "additionalDataS3Uri":"s3://user-specified-S3-output-path/datasets/dataset-name/records/record-number/human-loop-additional-data.json", "evaluationMetrics":[ { "description":"testing", "metricName":"IndividualLikertScale", "ratingMethod":"IndividualLikertScale" } ], "instructions":"some dummy instructions" }, "modelResponseIdMap":{ "0":"arn:aws:bedrock:AWS 리전::foundation-model/model-id" } }, "inputRecord": { "category": "Fitness", "prompt": "Human: What is High-Intensity Interval Training ? \\n\\nAssistant:", "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. In HIIT, you perform exercises at near-maximum effort during the high-intensity intervals, which can include activities like sprinting, cycling, jumping, or body weight exercises such as burpees or push-ups. These intense intervals are interspersed with short recovery periods to lower your heart rate before the next high-intensity bout. HIIT workouts usually consist of multiple cycles of these intervals, and the number of cycles and the length of intervals can vary. HIIT is known for its time efficiency, making it an excellent choice for those with busy schedules. It offers both aerobic and anaerobic benefits, improving cardiovascular fitness, burning calories, and promoting fat loss, all while boosting metabolism for continued calorie burning post-workout." }, "modelResponses": [{ "modelIdentifier": "arn:aws:bedrock:AWS 리전::foundation-model/model-id", "response": " High-intensity interval training (HIIT) is a form of exercise that involves short bursts of intense activity alternated with recovery periods. Here are some key features of HIIT:\n\n- Alternates short periods of intense anaerobic exercise with less intense recovery periods. The high-intensity periods are typically done at 80-95% of maximum heart rate.\n\n- The duration of the intense periods can range from 5 seconds to 8 minutes, but typically are in the range of 30 seconds to 4 minutes.\n\n- The total HIIT session typically lasts between 10-30 minutes, including warm-up, recovery periods, and cool down. \n\n- Uses exercises like sprints, cycling, rowing, jumping rope, stair climbing, swimming, etc. Movements that get your heart rate up quickly.\n\n- The short, intense intervals help improve cardiovascular fitness by increasing heart rate and oxygen consumption.\n\n- HIIT burns more calories and fat than steady-state cardio in a shorter time period. It also helps build muscle strength and endurance.\n\n- Considered an efficient and effective form of exercise for fat loss and improving aerobic power. But it requires motivation to push yourself during the intense intervals.\n\n- Not suitable for beginners due to the high-intensity. Start with steady-state cardio and build up endurance before trying HIIT.\n\nIn summary, HIIT intersperses intense bursts of" }] } }

다음 표에는 Amazon Bedrock 콘솔에서 각 지표에 대해 선택한 등급 지정 방법이 Amazon S3 버킷에 반환되는 방식이 설명되어 있습니다. evaluationResults에 있는 첫 번째 하위 키는 등급 지정 방법이 반환되는 방식입니다.

Amazon Bedrock 콘솔에서 선택한 등급 지정 방법이 Amazon S3에 저장되는 방식
선택된 등급 지정 방법 Amazon S3에 저장
리커트 척도 - 개인 IndividualLikertScale
리커트 척도 - 비교 ComparisonLikertScale
선택 버튼 ComparisonChoice
서수 순위 ComparisonRank
추천/반대 ThumbsUpDown