Interface EvaluationResultContent.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<EvaluationResultContent.Builder,,EvaluationResultContent> SdkBuilder<EvaluationResultContent.Builder,,EvaluationResultContent> SdkPojo
- Enclosing class:
EvaluationResultContent
-
Method Summary
Modifier and TypeMethodDescriptiondefault EvaluationResultContent.Buildercontext(Consumer<Context.Builder> context) The contextual information associated with this evaluation result, including span context details that identify the specific traces and sessions that were evaluated.The contextual information associated with this evaluation result, including span context details that identify the specific traces and sessions that were evaluated.The error code indicating the type of failure that occurred during evaluation.errorMessage(String errorMessage) The error message describing what went wrong if the evaluation failed.evaluatorArn(String evaluatorArn) The Amazon Resource Name (ARN) of the evaluator used to generate this result.evaluatorId(String evaluatorId) The unique identifier of the evaluator that produced this result.evaluatorName(String evaluatorName) The human-readable name of the evaluator used for this evaluation.explanation(String explanation) The detailed explanation provided by the evaluator describing the reasoning behind the assigned score.The categorical label assigned by the evaluator when using a categorical rating scale.default EvaluationResultContent.BuildertokenUsage(Consumer<TokenUsage.Builder> tokenUsage) The token consumption statistics for this evaluation, including input tokens, output tokens, and total tokens used by the underlying language model during the evaluation process.tokenUsage(TokenUsage tokenUsage) The token consumption statistics for this evaluation, including input tokens, output tokens, and total tokens used by the underlying language model during the evaluation process.The numerical score assigned by the evaluator according to its configured rating scale.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
evaluatorArn
The Amazon Resource Name (ARN) of the evaluator used to generate this result. For custom evaluators, this is the full ARN; for built-in evaluators, this follows the pattern
Builtin.{EvaluatorName}.- Parameters:
evaluatorArn- The Amazon Resource Name (ARN) of the evaluator used to generate this result. For custom evaluators, this is the full ARN; for built-in evaluators, this follows the patternBuiltin.{EvaluatorName}.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
evaluatorId
The unique identifier of the evaluator that produced this result. This matches the
evaluatorIdprovided in the evaluation request and can be used to identify which evaluator generated specific results.- Parameters:
evaluatorId- The unique identifier of the evaluator that produced this result. This matches theevaluatorIdprovided in the evaluation request and can be used to identify which evaluator generated specific results.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
evaluatorName
The human-readable name of the evaluator used for this evaluation. For built-in evaluators, this is the descriptive name (e.g., "Helpfulness", "Correctness"); for custom evaluators, this is the user-defined name.
- Parameters:
evaluatorName- The human-readable name of the evaluator used for this evaluation. For built-in evaluators, this is the descriptive name (e.g., "Helpfulness", "Correctness"); for custom evaluators, this is the user-defined name.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
explanation
The detailed explanation provided by the evaluator describing the reasoning behind the assigned score. This qualitative feedback helps understand why specific ratings were given and provides actionable insights for improvement.
- Parameters:
explanation- The detailed explanation provided by the evaluator describing the reasoning behind the assigned score. This qualitative feedback helps understand why specific ratings were given and provides actionable insights for improvement.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
context
The contextual information associated with this evaluation result, including span context details that identify the specific traces and sessions that were evaluated.
- Parameters:
context- The contextual information associated with this evaluation result, including span context details that identify the specific traces and sessions that were evaluated.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
context
The contextual information associated with this evaluation result, including span context details that identify the specific traces and sessions that were evaluated.
This is a convenience method that creates an instance of theContext.Builderavoiding the need to create one manually viaContext.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tocontext(Context).- Parameters:
context- a consumer that will call methods onContext.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
value
The numerical score assigned by the evaluator according to its configured rating scale. For numerical scales, this is a decimal value within the defined range. This field is not allowed for categorical scales.
- Parameters:
value- The numerical score assigned by the evaluator according to its configured rating scale. For numerical scales, this is a decimal value within the defined range. This field is not allowed for categorical scales.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
label
The categorical label assigned by the evaluator when using a categorical rating scale. This provides a human-readable description of the evaluation result (e.g., "Excellent", "Good", "Poor") corresponding to the numerical value. For numerical scales, this field is optional and provides a natural language explanation of what the value means (e.g., value 0.5 = "Somewhat Helpful").
- Parameters:
label- The categorical label assigned by the evaluator when using a categorical rating scale. This provides a human-readable description of the evaluation result (e.g., "Excellent", "Good", "Poor") corresponding to the numerical value. For numerical scales, this field is optional and provides a natural language explanation of what the value means (e.g., value 0.5 = "Somewhat Helpful").- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tokenUsage
The token consumption statistics for this evaluation, including input tokens, output tokens, and total tokens used by the underlying language model during the evaluation process.
- Parameters:
tokenUsage- The token consumption statistics for this evaluation, including input tokens, output tokens, and total tokens used by the underlying language model during the evaluation process.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tokenUsage
The token consumption statistics for this evaluation, including input tokens, output tokens, and total tokens used by the underlying language model during the evaluation process.
This is a convenience method that creates an instance of theTokenUsage.Builderavoiding the need to create one manually viaTokenUsage.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed totokenUsage(TokenUsage).- Parameters:
tokenUsage- a consumer that will call methods onTokenUsage.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
errorMessage
The error message describing what went wrong if the evaluation failed. Provides detailed information about evaluation failures to help diagnose and resolve issues with evaluator configuration or input data.
- Parameters:
errorMessage- The error message describing what went wrong if the evaluation failed. Provides detailed information about evaluation failures to help diagnose and resolve issues with evaluator configuration or input data.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
errorCode
The error code indicating the type of failure that occurred during evaluation. Used to programmatically identify and handle different categories of evaluation errors.
- Parameters:
errorCode- The error code indicating the type of failure that occurred during evaluation. Used to programmatically identify and handle different categories of evaluation errors.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-