Comprendere in che modo i risultati del processo di valutazione del modello vengono salvati in Amazon S3 - Amazon Bedrock

Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.

Comprendere in che modo i risultati del processo di valutazione del modello vengono salvati in Amazon S3

L'output di un processo di valutazione del modello viene salvato nel bucket Amazon S3 specificato al momento della creazione del processo di valutazione del modello. I risultati dei lavori di valutazione del modello vengono salvati come file di JSON linea (.jsonl).

I risultati del processo di valutazione del modello vengono salvati nel bucket S3 specificato come segue.

  • Per i processi di valutazione del modello che utilizzano lavoratori umani:

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

  • Per i processi di valutazione del modello automatica:

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

I seguenti argomenti descrivono come i risultati di un processo di valutazione del modello automatica e basata su operatori umani vengono salvati in Amazon S3.

Dati di output da processi di valutazione del modello automatica

I risultati del processo di valutazione automatica vengono archiviati nella directory datasets quando lo stato del lavoro passa a Completato.

Per ogni metrica e il set di dati di prompt corrispondente selezionato al momento della creazione del processo di valutazione del modello, viene generato un file di JSON riga nella directory. datasets Il file usa la seguente convenzione di denominazione metric_input-dataset.jsonl.

Ogni risultato del processo di valutazione del modello inizia con la chiave automatedEvaluationResult. La prima chiave secondaria scores contiene le metriche selezionate nella console Amazon Bedrock. In questo esempio, è stata selezionata una sola metrica Accuracy. Contiene anche result, che è il valore calcolato per la metrica selezionata. Per ulteriori informazioni su quale valore specifico viene calcolato, consulta Schede del processo di valutazione del modello automatica (console).

La seconda chiave, inputRecord, è una copia di ciò che hai fornito nel set di dati dei prompt di input.

La terza chiave modelResponses contiene un elenco di JSON oggetti che contiene il modello selezionato al momento ARN della creazione del processo di valutazione del modello. Contiene inoltre la risposta completa del modello in base al prompt fornito.

Di seguito è riportato un esempio di output per il tipo di attività d riepilogo del testo con una sola metrica, l'accuratezza, selezionata.

{ "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." }] }

Dati di output dei processi di valutazione del modello che utilizzano lavoratori umani.

Una volta completato un processo di valutazione del modello, nei dati di output restituiti dalle attività di revisione umana vengono visualizzati i seguenti parametri.

Parametro Tipo di valore Valori di esempio Descrizione
flowDefinitionArn

Stringa

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

L'Amazon Resource Number (ARN) del flusso di lavoro di revisione umana (definizione del flusso) utilizzato per creare il ciclo umano.

humanAnswers

Elenco di JSON oggetti

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

Un elenco di JSON oggetti che contengono le risposte dei lavoratori inanswerContent.

humanLoopName

Stringa system-generated-hash Una stringa esadecimale di 40 caratteri generata dal sistema.
inputRecord JSONoggetto
"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.... }
Un JSON oggetto che contiene una richiesta di immissione dal set di dati di input.
modelResponses Elenco di oggetti JSON
"modelResponses": [{ "modelIdentifier": "arn:aws:bedrock:us-west-2::foundation-model/model-id", "response": "the-models-response-to-the-prompt" }]
Le risposte individuali dei modelli.
inputContent

Oggetto

{ "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" }

Il contenuto di input del loop umano necessario per avviare il loop umano nel bucket S3.

modelResponseIdMap

Oggetto

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

humanAnswers.answerContent.evaluationResultscontiene smodelResponseId. La modelResponseIdMap collega modelResponseId al nome del modello.

Di seguito è riportato un esempio di dati di output da un processo di valutazione del modello.

{ "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.Regione AWS.amazonaws.com/Regione 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:Regione 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:Regione 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" }] } }

La tabella seguente spiega come il metodo di valutazione selezionato per ogni metrica nella console Amazon Bedrock viene restituito nel tuo bucket Amazon S3. La prima chiave secondaria sotto evaluationResults indica dove viene restituito il metodo di valutazione.

In che modo i metodi di valutazione selezionati nella console Amazon Bedrock vengono salvati in Amazon S3
Metodo di valutazione selezionato Salvato in Amazon S3
Scala Likert: individuale IndividualLikertScale
Scala Likert: confronto ComparisonLikertScale
Tasti di scelta ComparisonChoice
Classificazione ordinale ComparisonRank
Pollice su/giù ThumbsUpDown