Skip to content
v2.275.0

EvaluatorConfigProperty Struct ​

The configuration that defines how an evaluator assesses agent performance.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrockagentcore as bedrockagentcore } from 'aws-cdk-lib';

declare const additionalModelRequestFields: any;
const evaluatorConfigProperty: bedrockagentcore.CfnEvaluator.EvaluatorConfigProperty = {
  codeBased: {
    lambdaConfig: {
      lambdaArn: 'lambdaArn',

      // the properties below are optional
      lambdaTimeoutInSeconds: 123,
    },
  },
  derived: {
    baseEvaluatorId: 'baseEvaluatorId',
    modelConfig: {
      bedrockEvaluatorModelConfig: {
        modelId: 'modelId',

        // the properties below are optional
        additionalModelRequestFields: additionalModelRequestFields,
        inferenceConfig: {
          maxTokens: 123,
          stopSequences: ['stopSequences'],
          temperature: 123,
          topP: 123,
        },
      },
      responsesEvaluatorModelConfig: {
        modelId: 'modelId',

        // the properties below are optional
        maxOutputTokens: 123,
        reasoning: {
          effort: 'effort',
        },
        temperature: 123,
        topP: 123,
      },
    },
  },
  llmAsAJudge: {
    instructions: 'instructions',
    modelConfig: {
      bedrockEvaluatorModelConfig: {
        modelId: 'modelId',

        // the properties below are optional
        additionalModelRequestFields: additionalModelRequestFields,
        inferenceConfig: {
          maxTokens: 123,
          stopSequences: ['stopSequences'],
          temperature: 123,
          topP: 123,
        },
      },
      responsesEvaluatorModelConfig: {
        modelId: 'modelId',

        // the properties below are optional
        maxOutputTokens: 123,
        reasoning: {
          effort: 'effort',
        },
        temperature: 123,
        topP: 123,
      },
    },
    ratingScale: {
      categorical: [{
        definition: 'definition',
        label: 'label',
      }],
      multiDimensional: [{
        dimensionInstruction: 'dimensionInstruction',
        dimensionName: 'dimensionName',
        dimensionRatingScale: {
          categorical: [{
            definition: 'definition',
            label: 'label',
          }],
          numerical: [{
            definition: 'definition',
            label: 'label',
            value: 123,
          }],
        },
      }],
      numerical: [{
        definition: 'definition',
        label: 'label',
        value: 123,
      }],
    },
  },
};

Properties ​

codeBasedoptionalIResolvable | CfnEvaluator.CodeBasedEvaluatorConfigPropertycode_basedoptionaltyping.Union[IResolvable, CodeBasedEvaluatorConfigProperty]codeBasedoptionalIResolvableCodeBasedoptionalIResolvableCodeBasedoptionalinterface{}#
The configuration for code-based evaluation using a Lambda function.
derivedoptionalIResolvable | CfnEvaluator.DerivedEvaluatorConfigPropertyderivedoptionaltyping.Union[IResolvable, DerivedEvaluatorConfigProperty]derivedoptionalIResolvableDerivedoptionalIResolvableDerivedoptionalinterface{}#
The configuration for an evaluator derived from an existing base evaluator (a built-in or third-party evaluator), run on your own model.

The base evaluator supplies the prompt and scoring logic.

llmAsAJudgeoptionalIResolvable | CfnEvaluator.LlmAsAJudgeEvaluatorConfigPropertyllm_as_a_judgeoptionaltyping.Union[IResolvable, LlmAsAJudgeEvaluatorConfigProperty]llmAsAJudgeoptionalIResolvableLlmAsAJudgeoptionalIResolvableLlmAsAJudgeoptionalinterface{}#
The configuration for LLM-as-a-Judge evaluation.