Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1LlmBasedMetricSpec
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1LlmBasedMetricSpec
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/aiplatform_v1beta1/classes.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb
Overview
Specification for an LLM based metric.
Instance Attribute Summary collapse
-
#additional_config ⇒ Hash<String,Object>
Optional.
-
#judge_autorater_config ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1AutoraterConfig
The configs for autorater.
-
#metric_prompt_template ⇒ String
Required.
-
#predefined_rubric_generation_spec ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1PredefinedMetricSpec
The spec for a pre-defined metric.
-
#result_parser_config ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1EvaluationParserConfig
Config for parsing LLM responses.
-
#rubric_generation_spec ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1RubricGenerationSpec
Specification for how rubrics should be generated.
-
#rubric_group_key ⇒ String
Use a pre-defined group of rubrics associated with the input.
-
#system_instruction ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1LlmBasedMetricSpec
constructor
A new instance of GoogleCloudAiplatformV1beta1LlmBasedMetricSpec.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1LlmBasedMetricSpec
Returns a new instance of GoogleCloudAiplatformV1beta1LlmBasedMetricSpec.
30929 30930 30931 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 30929 def initialize(**args) update!(**args) end |
Instance Attribute Details
#additional_config ⇒ Hash<String,Object>
Optional. Optional additional configuration for the metric.
Corresponds to the JSON property additionalConfig
30889 30890 30891 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 30889 def additional_config @additional_config end |
#judge_autorater_config ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1AutoraterConfig
The configs for autorater. This is applicable to both EvaluateInstances and
EvaluateDataset.
Corresponds to the JSON property judgeAutoraterConfig
30895 30896 30897 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 30895 def judge_autorater_config @judge_autorater_config end |
#metric_prompt_template ⇒ String
Required. Template for the prompt sent to the judge model.
Corresponds to the JSON property metricPromptTemplate
30900 30901 30902 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 30900 def metric_prompt_template @metric_prompt_template end |
#predefined_rubric_generation_spec ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1PredefinedMetricSpec
The spec for a pre-defined metric.
Corresponds to the JSON property predefinedRubricGenerationSpec
30905 30906 30907 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 30905 def predefined_rubric_generation_spec @predefined_rubric_generation_spec end |
#result_parser_config ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1EvaluationParserConfig
Config for parsing LLM responses. It can be used to parse the LLM response to
be evaluated, or the LLM response from LLM-based metrics/Autoraters.
Corresponds to the JSON property resultParserConfig
30911 30912 30913 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 30911 def result_parser_config @result_parser_config end |
#rubric_generation_spec ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1RubricGenerationSpec
Specification for how rubrics should be generated.
Corresponds to the JSON property rubricGenerationSpec
30916 30917 30918 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 30916 def rubric_generation_spec @rubric_generation_spec end |
#rubric_group_key ⇒ String
Use a pre-defined group of rubrics associated with the input. Refers to a key
in the rubric_groups map of EvaluationInstance.
Corresponds to the JSON property rubricGroupKey
30922 30923 30924 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 30922 def rubric_group_key @rubric_group_key end |
#system_instruction ⇒ String
Optional. System instructions for the judge model.
Corresponds to the JSON property systemInstruction
30927 30928 30929 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 30927 def system_instruction @system_instruction end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
30934 30935 30936 30937 30938 30939 30940 30941 30942 30943 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 30934 def update!(**args) @additional_config = args[:additional_config] if args.key?(:additional_config) @judge_autorater_config = args[:judge_autorater_config] if args.key?(:judge_autorater_config) @metric_prompt_template = args[:metric_prompt_template] if args.key?(:metric_prompt_template) @predefined_rubric_generation_spec = args[:predefined_rubric_generation_spec] if args.key?(:predefined_rubric_generation_spec) @result_parser_config = args[:result_parser_config] if args.key?(:result_parser_config) @rubric_generation_spec = args[:rubric_generation_spec] if args.key?(:rubric_generation_spec) @rubric_group_key = args[:rubric_group_key] if args.key?(:rubric_group_key) @system_instruction = args[:system_instruction] if args.key?(:system_instruction) end |