View the results of a batch inference job
After a batch inference job is Completed
, you can extract the results of the batch inference job from the files in the Amazon S3 bucket that you specified during creation of the job. To learn how to download an S3 object, see Downloading objects. The S3 bucket contains the following files:
-
Amazon Bedrock generates an output JSONL file for each input JSONL file. The output files contain outputs from the model for each input in the following format. An
error
object replaces themodelOutput
field in any line where there was an error in inference. The format of themodelOutput
JSON object matches thebody
field for the model that you use in theInvokeModel
response. For more information, see Inference request parameters and response fields for foundation models.{ "recordId" : "
11 character alphanumeric string
", "modelInput":{JSON body}
, "modelOutput":{JSON body}
}The following example shows a possible output file.
{ "recordId" : "3223593EFGH", "modelInput" : {"inputText": "Roses are red, violets are"}, "modelOutput" : {'inputTextTokenCount': 8, 'results': [{'tokenCount': 3, 'outputText': 'blue\n', 'completionReason': 'FINISH'}]}} { "recordId" : "1223213ABCD", "modelInput" : {"inputText": "Hello world"}, "error" : {"errorCode" : 400, "errorMessage" : "bad request" }}
-
A
manifest.json.out
file containing a summary of the batch inference job.{ "totalRecordCount" : number, "processedRecordCount" : number, "successRecordCount": number, "errorRecordCount": number, "inputTokenCount": number, "outputTokenCount" : number }
The fields are described below:
-
totalRecordCount – The total number of records submitted to the batch inference job.
-
processedRecordCount – The number of records processed in the batch inference job.
-
successRecordCount – The number of records successfully processed by the batch inference job.
-
errorRecordCount – The number of records in the batch inference job that caused errors.
-
inputTokenCount – The total number of input tokens submitted to the batch inference job.
-
outputTokenCount – The total number of output tokens generated by the batch inference job.
-