{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-bedrock/json-schema/amazon-bedrock-get-batch-evaluation-response-schema.json",
  "title": "GetBatchEvaluationResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-bedrock-evaluations-api-openapi.yml#/components/schemas/GetBatchEvaluationResponse",
  "type": "object",
  "properties": {
    "batchEvaluationId": {
      "type": "string",
      "description": "The unique identifier of the batch evaluation."
    },
    "batchEvaluationArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the batch evaluation."
    },
    "batchEvaluationName": {
      "type": "string",
      "description": "The name of the batch evaluation."
    },
    "status": {
      "type": "string",
      "enum": [
        "PENDING",
        "IN_PROGRESS",
        "COMPLETED",
        "COMPLETED_WITH_ERRORS",
        "FAILED",
        "STOPPING",
        "STOPPED",
        "DELETING"
      ],
      "description": "The current status of the batch evaluation."
    },
    "createdAt": {
      "type": "string",
      "description": "The timestamp when the batch evaluation was created."
    },
    "evaluators": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Evaluator"
      },
      "description": "The list of evaluators applied during the batch evaluation."
    },
    "insights": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Insight"
      },
      "description": "The list of insight analyses applied during the batch evaluation."
    },
    "dataSourceConfig": {
      "$ref": "#/$defs/DataSourceConfig"
    },
    "outputConfig": {
      "$ref": "#/$defs/BedrockAgentcoreOutputConfig"
    },
    "evaluationResults": {
      "$ref": "#/$defs/EvaluationJobResults"
    },
    "insightResults": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/InsightResult"
      },
      "description": "The insights generated when the batch evaluation includes the Builtin.FailureAnalysis evaluator. Each insight groups related failures found across the evaluated sessions. An empty list means that no failures were found. If the analysis fails, this field is omitted and errorDetails describes the error."
    },
    "failureAnalysisResult": {
      "$ref": "#/$defs/FailureAnalysisResultContent"
    },
    "userIntentResult": {
      "$ref": "#/$defs/UserIntentClusteringResultContent"
    },
    "executionSummaryResult": {
      "$ref": "#/$defs/ExecutionSummaryClusteringResultContent"
    },
    "errorDetails": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The error details if the batch evaluation encountered failures."
    },
    "description": {
      "type": "string",
      "description": "The description of the batch evaluation."
    },
    "updatedAt": {
      "type": "string",
      "description": "The timestamp when the batch evaluation was last updated."
    },
    "kmsKeyArn": {
      "type": "string",
      "description": "The ARN of the KMS key used to encrypt evaluation data."
    }
  },
  "required": [
    "batchEvaluationId",
    "batchEvaluationArn",
    "batchEvaluationName",
    "status",
    "createdAt"
  ],
  "$defs": {
    "AffectedSession": {
      "type": "object",
      "properties": {
        "sessionId": {
          "type": "string",
          "description": "The unique identifier of the affected session."
        },
        "explanation": {
          "type": "string",
          "description": "An explanation of how the failure manifested in this session."
        },
        "fixType": {
          "type": "string",
          "description": "The type of fix recommended for this failure."
        },
        "recommendation": {
          "type": "string",
          "description": "The specific fix recommendation for this session."
        },
        "failureSpans": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FailureSpanDetail"
          },
          "description": "The list of spans where failures were detected in this session."
        }
      },
      "required": [
        "sessionId",
        "explanation",
        "fixType",
        "recommendation",
        "failureSpans"
      ]
    },
    "BedrockAgentcoreOutputConfig": {
      "type": "object",
      "properties": {
        "cloudWatchConfig": {
          "$ref": "#/$defs/CloudWatchOutputConfig"
        }
      },
      "description": "Exactly one member is set."
    },
    "CloudWatchFilterConfig": {
      "type": "object",
      "properties": {
        "sessionIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of specific session IDs to evaluate. If specified, only these sessions are included in the evaluation."
        },
        "timeRange": {
          "$ref": "#/$defs/SessionFilterConfig"
        },
        "sessionTraceIds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SessionTraceIds"
          },
          "description": "A list of session and trace ID pairs that restrict evaluation to specific traces within a session. If specified, only the listed traces are evaluated instead of the entire session."
        }
      }
    },
    "CloudWatchLogsSource": {
      "type": "object",
      "properties": {
        "serviceNames": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of agent service names to filter traces within the specified log groups."
        },
        "logGroupNames": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of CloudWatch log group names to read agent traces from. Maximum of 10 log groups."
        },
        "logGroupNamePrefixes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of CloudWatch log group name prefixes to read agent traces from. Specify this instead of logGroupNames to match log groups by prefix. Maximum of 5 prefixes. Specify either logGroupNames or logGroupNamePrefixes, not both. One of the two is required."
        },
        "filterConfig": {
          "$ref": "#/$defs/CloudWatchFilterConfig"
        }
      },
      "required": [
        "serviceNames"
      ]
    },
    "CloudWatchOutputConfig": {
      "type": "object",
      "properties": {
        "logGroupName": {
          "type": "string",
          "description": "The name of the CloudWatch log group where evaluation results will be written. This value doesn't apply when resultDestination is SOURCE_LOG_GROUP, because results are written back to the trace source log group. The name can't be under the service-reserved /aws/bedrock-agentcore/evaluations/ namespace, apart from the service-managed default group."
        },
        "logStreamName": {
          "type": "string",
          "description": "The name of the CloudWatch log stream where evaluation results will be written."
        },
        "metricsNamespace": {
          "type": "string",
          "description": "The CloudWatch metrics namespace where evaluation result metrics are published. If you omit this value, the service publishes metrics to Bedrock-AgentCore/Evaluations. This value can't begin with AWS/."
        },
        "resultDestination": {
          "type": "string",
          "enum": [
            "DEDICATED_LOG_GROUP",
            "SOURCE_LOG_GROUP"
          ],
          "description": "The destination where evaluation results are written. Valid values: DEDICATED_LOG_GROUP (default) – Writes results to a dedicated result log group. SOURCE_LOG_GROUP – Writes results back to the log group that the agent traces were read from. If you use this value, don't specify logGroupName."
        }
      }
    },
    "DataSourceConfig": {
      "type": "object",
      "properties": {
        "cloudWatchLogs": {
          "$ref": "#/$defs/CloudWatchLogsSource"
        },
        "onlineEvaluationConfigSource": {
          "$ref": "#/$defs/OnlineEvaluationConfigSource"
        }
      },
      "description": "Exactly one member is set."
    },
    "EvaluationJobResults": {
      "type": "object",
      "properties": {
        "numberOfSessionsCompleted": {
          "type": "integer",
          "description": "The number of sessions that have been successfully evaluated."
        },
        "numberOfSessionsInProgress": {
          "type": "integer",
          "description": "The number of sessions currently being evaluated."
        },
        "numberOfSessionsFailed": {
          "type": "integer",
          "description": "The number of sessions that failed evaluation."
        },
        "totalNumberOfSessions": {
          "type": "integer",
          "description": "The total number of sessions included in the batch evaluation."
        },
        "numberOfSessionsIgnored": {
          "type": "integer",
          "description": "The number of sessions that were ignored during evaluation."
        },
        "evaluatorSummaries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EvaluatorSummary"
          },
          "description": "A list of per-evaluator summary statistics."
        }
      }
    },
    "Evaluator": {
      "type": "object",
      "properties": {
        "evaluatorId": {
          "type": "string",
          "description": "The unique identifier of the evaluator. Can reference built-in evaluators (e.g., Builtin.Helpfulness) or custom evaluators."
        }
      },
      "required": [
        "evaluatorId"
      ]
    },
    "EvaluatorStatistics": {
      "type": "object",
      "properties": {
        "averageScore": {
          "type": "number",
          "description": "The average score across all evaluated sessions for this evaluator."
        }
      }
    },
    "EvaluatorSummary": {
      "type": "object",
      "properties": {
        "evaluatorId": {
          "type": "string",
          "description": "The unique identifier of the evaluator."
        },
        "evaluationDimensionName": {
          "type": "string",
          "description": "The name of the dimension that this summary covers. This field is set only for evaluators that use a multi-dimensional rating scale, where each dimension is summarized separately. For single-scale evaluators, this field is not set."
        },
        "statistics": {
          "$ref": "#/$defs/EvaluatorStatistics"
        },
        "totalEvaluated": {
          "type": "integer",
          "description": "The total number of sessions evaluated by this evaluator."
        },
        "totalFailed": {
          "type": "integer",
          "description": "The total number of sessions that failed evaluation by this evaluator."
        }
      }
    },
    "ExecutionSummaryAffectedSession": {
      "type": "object",
      "properties": {
        "sessionId": {
          "type": "string",
          "description": "The unique identifier of the session."
        },
        "approachTaken": {
          "type": "string",
          "description": "The approach taken by the agent during this session."
        },
        "finalOutcome": {
          "type": "string",
          "description": "The final outcome of the session."
        }
      },
      "required": [
        "sessionId",
        "approachTaken",
        "finalOutcome"
      ]
    },
    "ExecutionSummaryCluster": {
      "type": "object",
      "properties": {
        "clusterId": {
          "type": "integer",
          "description": "The unique identifier of the execution summary cluster."
        },
        "name": {
          "type": "string",
          "description": "The name of the execution pattern cluster."
        },
        "description": {
          "type": "string",
          "description": "A description of the execution pattern."
        },
        "affectedSessionCount": {
          "type": "integer",
          "description": "The number of sessions with this execution pattern."
        },
        "affectedSessions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ExecutionSummaryAffectedSession"
          },
          "description": "The list of sessions with this execution pattern."
        }
      },
      "required": [
        "clusterId",
        "name",
        "description",
        "affectedSessionCount",
        "affectedSessions"
      ]
    },
    "ExecutionSummaryClusteringResultContent": {
      "type": "object",
      "properties": {
        "executionSummaries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ExecutionSummaryCluster"
          },
          "description": "The list of execution summary clusters identified across analyzed sessions."
        }
      },
      "required": [
        "executionSummaries"
      ]
    },
    "FailureAnalysisResultContent": {
      "type": "object",
      "properties": {
        "failures": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FailureCategoryCluster"
          },
          "description": "The list of failure category clusters identified across analyzed sessions."
        }
      },
      "required": [
        "failures"
      ]
    },
    "FailureCategoryCluster": {
      "type": "object",
      "properties": {
        "clusterId": {
          "type": "integer",
          "description": "The unique identifier of the failure category cluster."
        },
        "name": {
          "type": "string",
          "description": "The name of the failure category."
        },
        "description": {
          "type": "string",
          "description": "A description of the failure category pattern."
        },
        "affectedSessionCount": {
          "type": "integer",
          "description": "The number of sessions affected by this failure category."
        },
        "subCategories": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FailureSubCategoryCluster"
          },
          "description": "The list of failure subcategories within this category."
        }
      },
      "required": [
        "clusterId",
        "name",
        "description",
        "affectedSessionCount",
        "subCategories"
      ]
    },
    "FailureSpanDetail": {
      "type": "object",
      "properties": {
        "spanId": {
          "type": "string",
          "description": "The unique identifier of the span where the failure occurred."
        },
        "traceId": {
          "type": "string",
          "description": "The trace identifier associated with the failure span."
        },
        "signals": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InsightsFailureSignal"
          },
          "description": "The failure signals detected in this span."
        }
      },
      "required": [
        "spanId",
        "traceId",
        "signals"
      ]
    },
    "FailureSubCategoryCluster": {
      "type": "object",
      "properties": {
        "clusterId": {
          "type": "integer",
          "description": "The unique identifier of the failure subcategory cluster."
        },
        "name": {
          "type": "string",
          "description": "The name of the failure subcategory."
        },
        "description": {
          "type": "string",
          "description": "A description of the failure subcategory pattern."
        },
        "affectedSessionCount": {
          "type": "integer",
          "description": "The number of sessions affected by this failure subcategory."
        },
        "rootCauses": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RootCauseCluster"
          },
          "description": "The list of root cause clusters identified within this subcategory."
        }
      },
      "required": [
        "clusterId",
        "name",
        "description",
        "affectedSessionCount",
        "rootCauses"
      ]
    },
    "Insight": {
      "type": "object",
      "properties": {
        "insightId": {
          "type": "string",
          "description": "The unique identifier of the insight to run."
        }
      },
      "required": [
        "insightId"
      ]
    },
    "InsightResult": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "FAILURE"
          ],
          "description": "The type of insight. FAILURE indicates a group of related failures."
        },
        "name": {
          "type": "string",
          "description": "A generated label for the insight. The name is not an identifier and can differ between batch evaluations."
        },
        "description": {
          "type": "string",
          "description": "A description of the failure pattern that the insight represents."
        },
        "createdAt": {
          "type": "string",
          "description": "The timestamp when the insight was generated."
        },
        "affectedSessionCount": {
          "type": "integer",
          "description": "The number of distinct sessions affected by the insight."
        },
        "sampleSessions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SampleSession"
          },
          "description": "A sample of up to 10 sessions affected by the insight. Returned only when the insight has no root causes. Otherwise, sample sessions are returned for each root cause."
        },
        "rootCauses": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InsightRootCause"
          },
          "description": "The root causes identified for the insight."
        }
      },
      "required": [
        "type",
        "name",
        "description",
        "createdAt"
      ]
    },
    "InsightRootCause": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "A generated label for the root cause."
        },
        "explanation": {
          "type": "string",
          "description": "An explanation of how the root cause leads to the failures in the insight."
        },
        "affectedSessionCount": {
          "type": "integer",
          "description": "The number of distinct sessions affected by the root cause. A session can be affected by more than one root cause of the same insight."
        },
        "suggestedFix": {
          "type": "string",
          "description": "A suggested change to the agent that addresses the root cause."
        },
        "sampleSessions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SampleSession"
          },
          "description": "A sample of up to 10 sessions affected by the root cause."
        }
      },
      "required": [
        "name",
        "explanation"
      ]
    },
    "InsightsFailureSignal": {
      "type": "object",
      "properties": {
        "category": {
          "type": "string",
          "enum": [
            "execution-error-category-authentication",
            "execution-error-category-resource-not-found",
            "execution-error-category-service-errors",
            "execution-error-category-rate-limiting",
            "execution-error-category-formatting",
            "execution-error-category-timeout",
            "execution-error-category-resource-exhaustion",
            "execution-error-category-environment",
            "execution-error-category-tool-schema",
            "task-instruction-category-non-compliance",
            "task-instruction-category-problem-id",
            "incorrect-actions-category-tool-selection",
            "incorrect-actions-category-poor-information-retrieval",
            "incorrect-actions-category-clarification",
            "incorrect-actions-category-inappropriate-info-request",
            "context-handling-error-category-context-handling-failures",
            "hallucination-category-hall-capabilities",
            "hallucination-category-hall-misunderstand",
            "hallucination-category-hall-usage",
            "hallucination-category-hall-history",
            "hallucination-category-hall-params",
            "hallucination-category-fabricate-tool-outputs",
            "repetitive-behavior-category-repetition-tool",
            "repetitive-behavior-category-repetition-info",
            "repetitive-behavior-category-step-repetition",
            "orchestration-related-errors-category-reasoning-mismatch",
            "orchestration-related-errors-category-goal-deviation",
            "orchestration-related-errors-category-premature-termination",
            "orchestration-related-errors-category-unaware-termination",
            "llm-output-category-nonsensical",
            "configuration-mismatch-category-tool-definition",
            "coding-use-case-specific-failure-types-category-edge-case-oversights",
            "coding-use-case-specific-failure-types-category-dependency-issues",
            "other"
          ],
          "description": "The failure category classification for this signal."
        },
        "evidence": {
          "type": "string",
          "description": "The evidence supporting the failure detection."
        },
        "confidence": {
          "type": "number",
          "description": "The confidence score of the failure detection."
        }
      },
      "required": [
        "category",
        "evidence",
        "confidence"
      ]
    },
    "OnlineEvaluationConfigSource": {
      "type": "object",
      "properties": {
        "onlineEvaluationConfigArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the online evaluation configuration to use as the session source."
        },
        "timeRange": {
          "$ref": "#/$defs/SessionFilterConfig"
        }
      },
      "required": [
        "onlineEvaluationConfigArn"
      ]
    },
    "RootCauseCluster": {
      "type": "object",
      "properties": {
        "clusterId": {
          "type": "integer",
          "description": "The unique identifier of the root cause cluster."
        },
        "name": {
          "type": "string",
          "description": "The name of the root cause cluster."
        },
        "rootCause": {
          "type": "string",
          "description": "The root cause explanation for this cluster of failures."
        },
        "recommendation": {
          "type": "string",
          "description": "The recommended fix for this root cause."
        },
        "affectedSessionCount": {
          "type": "integer",
          "description": "The number of sessions affected by this root cause."
        },
        "affectedSessions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AffectedSession"
          },
          "description": "The list of sessions affected by this root cause."
        }
      },
      "required": [
        "clusterId",
        "name",
        "rootCause",
        "recommendation",
        "affectedSessionCount",
        "affectedSessions"
      ]
    },
    "SampleSession": {
      "type": "object",
      "properties": {
        "sessionId": {
          "type": "string",
          "description": "The unique identifier of the session."
        },
        "lastSeenAt": {
          "type": "string",
          "description": "The latest timestamp observed for the session in the batch evaluation input."
        },
        "findings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SessionFinding"
          },
          "description": "The failures found in the session that belong to the insight or root cause, up to 10."
        }
      },
      "required": [
        "sessionId"
      ]
    },
    "SessionFilterConfig": {
      "type": "object",
      "properties": {
        "startTime": {
          "type": "string",
          "description": "The start time of the time range. Only sessions with activity at or after this timestamp are included."
        },
        "endTime": {
          "type": "string",
          "description": "The end time of the time range. Only sessions with activity before this timestamp are included."
        }
      }
    },
    "SessionFinding": {
      "type": "object",
      "properties": {
        "targetId": {
          "type": "string",
          "description": "The identifier or name of the location in the session where the failure was found, interpreted according to targetType."
        },
        "targetType": {
          "type": "string",
          "enum": [
            "SPAN_ID",
            "TRACE_ID",
            "SPAN_NAME"
          ],
          "description": "The type of location that targetId refers to."
        },
        "description": {
          "type": "string",
          "description": "A description of the failure."
        },
        "category": {
          "type": "string",
          "description": "The category of the failure."
        },
        "confidence": {
          "type": "number",
          "description": "The confidence that the finding is a failure, from 0 to 1."
        }
      },
      "required": [
        "description"
      ]
    },
    "SessionTraceIds": {
      "type": "object",
      "properties": {
        "sessionId": {
          "type": "string",
          "description": "The unique identifier of the session that contains the traces to evaluate."
        },
        "traceIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of trace IDs within the session to evaluate."
        }
      },
      "required": [
        "sessionId",
        "traceIds"
      ]
    },
    "UserIntentAffectedSession": {
      "type": "object",
      "properties": {
        "sessionId": {
          "type": "string",
          "description": "The unique identifier of the session."
        },
        "userMessages": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The user messages from this session that contributed to the intent cluster."
        }
      },
      "required": [
        "sessionId",
        "userMessages"
      ]
    },
    "UserIntentCluster": {
      "type": "object",
      "properties": {
        "clusterId": {
          "type": "integer",
          "description": "The unique identifier of the user intent cluster."
        },
        "name": {
          "type": "string",
          "description": "The name of the user intent cluster."
        },
        "description": {
          "type": "string",
          "description": "A description of the user intent pattern."
        },
        "affectedSessionCount": {
          "type": "integer",
          "description": "The number of sessions with this user intent."
        },
        "affectedSessions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UserIntentAffectedSession"
          },
          "description": "The list of sessions with this user intent."
        }
      },
      "required": [
        "clusterId",
        "name",
        "description",
        "affectedSessionCount",
        "affectedSessions"
      ]
    },
    "UserIntentClusteringResultContent": {
      "type": "object",
      "properties": {
        "userIntents": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UserIntentCluster"
          },
          "description": "The list of user intent clusters identified across analyzed sessions."
        }
      },
      "required": [
        "userIntents"
      ]
    }
  }
}