aws-sdk-bedrock 1.41.0 → 1.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87923521772094c9ec78f8e86a115fe80cc75f9094a6123b8d7d094fe4cbc07d
4
- data.tar.gz: 73e72424273ad3dc26502454113fa810107fba80b7e02a4ef69ebb6ba2730e05
3
+ metadata.gz: 9d0f164ba5fc2410b7f4f1e90bba72a55935b8968fa451d9a672a117b085a9a4
4
+ data.tar.gz: 3afc3e64b1a798f8f8755e0f827e82922350794c92e88e4de9f0f04875e2f73f
5
5
  SHA512:
6
- metadata.gz: 837e2fd591a620addc22e9f1e68947b679af09089f7663ee38e04c2eec6a58589b1828b462f92c1adf4fa3695ca2ccee62d53443680194ab4e4e75433cfeabd9
7
- data.tar.gz: 25c1c7e1756a78927a4836a66bdaf27dd443d6f0daa1aedfca9c68938c7569353fa11f0d78d67b31f30629bcc6da40c81d1e55466cf7bffe8b88f4e095304866
6
+ metadata.gz: 94dc660266ae76090c24be7ebbce195fe4c0745a4bf04187fd09bd107377f4cfb01d5e33b9517ddc9f236c0d21f84dccc74e4f57c21df6c6d921f03d77cbb58a
7
+ data.tar.gz: d09329fabb979c240e03bdc1f98364fdc033e27428e0b6aedbd3cb7e57211a447ad158b5467129d3ef17d6dca746488198b4cf40110ac3b8507309ce0f12059a
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.42.0 (2025-04-17)
5
+ ------------------
6
+
7
+ * Feature - With this release, Bedrock Evaluation will now support custom metrics for evaluation.
8
+
4
9
  1.41.0 (2025-04-07)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.41.0
1
+ 1.42.0
@@ -484,6 +484,35 @@ module Aws::Bedrock
484
484
  # * {Types::BatchDeleteEvaluationJobResponse#errors #errors} => Array<Types::BatchDeleteEvaluationJobError>
485
485
  # * {Types::BatchDeleteEvaluationJobResponse#evaluation_jobs #evaluation_jobs} => Array<Types::BatchDeleteEvaluationJobItem>
486
486
  #
487
+ #
488
+ # @example Example: Delete evaluation jobs
489
+ #
490
+ # # The following example shows a request to delete two model evaluation jobs, where one of the jobs is not found.
491
+ #
492
+ # resp = client.batch_delete_evaluation_job({
493
+ # job_identifiers: [
494
+ # "arn:aws:bedrock:us-east-2:123456789012:evaluation-job/12rnxmplqv0v",
495
+ # "arn:aws:bedrock:us-east-2:123456789012:evaluation-job/rispxmpl12rn",
496
+ # ],
497
+ # })
498
+ #
499
+ # resp.to_h outputs the following:
500
+ # {
501
+ # errors: [
502
+ # {
503
+ # code: "404",
504
+ # job_identifier: "arn:aws:bedrock:us-east-2:123456789012:evaluation-job/rispxmpl12rn",
505
+ # message: "Unable to locate this job to delete.",
506
+ # },
507
+ # ],
508
+ # evaluation_jobs: [
509
+ # {
510
+ # job_identifier: "arn:aws:bedrock:us-east-2:123456789012:evaluation-job/12rnxmplqv0v",
511
+ # job_status: "Deleting",
512
+ # },
513
+ # ],
514
+ # }
515
+ #
487
516
  # @example Request syntax with placeholder values
488
517
  #
489
518
  # resp = client.batch_delete_evaluation_job({
@@ -612,6 +641,32 @@ module Aws::Bedrock
612
641
  # },
613
642
  # ],
614
643
  # },
644
+ # custom_metric_config: {
645
+ # custom_metrics: [ # required
646
+ # {
647
+ # custom_metric_definition: {
648
+ # name: "MetricName", # required
649
+ # instructions: "CustomMetricInstructions", # required
650
+ # rating_scale: [
651
+ # {
652
+ # definition: "RatingScaleItemDefinition", # required
653
+ # value: { # required
654
+ # string_value: "RatingScaleItemValueStringValueString",
655
+ # float_value: 1.0,
656
+ # },
657
+ # },
658
+ # ],
659
+ # },
660
+ # },
661
+ # ],
662
+ # evaluator_model_config: { # required
663
+ # bedrock_evaluator_models: [ # required
664
+ # {
665
+ # model_identifier: "EvaluatorModelIdentifier", # required
666
+ # },
667
+ # ],
668
+ # },
669
+ # },
615
670
  # },
616
671
  # human: {
617
672
  # human_workflow_config: {
@@ -2367,6 +2422,15 @@ module Aws::Bedrock
2367
2422
  # resp.evaluation_config.automated.dataset_metric_configs[0].metric_names[0] #=> String
2368
2423
  # resp.evaluation_config.automated.evaluator_model_config.bedrock_evaluator_models #=> Array
2369
2424
  # resp.evaluation_config.automated.evaluator_model_config.bedrock_evaluator_models[0].model_identifier #=> String
2425
+ # resp.evaluation_config.automated.custom_metric_config.custom_metrics #=> Array
2426
+ # resp.evaluation_config.automated.custom_metric_config.custom_metrics[0].custom_metric_definition.name #=> String
2427
+ # resp.evaluation_config.automated.custom_metric_config.custom_metrics[0].custom_metric_definition.instructions #=> String
2428
+ # resp.evaluation_config.automated.custom_metric_config.custom_metrics[0].custom_metric_definition.rating_scale #=> Array
2429
+ # resp.evaluation_config.automated.custom_metric_config.custom_metrics[0].custom_metric_definition.rating_scale[0].definition #=> String
2430
+ # resp.evaluation_config.automated.custom_metric_config.custom_metrics[0].custom_metric_definition.rating_scale[0].value.string_value #=> String
2431
+ # resp.evaluation_config.automated.custom_metric_config.custom_metrics[0].custom_metric_definition.rating_scale[0].value.float_value #=> Float
2432
+ # resp.evaluation_config.automated.custom_metric_config.evaluator_model_config.bedrock_evaluator_models #=> Array
2433
+ # resp.evaluation_config.automated.custom_metric_config.evaluator_model_config.bedrock_evaluator_models[0].model_identifier #=> String
2370
2434
  # resp.evaluation_config.human.human_workflow_config.flow_definition_arn #=> String
2371
2435
  # resp.evaluation_config.human.human_workflow_config.instructions #=> String
2372
2436
  # resp.evaluation_config.human.custom_metrics #=> Array
@@ -3357,6 +3421,8 @@ module Aws::Bedrock
3357
3421
  # resp.job_summaries[0].rag_identifiers[0] #=> String
3358
3422
  # resp.job_summaries[0].evaluator_model_identifiers #=> Array
3359
3423
  # resp.job_summaries[0].evaluator_model_identifiers[0] #=> String
3424
+ # resp.job_summaries[0].custom_metrics_evaluator_model_identifiers #=> Array
3425
+ # resp.job_summaries[0].custom_metrics_evaluator_model_identifiers[0] #=> String
3360
3426
  # resp.job_summaries[0].inference_config_summary.model_config_summary.bedrock_model_identifiers #=> Array
3361
3427
  # resp.job_summaries[0].inference_config_summary.model_config_summary.bedrock_model_identifiers[0] #=> String
3362
3428
  # resp.job_summaries[0].inference_config_summary.model_config_summary.precomputed_inference_source_identifiers #=> Array
@@ -4029,7 +4095,7 @@ module Aws::Bedrock
4029
4095
  #
4030
4096
  # * Failed – This job has failed. Check the failure message for any
4031
4097
  # further details. For further assistance, reach out to the [Amazon
4032
- # Web Services Support Center][3].
4098
+ # Web ServicesSupport Center][3].
4033
4099
  #
4034
4100
  # * Stopped – This job was stopped by a user.
4035
4101
  #
@@ -4866,7 +4932,7 @@ module Aws::Bedrock
4866
4932
  tracer: tracer
4867
4933
  )
4868
4934
  context[:gem_name] = 'aws-sdk-bedrock'
4869
- context[:gem_version] = '1.41.0'
4935
+ context[:gem_version] = '1.42.0'
4870
4936
  Seahorse::Client::Request.new(handlers, context)
4871
4937
  end
4872
4938
 
@@ -23,6 +23,9 @@ module Aws::Bedrock
23
23
  ApplicationType = Shapes::StringShape.new(name: 'ApplicationType')
24
24
  Arn = Shapes::StringShape.new(name: 'Arn')
25
25
  AutomatedEvaluationConfig = Shapes::StructureShape.new(name: 'AutomatedEvaluationConfig')
26
+ AutomatedEvaluationCustomMetricConfig = Shapes::StructureShape.new(name: 'AutomatedEvaluationCustomMetricConfig')
27
+ AutomatedEvaluationCustomMetricSource = Shapes::UnionShape.new(name: 'AutomatedEvaluationCustomMetricSource')
28
+ AutomatedEvaluationCustomMetrics = Shapes::ListShape.new(name: 'AutomatedEvaluationCustomMetrics')
26
29
  BaseModelIdentifier = Shapes::StringShape.new(name: 'BaseModelIdentifier')
27
30
  BatchDeleteEvaluationJobError = Shapes::StructureShape.new(name: 'BatchDeleteEvaluationJobError')
28
31
  BatchDeleteEvaluationJobErrors = Shapes::ListShape.new(name: 'BatchDeleteEvaluationJobErrors')
@@ -65,6 +68,11 @@ module Aws::Bedrock
65
68
  CreatePromptRouterResponse = Shapes::StructureShape.new(name: 'CreatePromptRouterResponse')
66
69
  CreateProvisionedModelThroughputRequest = Shapes::StructureShape.new(name: 'CreateProvisionedModelThroughputRequest')
67
70
  CreateProvisionedModelThroughputResponse = Shapes::StructureShape.new(name: 'CreateProvisionedModelThroughputResponse')
71
+ CustomMetricBedrockEvaluatorModel = Shapes::StructureShape.new(name: 'CustomMetricBedrockEvaluatorModel')
72
+ CustomMetricBedrockEvaluatorModels = Shapes::ListShape.new(name: 'CustomMetricBedrockEvaluatorModels')
73
+ CustomMetricDefinition = Shapes::StructureShape.new(name: 'CustomMetricDefinition')
74
+ CustomMetricEvaluatorModelConfig = Shapes::StructureShape.new(name: 'CustomMetricEvaluatorModelConfig')
75
+ CustomMetricInstructions = Shapes::StringShape.new(name: 'CustomMetricInstructions')
68
76
  CustomModelArn = Shapes::StringShape.new(name: 'CustomModelArn')
69
77
  CustomModelName = Shapes::StringShape.new(name: 'CustomModelName')
70
78
  CustomModelSummary = Shapes::StructureShape.new(name: 'CustomModelSummary')
@@ -149,6 +157,7 @@ module Aws::Bedrock
149
157
  FilterKey = Shapes::StringShape.new(name: 'FilterKey')
150
158
  FilterValue = Shapes::DocumentShape.new(name: 'FilterValue', document: true)
151
159
  FineTuningJobStatus = Shapes::StringShape.new(name: 'FineTuningJobStatus')
160
+ Float = Shapes::FloatShape.new(name: 'Float')
152
161
  FoundationModelArn = Shapes::StringShape.new(name: 'FoundationModelArn')
153
162
  FoundationModelDetails = Shapes::StructureShape.new(name: 'FoundationModelDetails')
154
163
  FoundationModelLifecycle = Shapes::StructureShape.new(name: 'FoundationModelLifecycle')
@@ -350,6 +359,7 @@ module Aws::Bedrock
350
359
  MaxTokens = Shapes::IntegerShape.new(name: 'MaxTokens')
351
360
  Message = Shapes::StringShape.new(name: 'Message')
352
361
  MetricFloat = Shapes::FloatShape.new(name: 'MetricFloat')
362
+ MetricName = Shapes::StringShape.new(name: 'MetricName')
353
363
  ModelArchitecture = Shapes::StringShape.new(name: 'ModelArchitecture')
354
364
  ModelArn = Shapes::StringShape.new(name: 'ModelArn')
355
365
  ModelCopyJobArn = Shapes::StringShape.new(name: 'ModelCopyJobArn')
@@ -421,6 +431,11 @@ module Aws::Bedrock
421
431
  RAGStopSequences = Shapes::ListShape.new(name: 'RAGStopSequences')
422
432
  RAGStopSequencesMemberString = Shapes::StringShape.new(name: 'RAGStopSequencesMemberString')
423
433
  RagConfigs = Shapes::ListShape.new(name: 'RagConfigs')
434
+ RatingScale = Shapes::ListShape.new(name: 'RatingScale')
435
+ RatingScaleItem = Shapes::StructureShape.new(name: 'RatingScaleItem')
436
+ RatingScaleItemDefinition = Shapes::StringShape.new(name: 'RatingScaleItemDefinition')
437
+ RatingScaleItemValue = Shapes::UnionShape.new(name: 'RatingScaleItemValue')
438
+ RatingScaleItemValueStringValueString = Shapes::StringShape.new(name: 'RatingScaleItemValueStringValueString')
424
439
  RegisterMarketplaceModelEndpointRequest = Shapes::StructureShape.new(name: 'RegisterMarketplaceModelEndpointRequest')
425
440
  RegisterMarketplaceModelEndpointResponse = Shapes::StructureShape.new(name: 'RegisterMarketplaceModelEndpointResponse')
426
441
  RequestMetadataBaseFilters = Shapes::StructureShape.new(name: 'RequestMetadataBaseFilters')
@@ -509,8 +524,21 @@ module Aws::Bedrock
509
524
 
510
525
  AutomatedEvaluationConfig.add_member(:dataset_metric_configs, Shapes::ShapeRef.new(shape: EvaluationDatasetMetricConfigs, required: true, location_name: "datasetMetricConfigs"))
511
526
  AutomatedEvaluationConfig.add_member(:evaluator_model_config, Shapes::ShapeRef.new(shape: EvaluatorModelConfig, location_name: "evaluatorModelConfig"))
527
+ AutomatedEvaluationConfig.add_member(:custom_metric_config, Shapes::ShapeRef.new(shape: AutomatedEvaluationCustomMetricConfig, location_name: "customMetricConfig"))
512
528
  AutomatedEvaluationConfig.struct_class = Types::AutomatedEvaluationConfig
513
529
 
530
+ AutomatedEvaluationCustomMetricConfig.add_member(:custom_metrics, Shapes::ShapeRef.new(shape: AutomatedEvaluationCustomMetrics, required: true, location_name: "customMetrics"))
531
+ AutomatedEvaluationCustomMetricConfig.add_member(:evaluator_model_config, Shapes::ShapeRef.new(shape: CustomMetricEvaluatorModelConfig, required: true, location_name: "evaluatorModelConfig"))
532
+ AutomatedEvaluationCustomMetricConfig.struct_class = Types::AutomatedEvaluationCustomMetricConfig
533
+
534
+ AutomatedEvaluationCustomMetricSource.add_member(:custom_metric_definition, Shapes::ShapeRef.new(shape: CustomMetricDefinition, location_name: "customMetricDefinition"))
535
+ AutomatedEvaluationCustomMetricSource.add_member(:unknown, Shapes::ShapeRef.new(shape: nil, location_name: 'unknown'))
536
+ AutomatedEvaluationCustomMetricSource.add_member_subclass(:custom_metric_definition, Types::AutomatedEvaluationCustomMetricSource::CustomMetricDefinition)
537
+ AutomatedEvaluationCustomMetricSource.add_member_subclass(:unknown, Types::AutomatedEvaluationCustomMetricSource::Unknown)
538
+ AutomatedEvaluationCustomMetricSource.struct_class = Types::AutomatedEvaluationCustomMetricSource
539
+
540
+ AutomatedEvaluationCustomMetrics.member = Shapes::ShapeRef.new(shape: AutomatedEvaluationCustomMetricSource)
541
+
514
542
  BatchDeleteEvaluationJobError.add_member(:job_identifier, Shapes::ShapeRef.new(shape: EvaluationJobIdentifier, required: true, location_name: "jobIdentifier"))
515
543
  BatchDeleteEvaluationJobError.add_member(:code, Shapes::ShapeRef.new(shape: String, required: true, location_name: "code"))
516
544
  BatchDeleteEvaluationJobError.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "message"))
@@ -696,6 +724,19 @@ module Aws::Bedrock
696
724
  CreateProvisionedModelThroughputResponse.add_member(:provisioned_model_arn, Shapes::ShapeRef.new(shape: ProvisionedModelArn, required: true, location_name: "provisionedModelArn"))
697
725
  CreateProvisionedModelThroughputResponse.struct_class = Types::CreateProvisionedModelThroughputResponse
698
726
 
727
+ CustomMetricBedrockEvaluatorModel.add_member(:model_identifier, Shapes::ShapeRef.new(shape: EvaluatorModelIdentifier, required: true, location_name: "modelIdentifier"))
728
+ CustomMetricBedrockEvaluatorModel.struct_class = Types::CustomMetricBedrockEvaluatorModel
729
+
730
+ CustomMetricBedrockEvaluatorModels.member = Shapes::ShapeRef.new(shape: CustomMetricBedrockEvaluatorModel)
731
+
732
+ CustomMetricDefinition.add_member(:name, Shapes::ShapeRef.new(shape: MetricName, required: true, location_name: "name"))
733
+ CustomMetricDefinition.add_member(:instructions, Shapes::ShapeRef.new(shape: CustomMetricInstructions, required: true, location_name: "instructions"))
734
+ CustomMetricDefinition.add_member(:rating_scale, Shapes::ShapeRef.new(shape: RatingScale, location_name: "ratingScale"))
735
+ CustomMetricDefinition.struct_class = Types::CustomMetricDefinition
736
+
737
+ CustomMetricEvaluatorModelConfig.add_member(:bedrock_evaluator_models, Shapes::ShapeRef.new(shape: CustomMetricBedrockEvaluatorModels, required: true, location_name: "bedrockEvaluatorModels"))
738
+ CustomMetricEvaluatorModelConfig.struct_class = Types::CustomMetricEvaluatorModelConfig
739
+
699
740
  CustomModelSummary.add_member(:model_arn, Shapes::ShapeRef.new(shape: CustomModelArn, required: true, location_name: "modelArn"))
700
741
  CustomModelSummary.add_member(:model_name, Shapes::ShapeRef.new(shape: CustomModelName, required: true, location_name: "modelName"))
701
742
  CustomModelSummary.add_member(:creation_time, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "creationTime"))
@@ -873,9 +914,10 @@ module Aws::Bedrock
873
914
  EvaluationSummary.add_member(:creation_time, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "creationTime"))
874
915
  EvaluationSummary.add_member(:job_type, Shapes::ShapeRef.new(shape: EvaluationJobType, required: true, location_name: "jobType"))
875
916
  EvaluationSummary.add_member(:evaluation_task_types, Shapes::ShapeRef.new(shape: EvaluationTaskTypes, required: true, location_name: "evaluationTaskTypes"))
876
- EvaluationSummary.add_member(:model_identifiers, Shapes::ShapeRef.new(shape: EvaluationBedrockModelIdentifiers, deprecated: true, location_name: "modelIdentifiers", metadata: {"deprecatedMessage"=>"Inference identifiers should be retrieved from the inferenceConfigSummary"}))
877
- EvaluationSummary.add_member(:rag_identifiers, Shapes::ShapeRef.new(shape: EvaluationBedrockKnowledgeBaseIdentifiers, deprecated: true, location_name: "ragIdentifiers", metadata: {"deprecatedMessage"=>"Inference identifiers should be retrieved from the inferenceConfigSummary"}))
917
+ EvaluationSummary.add_member(:model_identifiers, Shapes::ShapeRef.new(shape: EvaluationBedrockModelIdentifiers, deprecated: true, location_name: "modelIdentifiers", metadata: {"deprecatedMessage"=>"Inference identifiers should be retrieved from the inferenceConfigSummary", "deprecatedSince"=>"2025-03-07"}))
918
+ EvaluationSummary.add_member(:rag_identifiers, Shapes::ShapeRef.new(shape: EvaluationBedrockKnowledgeBaseIdentifiers, deprecated: true, location_name: "ragIdentifiers", metadata: {"deprecatedMessage"=>"Inference identifiers should be retrieved from the inferenceConfigSummary", "deprecatedSince"=>"2025-03-07"}))
878
919
  EvaluationSummary.add_member(:evaluator_model_identifiers, Shapes::ShapeRef.new(shape: EvaluatorModelIdentifiers, location_name: "evaluatorModelIdentifiers"))
920
+ EvaluationSummary.add_member(:custom_metrics_evaluator_model_identifiers, Shapes::ShapeRef.new(shape: EvaluatorModelIdentifiers, location_name: "customMetricsEvaluatorModelIdentifiers"))
879
921
  EvaluationSummary.add_member(:inference_config_summary, Shapes::ShapeRef.new(shape: EvaluationInferenceConfigSummary, location_name: "inferenceConfigSummary"))
880
922
  EvaluationSummary.add_member(:application_type, Shapes::ShapeRef.new(shape: ApplicationType, location_name: "applicationType"))
881
923
  EvaluationSummary.struct_class = Types::EvaluationSummary
@@ -1824,6 +1866,20 @@ module Aws::Bedrock
1824
1866
 
1825
1867
  RagConfigs.member = Shapes::ShapeRef.new(shape: RAGConfig)
1826
1868
 
1869
+ RatingScale.member = Shapes::ShapeRef.new(shape: RatingScaleItem)
1870
+
1871
+ RatingScaleItem.add_member(:definition, Shapes::ShapeRef.new(shape: RatingScaleItemDefinition, required: true, location_name: "definition"))
1872
+ RatingScaleItem.add_member(:value, Shapes::ShapeRef.new(shape: RatingScaleItemValue, required: true, location_name: "value"))
1873
+ RatingScaleItem.struct_class = Types::RatingScaleItem
1874
+
1875
+ RatingScaleItemValue.add_member(:string_value, Shapes::ShapeRef.new(shape: RatingScaleItemValueStringValueString, location_name: "stringValue"))
1876
+ RatingScaleItemValue.add_member(:float_value, Shapes::ShapeRef.new(shape: Float, location_name: "floatValue"))
1877
+ RatingScaleItemValue.add_member(:unknown, Shapes::ShapeRef.new(shape: nil, location_name: 'unknown'))
1878
+ RatingScaleItemValue.add_member_subclass(:string_value, Types::RatingScaleItemValue::StringValue)
1879
+ RatingScaleItemValue.add_member_subclass(:float_value, Types::RatingScaleItemValue::FloatValue)
1880
+ RatingScaleItemValue.add_member_subclass(:unknown, Types::RatingScaleItemValue::Unknown)
1881
+ RatingScaleItemValue.struct_class = Types::RatingScaleItemValue
1882
+
1827
1883
  RegisterMarketplaceModelEndpointRequest.add_member(:endpoint_identifier, Shapes::ShapeRef.new(shape: Arn, required: true, location: "uri", location_name: "endpointIdentifier"))
1828
1884
  RegisterMarketplaceModelEndpointRequest.add_member(:model_source_identifier, Shapes::ShapeRef.new(shape: ModelSourceIdentifier, required: true, location_name: "modelSourceIdentifier"))
1829
1885
  RegisterMarketplaceModelEndpointRequest.struct_class = Types::RegisterMarketplaceModelEndpointRequest
@@ -39,15 +39,76 @@ module Aws::Bedrock
39
39
  # This model computes all evaluation related metrics.
40
40
  # @return [Types::EvaluatorModelConfig]
41
41
  #
42
+ # @!attribute [rw] custom_metric_config
43
+ # Defines the configuration of custom metrics to be used in an
44
+ # evaluation job.
45
+ # @return [Types::AutomatedEvaluationCustomMetricConfig]
46
+ #
42
47
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/AutomatedEvaluationConfig AWS API Documentation
43
48
  #
44
49
  class AutomatedEvaluationConfig < Struct.new(
45
50
  :dataset_metric_configs,
51
+ :evaluator_model_config,
52
+ :custom_metric_config)
53
+ SENSITIVE = []
54
+ include Aws::Structure
55
+ end
56
+
57
+ # Defines the configuration of custom metrics to be used in an
58
+ # evaluation job. To learn more about using custom metrics in Amazon
59
+ # Bedrock evaluation jobs, see [Create a prompt for a custom metrics
60
+ # (LLM-as-a-judge model evaluations)][1] and [Create a prompt for a
61
+ # custom metrics (RAG evaluations)][2].
62
+ #
63
+ #
64
+ #
65
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-evaluation-custom-metrics-prompt-formats.html
66
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-evaluation-custom-metrics-prompt-formats.html
67
+ #
68
+ # @!attribute [rw] custom_metrics
69
+ # Defines a list of custom metrics to be used in an Amazon Bedrock
70
+ # evaluation job.
71
+ # @return [Array<Types::AutomatedEvaluationCustomMetricSource>]
72
+ #
73
+ # @!attribute [rw] evaluator_model_config
74
+ # Configuration of the evaluator model you want to use to evaluate
75
+ # custom metrics in an Amazon Bedrock evaluation job.
76
+ # @return [Types::CustomMetricEvaluatorModelConfig]
77
+ #
78
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/AutomatedEvaluationCustomMetricConfig AWS API Documentation
79
+ #
80
+ class AutomatedEvaluationCustomMetricConfig < Struct.new(
81
+ :custom_metrics,
46
82
  :evaluator_model_config)
47
83
  SENSITIVE = []
48
84
  include Aws::Structure
49
85
  end
50
86
 
87
+ # An array item definining a single custom metric for use in an Amazon
88
+ # Bedrock evaluation job.
89
+ #
90
+ # @note AutomatedEvaluationCustomMetricSource is a union - when making an API calls you must set exactly one of the members.
91
+ #
92
+ # @note AutomatedEvaluationCustomMetricSource is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of AutomatedEvaluationCustomMetricSource corresponding to the set member.
93
+ #
94
+ # @!attribute [rw] custom_metric_definition
95
+ # The definition of a custom metric for use in an Amazon Bedrock
96
+ # evaluation job.
97
+ # @return [Types::CustomMetricDefinition]
98
+ #
99
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/AutomatedEvaluationCustomMetricSource AWS API Documentation
100
+ #
101
+ class AutomatedEvaluationCustomMetricSource < Struct.new(
102
+ :custom_metric_definition,
103
+ :unknown)
104
+ SENSITIVE = [:custom_metric_definition]
105
+ include Aws::Structure
106
+ include Aws::Structure::Union
107
+
108
+ class CustomMetricDefinition < AutomatedEvaluationCustomMetricSource; end
109
+ class Unknown < AutomatedEvaluationCustomMetricSource; end
110
+ end
111
+
51
112
  # A JSON array that provides the status of the evaluation jobs being
52
113
  # deleted.
53
114
  #
@@ -1101,6 +1162,95 @@ module Aws::Bedrock
1101
1162
  include Aws::Structure
1102
1163
  end
1103
1164
 
1165
+ # Defines the model you want to evaluate custom metrics in an Amazon
1166
+ # Bedrock evaluation job.
1167
+ #
1168
+ # @!attribute [rw] model_identifier
1169
+ # The Amazon Resource Name (ARN) of the evaluator model for custom
1170
+ # metrics. For a list of supported evaluator models, see [Evaluate
1171
+ # model performance using another LLM as a judge][1] and [Evaluate the
1172
+ # performance of RAG sources using Amazon Bedrock evaluations][2].
1173
+ #
1174
+ #
1175
+ #
1176
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/evaluation-judge.html
1177
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/evaluation-kb.html
1178
+ # @return [String]
1179
+ #
1180
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/CustomMetricBedrockEvaluatorModel AWS API Documentation
1181
+ #
1182
+ class CustomMetricBedrockEvaluatorModel < Struct.new(
1183
+ :model_identifier)
1184
+ SENSITIVE = []
1185
+ include Aws::Structure
1186
+ end
1187
+
1188
+ # The definition of a custom metric for use in an Amazon Bedrock
1189
+ # evaluation job. A custom metric definition includes a metric name,
1190
+ # prompt (instructions) and optionally, a rating scale. Your prompt must
1191
+ # include a task description and input variables. The required input
1192
+ # variables are different for model-as-a-judge and RAG evaluations.
1193
+ #
1194
+ # For more information about how to define a custom metric in Amazon
1195
+ # Bedrock, see [Create a prompt for a custom metrics (LLM-as-a-judge
1196
+ # model evaluations)][1] and [Create a prompt for a custom metrics (RAG
1197
+ # evaluations)][2].
1198
+ #
1199
+ #
1200
+ #
1201
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-evaluation-custom-metrics-prompt-formats.html
1202
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-evaluation-custom-metrics-prompt-formats.html
1203
+ #
1204
+ # @!attribute [rw] name
1205
+ # The name for a custom metric. Names must be unique in your Amazon
1206
+ # Web Services region.
1207
+ # @return [String]
1208
+ #
1209
+ # @!attribute [rw] instructions
1210
+ # The prompt for a custom metric that instructs the evaluator model
1211
+ # how to rate the model or RAG source under evaluation.
1212
+ # @return [String]
1213
+ #
1214
+ # @!attribute [rw] rating_scale
1215
+ # Defines the rating scale to be used for a custom metric. We
1216
+ # recommend that you always define a ratings scale when creating a
1217
+ # custom metric. If you don't define a scale, Amazon Bedrock won't
1218
+ # be able to visually display the results of the evaluation in the
1219
+ # console or calculate average values of numerical scores. For more
1220
+ # information on specifying a rating scale, see [Specifying an output
1221
+ # schema (rating scale)][1].
1222
+ #
1223
+ #
1224
+ #
1225
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-evaluation-custom-metrics-prompt-formats.html#model-evaluation-custom-metrics-prompt-formats-schema
1226
+ # @return [Array<Types::RatingScaleItem>]
1227
+ #
1228
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/CustomMetricDefinition AWS API Documentation
1229
+ #
1230
+ class CustomMetricDefinition < Struct.new(
1231
+ :name,
1232
+ :instructions,
1233
+ :rating_scale)
1234
+ SENSITIVE = [:name]
1235
+ include Aws::Structure
1236
+ end
1237
+
1238
+ # Configuration of the evaluator model you want to use to evaluate
1239
+ # custom metrics in an Amazon Bedrock evaluation job.
1240
+ #
1241
+ # @!attribute [rw] bedrock_evaluator_models
1242
+ # Defines the model you want to evaluate custom metrics in an Amazon
1243
+ # Bedrock evaluation job.
1244
+ # @return [Array<Types::CustomMetricBedrockEvaluatorModel>]
1245
+ #
1246
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/CustomMetricEvaluatorModelConfig AWS API Documentation
1247
+ #
1248
+ class CustomMetricEvaluatorModelConfig < Struct.new(
1249
+ :bedrock_evaluator_models)
1250
+ SENSITIVE = []
1251
+ include Aws::Structure
1252
+ end
1253
+
1104
1254
  # Summary information for a custom model.
1105
1255
  #
1106
1256
  # @!attribute [rw] model_arn
@@ -1526,7 +1676,7 @@ module Aws::Bedrock
1526
1676
  #
1527
1677
  # For knowledge base evaluation jobs that evaluate retrieval only,
1528
1678
  # valid values are "`Builtin.ContextRelevance`",
1529
- # "`Builtin.ContextConverage`".
1679
+ # "`Builtin.ContextCoverage`".
1530
1680
  #
1531
1681
  # For knowledge base evaluation jobs that evaluate retrieval with
1532
1682
  # response generation, valid values are "`Builtin.Correctness`",
@@ -1847,6 +1997,11 @@ module Aws::Bedrock
1847
1997
  # metrics for a knowledge base evaluation job.
1848
1998
  # @return [Array<String>]
1849
1999
  #
2000
+ # @!attribute [rw] custom_metrics_evaluator_model_identifiers
2001
+ # The Amazon Resource Names (ARNs) of the models used to compute
2002
+ # custom metrics in an Amazon Bedrock evaluation job.
2003
+ # @return [Array<String>]
2004
+ #
1850
2005
  # @!attribute [rw] inference_config_summary
1851
2006
  # Identifies the models, Knowledge Bases, or other RAG sources
1852
2007
  # evaluated in a model or Knowledge Base evaluation job.
@@ -1869,6 +2024,7 @@ module Aws::Bedrock
1869
2024
  :model_identifiers,
1870
2025
  :rag_identifiers,
1871
2026
  :evaluator_model_identifiers,
2027
+ :custom_metrics_evaluator_model_identifiers,
1872
2028
  :inference_config_summary,
1873
2029
  :application_type)
1874
2030
  SENSITIVE = []
@@ -3089,7 +3245,7 @@ module Aws::Bedrock
3089
3245
  #
3090
3246
  # * Failed – This job has failed. Check the failure message for any
3091
3247
  # further details. For further assistance, reach out to the [Amazon
3092
- # Web Services Support Center][3].
3248
+ # Web ServicesSupport Center][3].
3093
3249
  #
3094
3250
  # * Stopped – This job was stopped by a user.
3095
3251
  #
@@ -5895,7 +6051,7 @@ module Aws::Bedrock
5895
6051
  #
5896
6052
  # * Failed – This job has failed. Check the failure message for any
5897
6053
  # further details. For further assistance, reach out to the [Amazon
5898
- # Web Services Support Center][3].
6054
+ # Web ServicesSupport Center][3].
5899
6055
  #
5900
6056
  # * Stopped – This job was stopped by a user.
5901
6057
  #
@@ -6651,7 +6807,7 @@ module Aws::Bedrock
6651
6807
  #
6652
6808
  # * Failed – This job has failed. Check the failure message for any
6653
6809
  # further details. For further assistance, reach out to the [Amazon
6654
- # Web Services Support Center][3].
6810
+ # Web ServicesSupport Center][3].
6655
6811
  #
6656
6812
  # * Stopped – This job was stopped by a user.
6657
6813
  #
@@ -7023,6 +7179,58 @@ module Aws::Bedrock
7023
7179
  class Unknown < RAGConfig; end
7024
7180
  end
7025
7181
 
7182
+ # Defines the value and corresponding definition for one rating in a
7183
+ # custom metric rating scale.
7184
+ #
7185
+ # @!attribute [rw] definition
7186
+ # Defines the definition for one rating in a custom metric rating
7187
+ # scale.
7188
+ # @return [String]
7189
+ #
7190
+ # @!attribute [rw] value
7191
+ # Defines the value for one rating in a custom metric rating scale.
7192
+ # @return [Types::RatingScaleItemValue]
7193
+ #
7194
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/RatingScaleItem AWS API Documentation
7195
+ #
7196
+ class RatingScaleItem < Struct.new(
7197
+ :definition,
7198
+ :value)
7199
+ SENSITIVE = []
7200
+ include Aws::Structure
7201
+ end
7202
+
7203
+ # Defines the value for one rating in a custom metric rating scale.
7204
+ #
7205
+ # @note RatingScaleItemValue is a union - when making an API calls you must set exactly one of the members.
7206
+ #
7207
+ # @note RatingScaleItemValue is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of RatingScaleItemValue corresponding to the set member.
7208
+ #
7209
+ # @!attribute [rw] string_value
7210
+ # A string representing the value for a rating in a custom metric
7211
+ # rating scale.
7212
+ # @return [String]
7213
+ #
7214
+ # @!attribute [rw] float_value
7215
+ # A floating point number representing the value for a rating in a
7216
+ # custom metric rating scale.
7217
+ # @return [Float]
7218
+ #
7219
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/RatingScaleItemValue AWS API Documentation
7220
+ #
7221
+ class RatingScaleItemValue < Struct.new(
7222
+ :string_value,
7223
+ :float_value,
7224
+ :unknown)
7225
+ SENSITIVE = []
7226
+ include Aws::Structure
7227
+ include Aws::Structure::Union
7228
+
7229
+ class StringValue < RatingScaleItemValue; end
7230
+ class FloatValue < RatingScaleItemValue; end
7231
+ class Unknown < RatingScaleItemValue; end
7232
+ end
7233
+
7026
7234
  # @!attribute [rw] endpoint_identifier
7027
7235
  # The ARN of the Amazon SageMaker endpoint you want to register with
7028
7236
  # Amazon Bedrock Marketplace.
@@ -55,7 +55,7 @@ module Aws::Bedrock
55
55
  autoload :EndpointProvider, 'aws-sdk-bedrock/endpoint_provider'
56
56
  autoload :Endpoints, 'aws-sdk-bedrock/endpoints'
57
57
 
58
- GEM_VERSION = '1.41.0'
58
+ GEM_VERSION = '1.42.0'
59
59
 
60
60
  end
61
61
 
data/sig/client.rbs CHANGED
@@ -126,6 +126,32 @@ module Aws
126
126
  model_identifier: ::String
127
127
  },
128
128
  ]?
129
+ }?,
130
+ custom_metric_config: {
131
+ custom_metrics: Array[
132
+ {
133
+ custom_metric_definition: {
134
+ name: ::String,
135
+ instructions: ::String,
136
+ rating_scale: Array[
137
+ {
138
+ definition: ::String,
139
+ value: {
140
+ string_value: ::String?,
141
+ float_value: ::Float?
142
+ }
143
+ },
144
+ ]?
145
+ }?
146
+ },
147
+ ],
148
+ evaluator_model_config: {
149
+ bedrock_evaluator_models: Array[
150
+ {
151
+ model_identifier: ::String
152
+ },
153
+ ]
154
+ }
129
155
  }?
130
156
  }?,
131
157
  human: {
data/sig/types.rbs CHANGED
@@ -16,9 +16,27 @@ module Aws::Bedrock
16
16
  class AutomatedEvaluationConfig
17
17
  attr_accessor dataset_metric_configs: ::Array[Types::EvaluationDatasetMetricConfig]
18
18
  attr_accessor evaluator_model_config: Types::EvaluatorModelConfig
19
+ attr_accessor custom_metric_config: Types::AutomatedEvaluationCustomMetricConfig
19
20
  SENSITIVE: []
20
21
  end
21
22
 
23
+ class AutomatedEvaluationCustomMetricConfig
24
+ attr_accessor custom_metrics: ::Array[Types::AutomatedEvaluationCustomMetricSource]
25
+ attr_accessor evaluator_model_config: Types::CustomMetricEvaluatorModelConfig
26
+ SENSITIVE: []
27
+ end
28
+
29
+ class AutomatedEvaluationCustomMetricSource
30
+ attr_accessor custom_metric_definition: Types::CustomMetricDefinition
31
+ attr_accessor unknown: untyped
32
+ SENSITIVE: [:custom_metric_definition]
33
+
34
+ class CustomMetricDefinition < AutomatedEvaluationCustomMetricSource
35
+ end
36
+ class Unknown < AutomatedEvaluationCustomMetricSource
37
+ end
38
+ end
39
+
22
40
  class BatchDeleteEvaluationJobError
23
41
  attr_accessor job_identifier: ::String
24
42
  attr_accessor code: ::String
@@ -258,6 +276,23 @@ module Aws::Bedrock
258
276
  SENSITIVE: []
259
277
  end
260
278
 
279
+ class CustomMetricBedrockEvaluatorModel
280
+ attr_accessor model_identifier: ::String
281
+ SENSITIVE: []
282
+ end
283
+
284
+ class CustomMetricDefinition
285
+ attr_accessor name: ::String
286
+ attr_accessor instructions: ::String
287
+ attr_accessor rating_scale: ::Array[Types::RatingScaleItem]
288
+ SENSITIVE: [:name]
289
+ end
290
+
291
+ class CustomMetricEvaluatorModelConfig
292
+ attr_accessor bedrock_evaluator_models: ::Array[Types::CustomMetricBedrockEvaluatorModel]
293
+ SENSITIVE: []
294
+ end
295
+
261
296
  class CustomModelSummary
262
297
  attr_accessor model_arn: ::String
263
298
  attr_accessor model_name: ::String
@@ -508,6 +543,7 @@ module Aws::Bedrock
508
543
  attr_accessor model_identifiers: ::Array[::String]
509
544
  attr_accessor rag_identifiers: ::Array[::String]
510
545
  attr_accessor evaluator_model_identifiers: ::Array[::String]
546
+ attr_accessor custom_metrics_evaluator_model_identifiers: ::Array[::String]
511
547
  attr_accessor inference_config_summary: Types::EvaluationInferenceConfigSummary
512
548
  attr_accessor application_type: ("ModelEvaluation" | "RagEvaluation")
513
549
  SENSITIVE: []
@@ -1656,6 +1692,26 @@ module Aws::Bedrock
1656
1692
  end
1657
1693
  end
1658
1694
 
1695
+ class RatingScaleItem
1696
+ attr_accessor definition: ::String
1697
+ attr_accessor value: Types::RatingScaleItemValue
1698
+ SENSITIVE: []
1699
+ end
1700
+
1701
+ class RatingScaleItemValue
1702
+ attr_accessor string_value: ::String
1703
+ attr_accessor float_value: ::Float
1704
+ attr_accessor unknown: untyped
1705
+ SENSITIVE: []
1706
+
1707
+ class StringValue < RatingScaleItemValue
1708
+ end
1709
+ class FloatValue < RatingScaleItemValue
1710
+ end
1711
+ class Unknown < RatingScaleItemValue
1712
+ end
1713
+ end
1714
+
1659
1715
  class RegisterMarketplaceModelEndpointRequest
1660
1716
  attr_accessor endpoint_identifier: ::String
1661
1717
  attr_accessor model_source_identifier: ::String
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-bedrock
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.41.0
4
+ version: 1.42.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-07 00:00:00.000000000 Z
11
+ date: 2025-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core