{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-bedrock/json-schema/amazon-bedrock-get-evaluation-job-response-schema.json",
  "title": "GetEvaluationJobResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-bedrock-evaluation-jobs-api-openapi.yml#/components/schemas/GetEvaluationJobResponse",
  "type": "object",
  "properties": {
    "jobName": {
      "type": "string",
      "description": "The name for the evaluation job."
    },
    "status": {
      "type": "string",
      "enum": [
        "InProgress",
        "Completed",
        "Failed",
        "Stopping",
        "Stopped",
        "Deleting"
      ],
      "description": "The current status of the evaluation job."
    },
    "jobArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the evaluation job."
    },
    "jobDescription": {
      "type": "string",
      "description": "The description of the evaluation job."
    },
    "roleArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the IAM service role used in the evaluation job."
    },
    "customerEncryptionKeyId": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the customer managed encryption key specified when the evaluation job was created."
    },
    "jobType": {
      "type": "string",
      "enum": [
        "Human",
        "Automated"
      ],
      "description": "Specifies whether the evaluation job is automated or human-based."
    },
    "applicationType": {
      "type": "string",
      "enum": [
        "ModelEvaluation",
        "RagEvaluation"
      ],
      "description": "Specifies whether the evaluation job is for evaluating a model or evaluating a knowledge base (retrieval and response generation)."
    },
    "evaluationConfig": {
      "$ref": "#/$defs/EvaluationConfig"
    },
    "inferenceConfig": {
      "$ref": "#/$defs/EvaluationInferenceConfig"
    },
    "outputDataConfig": {
      "$ref": "#/$defs/EvaluationOutputDataConfig"
    },
    "creationTime": {
      "type": "string",
      "format": "date-time",
      "description": "The time the evaluation job was created."
    },
    "lastModifiedTime": {
      "type": "string",
      "format": "date-time",
      "description": "The time the evaluation job was last modified."
    },
    "failureMessages": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "A list of strings that specify why the evaluation job failed to create."
    }
  },
  "required": [
    "jobName",
    "status",
    "jobArn",
    "roleArn",
    "jobType",
    "evaluationConfig",
    "inferenceConfig",
    "outputDataConfig",
    "creationTime"
  ],
  "$defs": {
    "AutomatedEvaluationConfig": {
      "type": "object",
      "properties": {
        "datasetMetricConfigs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EvaluationDatasetMetricConfig"
          },
          "description": "Configuration details of the prompt datasets and metrics you want to use for your evaluation job."
        },
        "evaluatorModelConfig": {
          "$ref": "#/$defs/EvaluatorModelConfig"
        },
        "customMetricConfig": {
          "$ref": "#/$defs/AutomatedEvaluationCustomMetricConfig"
        }
      },
      "required": [
        "datasetMetricConfigs"
      ]
    },
    "AutomatedEvaluationCustomMetricConfig": {
      "type": "object",
      "properties": {
        "customMetrics": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AutomatedEvaluationCustomMetricSource"
          },
          "description": "Defines a list of custom metrics to be used in an Amazon Bedrock evaluation job."
        },
        "evaluatorModelConfig": {
          "$ref": "#/$defs/CustomMetricEvaluatorModelConfig"
        }
      },
      "required": [
        "customMetrics",
        "evaluatorModelConfig"
      ]
    },
    "AutomatedEvaluationCustomMetricSource": {
      "type": "object",
      "properties": {
        "customMetricDefinition": {
          "$ref": "#/$defs/CustomMetricDefinition"
        }
      },
      "description": "Exactly one member is set."
    },
    "BedrockEvaluatorModel": {
      "type": "object",
      "properties": {
        "modelIdentifier": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the evaluator model used used in knowledge base evaluation job or in model evaluation job that use a model as judge."
        }
      },
      "required": [
        "modelIdentifier"
      ]
    },
    "ByteContentDoc": {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "string",
          "description": "The file name of the document contained in the wrapper object."
        },
        "contentType": {
          "type": "string",
          "description": "The MIME type of the document contained in the wrapper object."
        },
        "data": {
          "type": "string",
          "format": "byte",
          "description": "The byte value of the file to upload, encoded as a Base-64 string."
        }
      },
      "required": [
        "identifier",
        "contentType",
        "data"
      ]
    },
    "CustomMetricBedrockEvaluatorModel": {
      "type": "object",
      "properties": {
        "modelIdentifier": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the evaluator model for custom metrics. For a list of supported evaluator models, see Evaluate model performance using another LLM as a judge and Evaluate the performance of RAG sources using Amazon Bedrock evaluations."
        }
      },
      "required": [
        "modelIdentifier"
      ]
    },
    "CustomMetricDefinition": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name for a custom metric. Names must be unique in your Amazon Web Services region."
        },
        "instructions": {
          "type": "string",
          "description": "The prompt for a custom metric that instructs the evaluator model how to rate the model or RAG source under evaluation."
        },
        "ratingScale": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RatingScaleItem"
          },
          "description": "Defines the rating scale to be used for a custom metric. We recommend that you always define a ratings scale when creating a custom metric. If you don't define a scale, Amazon Bedrock won't be able to visually display the results of the evaluation in the console or calculate average values of numerical scores. For more information on specifying a rating scale, see Specifying an output schema (rating scale)."
        }
      },
      "required": [
        "name",
        "instructions"
      ]
    },
    "CustomMetricEvaluatorModelConfig": {
      "type": "object",
      "properties": {
        "bedrockEvaluatorModels": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CustomMetricBedrockEvaluatorModel"
          },
          "description": "Defines the model you want to evaluate custom metrics in an Amazon Bedrock evaluation job."
        }
      },
      "required": [
        "bedrockEvaluatorModels"
      ]
    },
    "EvaluationBedrockModel": {
      "type": "object",
      "properties": {
        "modelIdentifier": {
          "type": "string",
          "description": "The ARN of the Amazon Bedrock model or inference profile specified."
        },
        "inferenceParams": {
          "type": "string",
          "description": "Each Amazon Bedrock support different inference parameters that change how the model behaves during inference."
        },
        "performanceConfig": {
          "$ref": "#/$defs/PerformanceConfiguration"
        }
      },
      "required": [
        "modelIdentifier"
      ]
    },
    "EvaluationConfig": {
      "type": "object",
      "properties": {
        "automated": {
          "$ref": "#/$defs/AutomatedEvaluationConfig"
        },
        "human": {
          "$ref": "#/$defs/HumanEvaluationConfig"
        }
      },
      "description": "Exactly one member is set."
    },
    "EvaluationDataset": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Used to specify supported built-in prompt datasets. Valid values are Builtin.Bold, Builtin.BoolQ, Builtin.NaturalQuestions, Builtin.Gigaword, Builtin.RealToxicityPrompts, Builtin.TriviaQA, Builtin.T-Rex, Builtin.WomensEcommerceClothingReviews and Builtin.Wikitext2."
        },
        "datasetLocation": {
          "$ref": "#/$defs/EvaluationDatasetLocation"
        }
      },
      "required": [
        "name"
      ]
    },
    "EvaluationDatasetLocation": {
      "type": "object",
      "properties": {
        "s3Uri": {
          "type": "string",
          "description": "The S3 URI of the S3 bucket specified in the job."
        }
      },
      "description": "Exactly one member is set."
    },
    "EvaluationDatasetMetricConfig": {
      "type": "object",
      "properties": {
        "taskType": {
          "type": "string",
          "enum": [
            "Summarization",
            "Classification",
            "QuestionAndAnswer",
            "Generation",
            "Custom"
          ],
          "description": "The the type of task you want to evaluate for your evaluation job. This applies only to model evaluation jobs and is ignored for knowledge base evaluation jobs."
        },
        "dataset": {
          "$ref": "#/$defs/EvaluationDataset"
        },
        "metricNames": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The names of the metrics you want to use for your evaluation job. For knowledge base evaluation jobs that evaluate retrieval only, valid values are \"Builtin.ContextRelevance\", \"Builtin.ContextCoverage\". For knowledge base evaluation jobs that evaluate retrieval with response generation, valid values are \"Builtin.Correctness\", \"Builtin.Completeness\", \"Builtin.Helpfulness\", \"Builtin.LogicalCoherence\", \"Builtin.Faithfulness\", \"Builtin.Harmfulness\", \"Builtin.Stereotyping\", \"Builtin.Refusal\". For automated model evaluation jobs, valid values are \"Builtin.Accuracy\", \"Builtin.Robustness\", and \"Builti"
        }
      },
      "required": [
        "taskType",
        "dataset",
        "metricNames"
      ]
    },
    "EvaluationInferenceConfig": {
      "type": "object",
      "properties": {
        "models": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EvaluationModelConfig"
          },
          "description": "Specifies the inference models."
        },
        "ragConfigs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RAGConfig"
          },
          "description": "Contains the configuration details of the inference for a knowledge base evaluation job, including either the retrieval only configuration or the retrieval with response generation configuration."
        }
      },
      "description": "Exactly one member is set."
    },
    "EvaluationModelConfig": {
      "type": "object",
      "properties": {
        "bedrockModel": {
          "$ref": "#/$defs/EvaluationBedrockModel"
        },
        "precomputedInferenceSource": {
          "$ref": "#/$defs/EvaluationPrecomputedInferenceSource"
        }
      },
      "description": "Exactly one member is set."
    },
    "EvaluationOutputDataConfig": {
      "type": "object",
      "properties": {
        "s3Uri": {
          "type": "string",
          "description": "The Amazon S3 URI where the results of the evaluation job are saved."
        }
      },
      "required": [
        "s3Uri"
      ]
    },
    "EvaluationPrecomputedInferenceSource": {
      "type": "object",
      "properties": {
        "inferenceSourceIdentifier": {
          "type": "string",
          "description": "A label that identifies a model used in a model evaluation job where you provide your own inference response data."
        }
      },
      "required": [
        "inferenceSourceIdentifier"
      ]
    },
    "EvaluationPrecomputedRagSourceConfig": {
      "type": "object",
      "properties": {
        "retrieveSourceConfig": {
          "$ref": "#/$defs/EvaluationPrecomputedRetrieveSourceConfig"
        },
        "retrieveAndGenerateSourceConfig": {
          "$ref": "#/$defs/EvaluationPrecomputedRetrieveAndGenerateSourceConfig"
        }
      },
      "description": "Exactly one member is set."
    },
    "EvaluationPrecomputedRetrieveAndGenerateSourceConfig": {
      "type": "object",
      "properties": {
        "ragSourceIdentifier": {
          "type": "string",
          "description": "A label that identifies the RAG source used for a retrieve-and-generate Knowledge Base evaluation job where you provide your own inference response data."
        }
      },
      "required": [
        "ragSourceIdentifier"
      ]
    },
    "EvaluationPrecomputedRetrieveSourceConfig": {
      "type": "object",
      "properties": {
        "ragSourceIdentifier": {
          "type": "string",
          "description": "A label that identifies the RAG source used for a retrieve-only Knowledge Base evaluation job where you provide your own inference response data."
        }
      },
      "required": [
        "ragSourceIdentifier"
      ]
    },
    "EvaluatorModelConfig": {
      "type": "object",
      "properties": {
        "bedrockEvaluatorModels": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BedrockEvaluatorModel"
          },
          "description": "The evaluator model used in knowledge base evaluation job or in model evaluation job that use a model as judge. This model computes all evaluation related metrics."
        }
      },
      "description": "Exactly one member is set."
    },
    "ExternalSource": {
      "type": "object",
      "properties": {
        "sourceType": {
          "type": "string",
          "enum": [
            "S3",
            "BYTE_CONTENT"
          ],
          "description": "The source type of the external source wrapper object."
        },
        "s3Location": {
          "$ref": "#/$defs/S3ObjectDoc"
        },
        "byteContent": {
          "$ref": "#/$defs/ByteContentDoc"
        }
      },
      "required": [
        "sourceType"
      ]
    },
    "ExternalSourcesGenerationConfiguration": {
      "type": "object",
      "properties": {
        "promptTemplate": {
          "$ref": "#/$defs/PromptTemplate"
        },
        "guardrailConfiguration": {
          "$ref": "#/$defs/GuardrailConfiguration"
        },
        "kbInferenceConfig": {
          "$ref": "#/$defs/KbInferenceConfig"
        },
        "additionalModelRequestFields": {
          "type": "object",
          "additionalProperties": {
            "type": "object"
          },
          "description": "Additional model parameters and their corresponding values not included in the text inference configuration for an external source. Takes in custom model parameters specific to the language model being used."
        }
      }
    },
    "ExternalSourcesRetrieveAndGenerateConfiguration": {
      "type": "object",
      "properties": {
        "modelArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the foundation model or inference profile used to generate responses."
        },
        "sources": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ExternalSource"
          },
          "description": "The document for the external source wrapper object in the retrieveAndGenerate function."
        },
        "generationConfiguration": {
          "$ref": "#/$defs/ExternalSourcesGenerationConfiguration"
        }
      },
      "required": [
        "modelArn",
        "sources"
      ]
    },
    "FieldForReranking": {
      "type": "object",
      "properties": {
        "fieldName": {
          "type": "string",
          "description": "The name of the metadata field to be used during the reranking process."
        }
      },
      "required": [
        "fieldName"
      ]
    },
    "FilterAttribute": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The name of metadata attribute/field, which must match the name in your data source/document metadata."
        },
        "value": {
          "type": "object",
          "description": "The value of the metadata attribute/field."
        }
      },
      "required": [
        "key",
        "value"
      ]
    },
    "GenerationConfiguration": {
      "type": "object",
      "properties": {
        "promptTemplate": {
          "$ref": "#/$defs/PromptTemplate"
        },
        "guardrailConfiguration": {
          "$ref": "#/$defs/GuardrailConfiguration"
        },
        "kbInferenceConfig": {
          "$ref": "#/$defs/KbInferenceConfig"
        },
        "additionalModelRequestFields": {
          "type": "object",
          "additionalProperties": {
            "type": "object"
          },
          "description": "Additional model parameters and corresponding values not included in the textInferenceConfig structure for a knowledge base. This allows you to provide custom model parameters specific to the language model being used."
        }
      }
    },
    "GuardrailConfiguration": {
      "type": "object",
      "properties": {
        "guardrailId": {
          "type": "string",
          "description": "The unique identifier for the guardrail."
        },
        "guardrailVersion": {
          "type": "string",
          "description": "The version of the guardrail."
        }
      },
      "required": [
        "guardrailId",
        "guardrailVersion"
      ]
    },
    "HumanEvaluationConfig": {
      "type": "object",
      "properties": {
        "humanWorkflowConfig": {
          "$ref": "#/$defs/HumanWorkflowConfig"
        },
        "customMetrics": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/HumanEvaluationCustomMetric"
          },
          "description": "A HumanEvaluationCustomMetric object. It contains the names the metrics, how the metrics are to be evaluated, an optional description."
        },
        "datasetMetricConfigs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EvaluationDatasetMetricConfig"
          },
          "description": "Use to specify the metrics, task, and prompt dataset to be used in your model evaluation job."
        }
      },
      "required": [
        "datasetMetricConfigs"
      ]
    },
    "HumanEvaluationCustomMetric": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the metric. Your human evaluators will see this name in the evaluation UI."
        },
        "description": {
          "type": "string",
          "description": "An optional description of the metric. Use this parameter to provide more details about the metric."
        },
        "ratingMethod": {
          "type": "string",
          "description": "Choose how you want your human workers to evaluation your model. Valid values for rating methods are ThumbsUpDown, IndividualLikertScale,ComparisonLikertScale, ComparisonChoice, and ComparisonRank"
        }
      },
      "required": [
        "name",
        "ratingMethod"
      ]
    },
    "HumanWorkflowConfig": {
      "type": "object",
      "properties": {
        "flowDefinitionArn": {
          "type": "string",
          "description": "The Amazon Resource Number (ARN) for the flow definition"
        },
        "instructions": {
          "type": "string",
          "description": "Instructions for the flow definition"
        }
      },
      "required": [
        "flowDefinitionArn"
      ]
    },
    "ImplicitFilterConfiguration": {
      "type": "object",
      "properties": {
        "metadataAttributes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MetadataAttributeSchema"
          },
          "description": "A list of metadata attribute schemas that define the structure and properties of metadata fields used for implicit filtering. Each attribute defines a key, type, and optional description."
        },
        "modelArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the foundation model used for implicit filtering. This model processes the query to extract relevant filtering criteria."
        }
      },
      "required": [
        "metadataAttributes",
        "modelArn"
      ]
    },
    "KbInferenceConfig": {
      "type": "object",
      "properties": {
        "textInferenceConfig": {
          "$ref": "#/$defs/TextInferenceConfig"
        }
      }
    },
    "KnowledgeBaseConfig": {
      "type": "object",
      "properties": {
        "retrieveConfig": {
          "$ref": "#/$defs/RetrieveConfig"
        },
        "retrieveAndGenerateConfig": {
          "$ref": "#/$defs/RetrieveAndGenerateConfiguration"
        }
      },
      "description": "Exactly one member is set."
    },
    "KnowledgeBaseRetrievalConfiguration": {
      "type": "object",
      "properties": {
        "vectorSearchConfiguration": {
          "$ref": "#/$defs/KnowledgeBaseVectorSearchConfiguration"
        }
      },
      "required": [
        "vectorSearchConfiguration"
      ]
    },
    "KnowledgeBaseRetrieveAndGenerateConfiguration": {
      "type": "object",
      "properties": {
        "knowledgeBaseId": {
          "type": "string",
          "description": "The unique identifier of the knowledge base."
        },
        "modelArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the foundation model or inference profile used to generate responses."
        },
        "retrievalConfiguration": {
          "$ref": "#/$defs/KnowledgeBaseRetrievalConfiguration"
        },
        "generationConfiguration": {
          "$ref": "#/$defs/GenerationConfiguration"
        },
        "orchestrationConfiguration": {
          "$ref": "#/$defs/OrchestrationConfiguration"
        }
      },
      "required": [
        "knowledgeBaseId",
        "modelArn"
      ]
    },
    "KnowledgeBaseVectorSearchConfiguration": {
      "type": "object",
      "properties": {
        "numberOfResults": {
          "type": "integer",
          "description": "The number of text chunks to retrieve; the number of results to return."
        },
        "overrideSearchType": {
          "type": "string",
          "enum": [
            "HYBRID",
            "SEMANTIC"
          ],
          "description": "By default, Amazon Bedrock decides a search strategy for you. If you're using an Amazon OpenSearch Serverless vector store that contains a filterable text field, you can specify whether to query the knowledge base with a HYBRID search using both vector embeddings and raw text, or SEMANTIC search using only vector embeddings. For other vector store configurations, only SEMANTIC search is available."
        },
        "filter": {
          "$ref": "#/$defs/RetrievalFilter"
        },
        "implicitFilterConfiguration": {
          "$ref": "#/$defs/ImplicitFilterConfiguration"
        },
        "rerankingConfiguration": {
          "$ref": "#/$defs/VectorSearchRerankingConfiguration"
        }
      }
    },
    "MetadataAttributeSchema": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The unique identifier for the metadata attribute. This key is used to reference the attribute in filter expressions and reranking configurations."
        },
        "type": {
          "type": "string",
          "enum": [
            "STRING",
            "NUMBER",
            "BOOLEAN",
            "STRING_LIST"
          ],
          "description": "The data type of the metadata attribute. The type determines how the attribute can be used in filter expressions and reranking."
        },
        "description": {
          "type": "string",
          "description": "An optional description of the metadata attribute that provides additional context about its purpose and usage."
        }
      },
      "required": [
        "key",
        "type",
        "description"
      ]
    },
    "MetadataConfigurationForReranking": {
      "type": "object",
      "properties": {
        "selectionMode": {
          "type": "string",
          "enum": [
            "SELECTIVE",
            "ALL"
          ],
          "description": "The mode for selecting which metadata fields to include in the reranking process. Valid values are ALL (use all available metadata fields) or SELECTIVE (use only specified fields)."
        },
        "selectiveModeConfiguration": {
          "$ref": "#/$defs/RerankingMetadataSelectiveModeConfiguration"
        }
      },
      "required": [
        "selectionMode"
      ]
    },
    "OrchestrationConfiguration": {
      "type": "object",
      "properties": {
        "queryTransformationConfiguration": {
          "$ref": "#/$defs/QueryTransformationConfiguration"
        }
      },
      "required": [
        "queryTransformationConfiguration"
      ]
    },
    "PerformanceConfiguration": {
      "type": "object",
      "properties": {
        "latency": {
          "type": "string",
          "enum": [
            "standard",
            "optimized"
          ],
          "description": "Specifies whether to use the latency-optimized or standard version of a model or inference profile."
        }
      }
    },
    "PromptTemplate": {
      "type": "object",
      "properties": {
        "textPromptTemplate": {
          "type": "string",
          "description": "The template for the prompt that's sent to the model for response generation. You can include prompt placeholders, which become replaced before the prompt is sent to the model to provide instructions and context to the model. In addition, you can include XML tags to delineate meaningful sections of the prompt template. For more information, see Knowledge base prompt template and Use XML tags with Anthropic Claude models."
        }
      }
    },
    "QueryTransformationConfiguration": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "QUERY_DECOMPOSITION"
          ],
          "description": "The type of transformation to apply to the prompt."
        }
      },
      "required": [
        "type"
      ]
    },
    "RAGConfig": {
      "type": "object",
      "properties": {
        "knowledgeBaseConfig": {
          "$ref": "#/$defs/KnowledgeBaseConfig"
        },
        "precomputedRagSourceConfig": {
          "$ref": "#/$defs/EvaluationPrecomputedRagSourceConfig"
        }
      },
      "description": "Exactly one member is set."
    },
    "RatingScaleItem": {
      "type": "object",
      "properties": {
        "definition": {
          "type": "string",
          "description": "Defines the definition for one rating in a custom metric rating scale."
        },
        "value": {
          "$ref": "#/$defs/RatingScaleItemValue"
        }
      },
      "required": [
        "definition",
        "value"
      ]
    },
    "RatingScaleItemValue": {
      "type": "object",
      "properties": {
        "stringValue": {
          "type": "string",
          "description": "A string representing the value for a rating in a custom metric rating scale."
        },
        "floatValue": {
          "type": "number",
          "description": "A floating point number representing the value for a rating in a custom metric rating scale."
        }
      },
      "description": "Exactly one member is set."
    },
    "RerankingMetadataSelectiveModeConfiguration": {
      "type": "object",
      "properties": {
        "fieldsToInclude": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FieldForReranking"
          },
          "description": "A list of metadata field names to explicitly include in the reranking process. Only these fields will be considered when reordering search results. This parameter cannot be used together with fieldsToExclude."
        },
        "fieldsToExclude": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FieldForReranking"
          },
          "description": "A list of metadata field names to explicitly exclude from the reranking process. All metadata fields except these will be considered when reordering search results. This parameter cannot be used together with fieldsToInclude."
        }
      },
      "description": "Exactly one member is set."
    },
    "RetrievalFilter": {
      "type": "object",
      "properties": {
        "equals": {
          "$ref": "#/$defs/FilterAttribute"
        },
        "notEquals": {
          "$ref": "#/$defs/FilterAttribute"
        },
        "greaterThan": {
          "$ref": "#/$defs/FilterAttribute"
        },
        "greaterThanOrEquals": {
          "$ref": "#/$defs/FilterAttribute"
        },
        "lessThan": {
          "$ref": "#/$defs/FilterAttribute"
        },
        "lessThanOrEquals": {
          "$ref": "#/$defs/FilterAttribute"
        },
        "in": {
          "$ref": "#/$defs/FilterAttribute"
        },
        "notIn": {
          "$ref": "#/$defs/FilterAttribute"
        },
        "startsWith": {
          "$ref": "#/$defs/FilterAttribute"
        },
        "listContains": {
          "$ref": "#/$defs/FilterAttribute"
        },
        "stringContains": {
          "$ref": "#/$defs/FilterAttribute"
        },
        "andAll": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RetrievalFilter"
          },
          "description": "Knowledge base data sources are returned if their metadata attributes fulfill all the filter conditions inside this list."
        },
        "orAll": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RetrievalFilter"
          },
          "description": "Knowledge base data sources are returned if their metadata attributes fulfill at least one of the filter conditions inside this list."
        }
      },
      "description": "Exactly one member is set."
    },
    "RetrieveAndGenerateConfiguration": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "KNOWLEDGE_BASE",
            "EXTERNAL_SOURCES"
          ],
          "description": "The type of resource that contains your data for retrieving information and generating responses. If you choose to use EXTERNAL_SOURCES, then currently only Claude 3 Sonnet models for knowledge bases are supported."
        },
        "knowledgeBaseConfiguration": {
          "$ref": "#/$defs/KnowledgeBaseRetrieveAndGenerateConfiguration"
        },
        "externalSourcesConfiguration": {
          "$ref": "#/$defs/ExternalSourcesRetrieveAndGenerateConfiguration"
        }
      },
      "required": [
        "type"
      ]
    },
    "RetrieveConfig": {
      "type": "object",
      "properties": {
        "knowledgeBaseId": {
          "type": "string",
          "description": "The unique identifier of the knowledge base."
        },
        "knowledgeBaseRetrievalConfiguration": {
          "$ref": "#/$defs/KnowledgeBaseRetrievalConfiguration"
        }
      },
      "required": [
        "knowledgeBaseId",
        "knowledgeBaseRetrievalConfiguration"
      ]
    },
    "S3ObjectDoc": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "description": "The S3 URI location for the wrapper object of the document."
        }
      },
      "required": [
        "uri"
      ]
    },
    "TextInferenceConfig": {
      "type": "object",
      "properties": {
        "temperature": {
          "type": "number",
          "description": "Controls the random-ness of text generated by the language model, influencing how much the model sticks to the most predictable next words versus exploring more surprising options. A lower temperature value (e.g. 0.2 or 0.3) makes model outputs more deterministic or predictable, while a higher temperature (e.g. 0.8 or 0.9) makes the outputs more creative or unpredictable."
        },
        "topP": {
          "type": "number",
          "description": "A probability distribution threshold which controls what the model considers for the set of possible next tokens. The model will only consider the top p% of the probability distribution when generating the next token."
        },
        "maxTokens": {
          "type": "integer",
          "description": "The maximum number of tokens to generate in the output text. Do not use the minimum of 0 or the maximum of 65536. The limit values described here are arbitrary values, for actual values consult the limits defined by your specific model."
        },
        "stopSequences": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of sequences of characters that, if generated, will cause the model to stop generating further tokens. Do not use a minimum length of 1 or a maximum length of 1000. The limit values described here are arbitrary values, for actual values consult the limits defined by your specific model."
        }
      }
    },
    "VectorSearchBedrockRerankingConfiguration": {
      "type": "object",
      "properties": {
        "modelConfiguration": {
          "$ref": "#/$defs/VectorSearchBedrockRerankingModelConfiguration"
        },
        "numberOfRerankedResults": {
          "type": "integer",
          "description": "The maximum number of results to rerank. This limits how many of the initial vector search results will be processed by the reranking model. A smaller number improves performance but may exclude potentially relevant results."
        },
        "metadataConfiguration": {
          "$ref": "#/$defs/MetadataConfigurationForReranking"
        }
      },
      "required": [
        "modelConfiguration"
      ]
    },
    "VectorSearchBedrockRerankingModelConfiguration": {
      "type": "object",
      "properties": {
        "modelArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the foundation model to use for reranking. This model processes the query and search results to determine a more relevant ordering."
        },
        "additionalModelRequestFields": {
          "type": "object",
          "additionalProperties": {
            "type": "object"
          },
          "description": "A list of additional fields to include in the model request during reranking. These fields provide extra context or configuration options specific to the selected foundation model."
        }
      },
      "required": [
        "modelArn"
      ]
    },
    "VectorSearchRerankingConfiguration": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "BEDROCK_RERANKING_MODEL"
          ],
          "description": "The type of reranking to apply to vector search results. Currently, the only supported value is BEDROCK, which uses Amazon Bedrock foundation models for reranking."
        },
        "bedrockRerankingConfiguration": {
          "$ref": "#/$defs/VectorSearchBedrockRerankingConfiguration"
        }
      },
      "required": [
        "type"
      ]
    }
  }
}