Interface CustomMetricDefinition.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<CustomMetricDefinition.Builder,CustomMetricDefinition>,SdkBuilder<CustomMetricDefinition.Builder,CustomMetricDefinition>,SdkPojo
- Enclosing class:
- CustomMetricDefinition
@Mutable @NotThreadSafe public static interface CustomMetricDefinition.Builder extends SdkPojo, CopyableBuilder<CustomMetricDefinition.Builder,CustomMetricDefinition>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CustomMetricDefinition.Builderinstructions(String instructions)The prompt for a custom metric that instructs the evaluator model how to rate the model or RAG source under evaluation.CustomMetricDefinition.Buildername(String name)The name for a custom metric.CustomMetricDefinition.BuilderratingScale(Collection<RatingScaleItem> ratingScale)Defines the rating scale to be used for a custom metric.CustomMetricDefinition.BuilderratingScale(Consumer<RatingScaleItem.Builder>... ratingScale)Defines the rating scale to be used for a custom metric.CustomMetricDefinition.BuilderratingScale(RatingScaleItem... ratingScale)Defines the rating scale to be used for a custom metric.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
-
-
-
Method Detail
-
name
CustomMetricDefinition.Builder name(String name)
The name for a custom metric. Names must be unique in your Amazon Web Services region.
- Parameters:
name- The name for a custom metric. Names must be unique in your Amazon Web Services region.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
instructions
CustomMetricDefinition.Builder instructions(String instructions)
The prompt for a custom metric that instructs the evaluator model how to rate the model or RAG source under evaluation.
- Parameters:
instructions- The prompt for a custom metric that instructs the evaluator model how to rate the model or RAG source under evaluation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ratingScale
CustomMetricDefinition.Builder ratingScale(Collection<RatingScaleItem> ratingScale)
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).
- Parameters:
ratingScale- 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).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ratingScale
CustomMetricDefinition.Builder ratingScale(RatingScaleItem... ratingScale)
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).
- Parameters:
ratingScale- 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).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ratingScale
CustomMetricDefinition.Builder ratingScale(Consumer<RatingScaleItem.Builder>... ratingScale)
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).
This is a convenience method that creates an instance of theRatingScaleItem.Builderavoiding the need to create one manually viaRatingScaleItem.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#ratingScale(List.) - Parameters:
ratingScale- a consumer that will call methods onRatingScaleItem.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#ratingScale(java.util.Collection)
-
-