create_evaluator
¶
create_evaluator(
evaluator_name: CustomEvaluatorName,
evaluator_config: EvaluatorConfig,
level: EvaluatorLevel,
*,
config_overrides: Optional[BedrockAgentCoreControlClientConfig] = None,
client_token: Optional[ClientToken] = None,
description: Optional[EvaluatorDescription] = None,
kms_key_arn: Optional[KmsKeyArn] = None,
tags: Optional[TagsMap] = None,
) -> CreateEvaluatorResponse
Creates a custom evaluator for agent quality assessment. Custom evaluators can use either LLM-as-a-Judge configurations with user-defined prompts, rating scales, and model settings, or code-based configurations with customer-managed Lambda functions to evaluate agent performance at tool call, trace, or session levels.
Parameters:
-
client_token(Optional[ClientToken], default:None) –A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see Ensuring idempotency.
-
evaluator_name(CustomEvaluatorName) –The name of the evaluator. Must be unique within your account.
-
description(Optional[EvaluatorDescription], default:None) –The description of the evaluator that explains its purpose and evaluation criteria.
-
evaluator_config(EvaluatorConfig) –The configuration for the evaluator. Specify either LLM-as-a-Judge settings with instructions, rating scale, and model configuration, or code-based settings with a customer-managed Lambda function.
-
level(EvaluatorLevel) –The evaluation level that determines the scope of evaluation. Valid values are
TOOL_CALLfor individual tool invocations,TRACEfor single request-response interactions, orSESSIONfor entire conversation sessions. -
kms_key_arn(Optional[KmsKeyArn], default:None) –The Amazon Resource Name (ARN) of a customer managed KMS key to use for encrypting sensitive evaluator data, including instructions and rating scale. If you don't specify a KMS key, the evaluator data is encrypted with an Amazon Web Services owned key. Only symmetric encryption KMS keys are supported. For more information, see Encryption at rest for AgentCore Evaluations.
-
tags(Optional[TagsMap], default:None) –A map of tag keys and values to assign to an AgentCore Evaluator. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment.
Raises:
-
AccessDeniedException–This exception is thrown when a request is denied per access permissions
-
ConflictException–This exception is thrown when there is a conflict performing an operation
-
InternalServerException–This exception is thrown if there was an unexpected error during processing of request
-
ServiceQuotaExceededException–This exception is thrown when a request is made beyond the service quota
-
ThrottlingException–This exception is thrown when the number of requests exceeds the limit
-
ValidationException–The input fails to satisfy the constraints specified by the service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_bedrock_agentcore_control/_services/bedrock_agent_core_control.py
5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 | |