Class: Google::Cloud::Ces::V1::EvaluationMetricsThresholds

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/ces/v1/app.rb

Overview

Threshold settings for metrics in an Evaluation.

Defined Under Namespace

Modules: HallucinationMetricBehavior Classes: GoldenEvaluationMetricsThresholds, ToolMatchingSettings

Instance Attribute Summary collapse

Instance Attribute Details

#golden_evaluation_metrics_thresholds::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds

Returns Optional. The golden evaluation metrics thresholds.

Returns:



446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
# File 'proto_docs/google/cloud/ces/v1/app.rb', line 446

class EvaluationMetricsThresholds
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Settings for golden evaluations.
  # @!attribute [rw] turn_level_metrics_thresholds
  #   @return [::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::TurnLevelMetricsThresholds]
  #     Optional. The turn level metrics thresholds.
  # @!attribute [rw] expectation_level_metrics_thresholds
  #   @return [::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::ExpectationLevelMetricsThresholds]
  #     Optional. The expectation level metrics thresholds.
  # @!attribute [rw] tool_matching_settings
  #   @return [::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::ToolMatchingSettings]
  #     Optional. The tool matching settings. An
  #     extra tool call is a tool call that is present in the execution but does
  #     not match any tool call in the golden expectation.
  class GoldenEvaluationMetricsThresholds
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Turn level metrics thresholds.
    # @!attribute [rw] semantic_similarity_success_threshold
    #   @return [::Integer]
    #     Optional. The success threshold for semantic similarity. Must be an
    #     integer between 0 and 4. Default is >= 3.
    # @!attribute [rw] overall_tool_invocation_correctness_threshold
    #   @return [::Float]
    #     Optional. The success threshold for overall tool invocation
    #     correctness. Must be a float between 0 and 1. Default is 1.0.
    # @!attribute [rw] semantic_similarity_channel
    #   @return [::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::TurnLevelMetricsThresholds::SemanticSimilarityChannel]
    #     Optional. The semantic similarity channel to use for evaluation.
    class TurnLevelMetricsThresholds
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Semantic similarity channel to use.
      module SemanticSimilarityChannel
        # Metric unspecified. Defaults to TEXT.
        SEMANTIC_SIMILARITY_CHANNEL_UNSPECIFIED = 0

        # Use text semantic similarity.
        TEXT = 1

        # Use audio semantic similarity.
        AUDIO = 2
      end
    end

    # Expectation level metrics thresholds.
    # @!attribute [rw] tool_invocation_parameter_correctness_threshold
    #   @return [::Float]
    #     Optional. The success threshold for individual tool invocation
    #     parameter correctness. Must be a float between 0 and 1. Default is 1.0.
    class ExpectationLevelMetricsThresholds
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Settings for matching tool calls.
  # @!attribute [rw] extra_tool_call_behavior
  #   @return [::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::ToolMatchingSettings::ExtraToolCallBehavior]
  #     Optional. Behavior for extra tool calls.
  #     Defaults to FAIL.
  class ToolMatchingSettings
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Defines the behavior when an extra tool call is encountered. An extra
    # tool call is a tool call that is present in the execution but does not
    # match any tool call in the golden expectation.
    module ExtraToolCallBehavior
      # Unspecified behavior. Defaults to FAIL.
      EXTRA_TOOL_CALL_BEHAVIOR_UNSPECIFIED = 0

      # Fail the evaluation if an extra tool call is encountered.
      FAIL = 1

      # Allow the extra tool call.
      ALLOW = 2
    end
  end

  # The hallucination metric behavior. Regardless of the behavior, the metric
  # will always be calculated. The difference is that when disabled, the
  # metric is not used to calculate the overall evaluation score.
  module HallucinationMetricBehavior
    # Unspecified hallucination metric behavior.
    HALLUCINATION_METRIC_BEHAVIOR_UNSPECIFIED = 0

    # Disable hallucination metric.
    DISABLED = 1

    # Enable hallucination metric.
    ENABLED = 2
  end
end

#golden_hallucination_metric_behavior::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::HallucinationMetricBehavior

Returns Optional. The hallucination metric behavior for golden evaluations.

Returns:



446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
# File 'proto_docs/google/cloud/ces/v1/app.rb', line 446

class EvaluationMetricsThresholds
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Settings for golden evaluations.
  # @!attribute [rw] turn_level_metrics_thresholds
  #   @return [::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::TurnLevelMetricsThresholds]
  #     Optional. The turn level metrics thresholds.
  # @!attribute [rw] expectation_level_metrics_thresholds
  #   @return [::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::ExpectationLevelMetricsThresholds]
  #     Optional. The expectation level metrics thresholds.
  # @!attribute [rw] tool_matching_settings
  #   @return [::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::ToolMatchingSettings]
  #     Optional. The tool matching settings. An
  #     extra tool call is a tool call that is present in the execution but does
  #     not match any tool call in the golden expectation.
  class GoldenEvaluationMetricsThresholds
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Turn level metrics thresholds.
    # @!attribute [rw] semantic_similarity_success_threshold
    #   @return [::Integer]
    #     Optional. The success threshold for semantic similarity. Must be an
    #     integer between 0 and 4. Default is >= 3.
    # @!attribute [rw] overall_tool_invocation_correctness_threshold
    #   @return [::Float]
    #     Optional. The success threshold for overall tool invocation
    #     correctness. Must be a float between 0 and 1. Default is 1.0.
    # @!attribute [rw] semantic_similarity_channel
    #   @return [::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::TurnLevelMetricsThresholds::SemanticSimilarityChannel]
    #     Optional. The semantic similarity channel to use for evaluation.
    class TurnLevelMetricsThresholds
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Semantic similarity channel to use.
      module SemanticSimilarityChannel
        # Metric unspecified. Defaults to TEXT.
        SEMANTIC_SIMILARITY_CHANNEL_UNSPECIFIED = 0

        # Use text semantic similarity.
        TEXT = 1

        # Use audio semantic similarity.
        AUDIO = 2
      end
    end

    # Expectation level metrics thresholds.
    # @!attribute [rw] tool_invocation_parameter_correctness_threshold
    #   @return [::Float]
    #     Optional. The success threshold for individual tool invocation
    #     parameter correctness. Must be a float between 0 and 1. Default is 1.0.
    class ExpectationLevelMetricsThresholds
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Settings for matching tool calls.
  # @!attribute [rw] extra_tool_call_behavior
  #   @return [::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::ToolMatchingSettings::ExtraToolCallBehavior]
  #     Optional. Behavior for extra tool calls.
  #     Defaults to FAIL.
  class ToolMatchingSettings
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Defines the behavior when an extra tool call is encountered. An extra
    # tool call is a tool call that is present in the execution but does not
    # match any tool call in the golden expectation.
    module ExtraToolCallBehavior
      # Unspecified behavior. Defaults to FAIL.
      EXTRA_TOOL_CALL_BEHAVIOR_UNSPECIFIED = 0

      # Fail the evaluation if an extra tool call is encountered.
      FAIL = 1

      # Allow the extra tool call.
      ALLOW = 2
    end
  end

  # The hallucination metric behavior. Regardless of the behavior, the metric
  # will always be calculated. The difference is that when disabled, the
  # metric is not used to calculate the overall evaluation score.
  module HallucinationMetricBehavior
    # Unspecified hallucination metric behavior.
    HALLUCINATION_METRIC_BEHAVIOR_UNSPECIFIED = 0

    # Disable hallucination metric.
    DISABLED = 1

    # Enable hallucination metric.
    ENABLED = 2
  end
end

#hallucination_metric_behavior::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::HallucinationMetricBehavior

Deprecated.

This field is deprecated and may be removed in the next major version update.

Returns Optional. Deprecated: Use golden_hallucination_metric_behavior instead. The hallucination metric behavior is currently used for golden evaluations.

Returns:



446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
# File 'proto_docs/google/cloud/ces/v1/app.rb', line 446

class EvaluationMetricsThresholds
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Settings for golden evaluations.
  # @!attribute [rw] turn_level_metrics_thresholds
  #   @return [::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::TurnLevelMetricsThresholds]
  #     Optional. The turn level metrics thresholds.
  # @!attribute [rw] expectation_level_metrics_thresholds
  #   @return [::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::ExpectationLevelMetricsThresholds]
  #     Optional. The expectation level metrics thresholds.
  # @!attribute [rw] tool_matching_settings
  #   @return [::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::ToolMatchingSettings]
  #     Optional. The tool matching settings. An
  #     extra tool call is a tool call that is present in the execution but does
  #     not match any tool call in the golden expectation.
  class GoldenEvaluationMetricsThresholds
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Turn level metrics thresholds.
    # @!attribute [rw] semantic_similarity_success_threshold
    #   @return [::Integer]
    #     Optional. The success threshold for semantic similarity. Must be an
    #     integer between 0 and 4. Default is >= 3.
    # @!attribute [rw] overall_tool_invocation_correctness_threshold
    #   @return [::Float]
    #     Optional. The success threshold for overall tool invocation
    #     correctness. Must be a float between 0 and 1. Default is 1.0.
    # @!attribute [rw] semantic_similarity_channel
    #   @return [::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::TurnLevelMetricsThresholds::SemanticSimilarityChannel]
    #     Optional. The semantic similarity channel to use for evaluation.
    class TurnLevelMetricsThresholds
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Semantic similarity channel to use.
      module SemanticSimilarityChannel
        # Metric unspecified. Defaults to TEXT.
        SEMANTIC_SIMILARITY_CHANNEL_UNSPECIFIED = 0

        # Use text semantic similarity.
        TEXT = 1

        # Use audio semantic similarity.
        AUDIO = 2
      end
    end

    # Expectation level metrics thresholds.
    # @!attribute [rw] tool_invocation_parameter_correctness_threshold
    #   @return [::Float]
    #     Optional. The success threshold for individual tool invocation
    #     parameter correctness. Must be a float between 0 and 1. Default is 1.0.
    class ExpectationLevelMetricsThresholds
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Settings for matching tool calls.
  # @!attribute [rw] extra_tool_call_behavior
  #   @return [::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::ToolMatchingSettings::ExtraToolCallBehavior]
  #     Optional. Behavior for extra tool calls.
  #     Defaults to FAIL.
  class ToolMatchingSettings
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Defines the behavior when an extra tool call is encountered. An extra
    # tool call is a tool call that is present in the execution but does not
    # match any tool call in the golden expectation.
    module ExtraToolCallBehavior
      # Unspecified behavior. Defaults to FAIL.
      EXTRA_TOOL_CALL_BEHAVIOR_UNSPECIFIED = 0

      # Fail the evaluation if an extra tool call is encountered.
      FAIL = 1

      # Allow the extra tool call.
      ALLOW = 2
    end
  end

  # The hallucination metric behavior. Regardless of the behavior, the metric
  # will always be calculated. The difference is that when disabled, the
  # metric is not used to calculate the overall evaluation score.
  module HallucinationMetricBehavior
    # Unspecified hallucination metric behavior.
    HALLUCINATION_METRIC_BEHAVIOR_UNSPECIFIED = 0

    # Disable hallucination metric.
    DISABLED = 1

    # Enable hallucination metric.
    ENABLED = 2
  end
end

#scenario_hallucination_metric_behavior::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::HallucinationMetricBehavior

Returns Optional. The hallucination metric behavior for scenario evaluations.

Returns:



446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
# File 'proto_docs/google/cloud/ces/v1/app.rb', line 446

class EvaluationMetricsThresholds
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Settings for golden evaluations.
  # @!attribute [rw] turn_level_metrics_thresholds
  #   @return [::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::TurnLevelMetricsThresholds]
  #     Optional. The turn level metrics thresholds.
  # @!attribute [rw] expectation_level_metrics_thresholds
  #   @return [::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::ExpectationLevelMetricsThresholds]
  #     Optional. The expectation level metrics thresholds.
  # @!attribute [rw] tool_matching_settings
  #   @return [::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::ToolMatchingSettings]
  #     Optional. The tool matching settings. An
  #     extra tool call is a tool call that is present in the execution but does
  #     not match any tool call in the golden expectation.
  class GoldenEvaluationMetricsThresholds
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Turn level metrics thresholds.
    # @!attribute [rw] semantic_similarity_success_threshold
    #   @return [::Integer]
    #     Optional. The success threshold for semantic similarity. Must be an
    #     integer between 0 and 4. Default is >= 3.
    # @!attribute [rw] overall_tool_invocation_correctness_threshold
    #   @return [::Float]
    #     Optional. The success threshold for overall tool invocation
    #     correctness. Must be a float between 0 and 1. Default is 1.0.
    # @!attribute [rw] semantic_similarity_channel
    #   @return [::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::TurnLevelMetricsThresholds::SemanticSimilarityChannel]
    #     Optional. The semantic similarity channel to use for evaluation.
    class TurnLevelMetricsThresholds
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Semantic similarity channel to use.
      module SemanticSimilarityChannel
        # Metric unspecified. Defaults to TEXT.
        SEMANTIC_SIMILARITY_CHANNEL_UNSPECIFIED = 0

        # Use text semantic similarity.
        TEXT = 1

        # Use audio semantic similarity.
        AUDIO = 2
      end
    end

    # Expectation level metrics thresholds.
    # @!attribute [rw] tool_invocation_parameter_correctness_threshold
    #   @return [::Float]
    #     Optional. The success threshold for individual tool invocation
    #     parameter correctness. Must be a float between 0 and 1. Default is 1.0.
    class ExpectationLevelMetricsThresholds
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Settings for matching tool calls.
  # @!attribute [rw] extra_tool_call_behavior
  #   @return [::Google::Cloud::Ces::V1::EvaluationMetricsThresholds::ToolMatchingSettings::ExtraToolCallBehavior]
  #     Optional. Behavior for extra tool calls.
  #     Defaults to FAIL.
  class ToolMatchingSettings
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Defines the behavior when an extra tool call is encountered. An extra
    # tool call is a tool call that is present in the execution but does not
    # match any tool call in the golden expectation.
    module ExtraToolCallBehavior
      # Unspecified behavior. Defaults to FAIL.
      EXTRA_TOOL_CALL_BEHAVIOR_UNSPECIFIED = 0

      # Fail the evaluation if an extra tool call is encountered.
      FAIL = 1

      # Allow the extra tool call.
      ALLOW = 2
    end
  end

  # The hallucination metric behavior. Regardless of the behavior, the metric
  # will always be calculated. The difference is that when disabled, the
  # metric is not used to calculate the overall evaluation score.
  module HallucinationMetricBehavior
    # Unspecified hallucination metric behavior.
    HALLUCINATION_METRIC_BEHAVIOR_UNSPECIFIED = 0

    # Disable hallucination metric.
    DISABLED = 1

    # Enable hallucination metric.
    ENABLED = 2
  end
end