google-apis-aiplatform_v1 0.63.0 → 0.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2607,6 +2607,86 @@ module Google
|
|
2607
2607
|
end
|
2608
2608
|
end
|
2609
2609
|
|
2610
|
+
# The request set for the evaluation run.
|
2611
|
+
class GoogleCloudAiplatformV1BigQueryRequestSet
|
2612
|
+
include Google::Apis::Core::Hashable
|
2613
|
+
|
2614
|
+
# Optional. Map of candidate name to candidate response column name. The column
|
2615
|
+
# will be in evaluation_item.CandidateResponse format.
|
2616
|
+
# Corresponds to the JSON property `candidateResponseColumns`
|
2617
|
+
# @return [Hash<String,String>]
|
2618
|
+
attr_accessor :candidate_response_columns
|
2619
|
+
|
2620
|
+
# Optional. The name of the column that contains the requests to evaluate. This
|
2621
|
+
# will be in evaluation_item.EvalPrompt format.
|
2622
|
+
# Corresponds to the JSON property `promptColumn`
|
2623
|
+
# @return [String]
|
2624
|
+
attr_accessor :prompt_column
|
2625
|
+
|
2626
|
+
# Optional. The name of the column that contains the rubrics. This will be in
|
2627
|
+
# evaluation_rubric.RubricGroup format (cl/762595858).
|
2628
|
+
# Corresponds to the JSON property `rubricsColumn`
|
2629
|
+
# @return [String]
|
2630
|
+
attr_accessor :rubrics_column
|
2631
|
+
|
2632
|
+
# The sampling config.
|
2633
|
+
# Corresponds to the JSON property `samplingConfig`
|
2634
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1BigQueryRequestSetSamplingConfig]
|
2635
|
+
attr_accessor :sampling_config
|
2636
|
+
|
2637
|
+
# Required. The URI of a BigQuery table. e.g. bq://projectId.bqDatasetId.
|
2638
|
+
# bqTableId
|
2639
|
+
# Corresponds to the JSON property `uri`
|
2640
|
+
# @return [String]
|
2641
|
+
attr_accessor :uri
|
2642
|
+
|
2643
|
+
def initialize(**args)
|
2644
|
+
update!(**args)
|
2645
|
+
end
|
2646
|
+
|
2647
|
+
# Update properties of this object
|
2648
|
+
def update!(**args)
|
2649
|
+
@candidate_response_columns = args[:candidate_response_columns] if args.key?(:candidate_response_columns)
|
2650
|
+
@prompt_column = args[:prompt_column] if args.key?(:prompt_column)
|
2651
|
+
@rubrics_column = args[:rubrics_column] if args.key?(:rubrics_column)
|
2652
|
+
@sampling_config = args[:sampling_config] if args.key?(:sampling_config)
|
2653
|
+
@uri = args[:uri] if args.key?(:uri)
|
2654
|
+
end
|
2655
|
+
end
|
2656
|
+
|
2657
|
+
# The sampling config.
|
2658
|
+
class GoogleCloudAiplatformV1BigQueryRequestSetSamplingConfig
|
2659
|
+
include Google::Apis::Core::Hashable
|
2660
|
+
|
2661
|
+
# Optional. The total number of logged data to import. If available data is less
|
2662
|
+
# than the sampling count, all data will be imported. Default is 100.
|
2663
|
+
# Corresponds to the JSON property `samplingCount`
|
2664
|
+
# @return [Fixnum]
|
2665
|
+
attr_accessor :sampling_count
|
2666
|
+
|
2667
|
+
# Optional. How long to wait before sampling data from the BigQuery table. If
|
2668
|
+
# not specified, defaults to 0.
|
2669
|
+
# Corresponds to the JSON property `samplingDuration`
|
2670
|
+
# @return [String]
|
2671
|
+
attr_accessor :sampling_duration
|
2672
|
+
|
2673
|
+
# Optional. The sampling method to use.
|
2674
|
+
# Corresponds to the JSON property `samplingMethod`
|
2675
|
+
# @return [String]
|
2676
|
+
attr_accessor :sampling_method
|
2677
|
+
|
2678
|
+
def initialize(**args)
|
2679
|
+
update!(**args)
|
2680
|
+
end
|
2681
|
+
|
2682
|
+
# Update properties of this object
|
2683
|
+
def update!(**args)
|
2684
|
+
@sampling_count = args[:sampling_count] if args.key?(:sampling_count)
|
2685
|
+
@sampling_duration = args[:sampling_duration] if args.key?(:sampling_duration)
|
2686
|
+
@sampling_method = args[:sampling_method] if args.key?(:sampling_method)
|
2687
|
+
end
|
2688
|
+
end
|
2689
|
+
|
2610
2690
|
# The BigQuery location for the input content.
|
2611
2691
|
class GoogleCloudAiplatformV1BigQuerySource
|
2612
2692
|
include Google::Apis::Core::Hashable
|
@@ -3028,6 +3108,19 @@ module Google
|
|
3028
3108
|
end
|
3029
3109
|
end
|
3030
3110
|
|
3111
|
+
# Request message for EvaluationManagementService.CancelEvaluationRun.
|
3112
|
+
class GoogleCloudAiplatformV1CancelEvaluationRunRequest
|
3113
|
+
include Google::Apis::Core::Hashable
|
3114
|
+
|
3115
|
+
def initialize(**args)
|
3116
|
+
update!(**args)
|
3117
|
+
end
|
3118
|
+
|
3119
|
+
# Update properties of this object
|
3120
|
+
def update!(**args)
|
3121
|
+
end
|
3122
|
+
end
|
3123
|
+
|
3031
3124
|
# Request message for JobService.CancelHyperparameterTuningJob.
|
3032
3125
|
class GoogleCloudAiplatformV1CancelHyperparameterTuningJobRequest
|
3033
3126
|
include Google::Apis::Core::Hashable
|
@@ -3172,6 +3265,87 @@ module Google
|
|
3172
3265
|
end
|
3173
3266
|
end
|
3174
3267
|
|
3268
|
+
# Responses from model or agent.
|
3269
|
+
class GoogleCloudAiplatformV1CandidateResponse
|
3270
|
+
include Google::Apis::Core::Hashable
|
3271
|
+
|
3272
|
+
# Required. The name of the candidate that produced the response.
|
3273
|
+
# Corresponds to the JSON property `candidate`
|
3274
|
+
# @return [String]
|
3275
|
+
attr_accessor :candidate
|
3276
|
+
|
3277
|
+
# Text response.
|
3278
|
+
# Corresponds to the JSON property `text`
|
3279
|
+
# @return [String]
|
3280
|
+
attr_accessor :text
|
3281
|
+
|
3282
|
+
# Fields and values that can be used to populate the response template.
|
3283
|
+
# Corresponds to the JSON property `value`
|
3284
|
+
# @return [Object]
|
3285
|
+
attr_accessor :value
|
3286
|
+
|
3287
|
+
def initialize(**args)
|
3288
|
+
update!(**args)
|
3289
|
+
end
|
3290
|
+
|
3291
|
+
# Update properties of this object
|
3292
|
+
def update!(**args)
|
3293
|
+
@candidate = args[:candidate] if args.key?(:candidate)
|
3294
|
+
@text = args[:text] if args.key?(:text)
|
3295
|
+
@value = args[:value] if args.key?(:value)
|
3296
|
+
end
|
3297
|
+
end
|
3298
|
+
|
3299
|
+
# Result for a single candidate.
|
3300
|
+
class GoogleCloudAiplatformV1CandidateResult
|
3301
|
+
include Google::Apis::Core::Hashable
|
3302
|
+
|
3303
|
+
# Optional. Additional results for the metric.
|
3304
|
+
# Corresponds to the JSON property `additionalResults`
|
3305
|
+
# @return [Object]
|
3306
|
+
attr_accessor :additional_results
|
3307
|
+
|
3308
|
+
# Required. The candidate that is being evaluated. The value is the same as the
|
3309
|
+
# candidate name in the EvaluationRequest.
|
3310
|
+
# Corresponds to the JSON property `candidate`
|
3311
|
+
# @return [String]
|
3312
|
+
attr_accessor :candidate
|
3313
|
+
|
3314
|
+
# Optional. The explanation for the metric.
|
3315
|
+
# Corresponds to the JSON property `explanation`
|
3316
|
+
# @return [String]
|
3317
|
+
attr_accessor :explanation
|
3318
|
+
|
3319
|
+
# Required. The metric that was evaluated.
|
3320
|
+
# Corresponds to the JSON property `metric`
|
3321
|
+
# @return [String]
|
3322
|
+
attr_accessor :metric
|
3323
|
+
|
3324
|
+
# Optional. The rubric verdicts for the metric.
|
3325
|
+
# Corresponds to the JSON property `rubricVerdicts`
|
3326
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1RubricVerdict>]
|
3327
|
+
attr_accessor :rubric_verdicts
|
3328
|
+
|
3329
|
+
# Optional. The score for the metric.
|
3330
|
+
# Corresponds to the JSON property `score`
|
3331
|
+
# @return [Float]
|
3332
|
+
attr_accessor :score
|
3333
|
+
|
3334
|
+
def initialize(**args)
|
3335
|
+
update!(**args)
|
3336
|
+
end
|
3337
|
+
|
3338
|
+
# Update properties of this object
|
3339
|
+
def update!(**args)
|
3340
|
+
@additional_results = args[:additional_results] if args.key?(:additional_results)
|
3341
|
+
@candidate = args[:candidate] if args.key?(:candidate)
|
3342
|
+
@explanation = args[:explanation] if args.key?(:explanation)
|
3343
|
+
@metric = args[:metric] if args.key?(:metric)
|
3344
|
+
@rubric_verdicts = args[:rubric_verdicts] if args.key?(:rubric_verdicts)
|
3345
|
+
@score = args[:score] if args.key?(:score)
|
3346
|
+
end
|
3347
|
+
end
|
3348
|
+
|
3175
3349
|
# This message will be placed in the metadata field of a google.longrunning.
|
3176
3350
|
# Operation associated with a CheckTrialEarlyStoppingState request.
|
3177
3351
|
class GoogleCloudAiplatformV1CheckTrialEarlyStoppingStateMetatdata
|
@@ -7774,6 +7948,20 @@ module Google
|
|
7774
7948
|
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GroundednessInput]
|
7775
7949
|
attr_accessor :groundedness_input
|
7776
7950
|
|
7951
|
+
# A single instance to be evaluated. Instances are used to specify the input
|
7952
|
+
# data for evaluation, from simple string comparisons to complex, multi-turn
|
7953
|
+
# model evaluations
|
7954
|
+
# Corresponds to the JSON property `instance`
|
7955
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationInstance]
|
7956
|
+
attr_accessor :instance
|
7957
|
+
|
7958
|
+
# The metrics used for evaluation. Currently, we only support evaluating a
|
7959
|
+
# single metric. If multiple metrics are provided, only the first one will be
|
7960
|
+
# evaluated.
|
7961
|
+
# Corresponds to the JSON property `metrics`
|
7962
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Metric>]
|
7963
|
+
attr_accessor :metrics
|
7964
|
+
|
7777
7965
|
# Input for MetricX metric.
|
7778
7966
|
# Corresponds to the JSON property `metricxInput`
|
7779
7967
|
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1MetricxInput]
|
@@ -7913,6 +8101,8 @@ module Google
|
|
7913
8101
|
@fluency_input = args[:fluency_input] if args.key?(:fluency_input)
|
7914
8102
|
@fulfillment_input = args[:fulfillment_input] if args.key?(:fulfillment_input)
|
7915
8103
|
@groundedness_input = args[:groundedness_input] if args.key?(:groundedness_input)
|
8104
|
+
@instance = args[:instance] if args.key?(:instance)
|
8105
|
+
@metrics = args[:metrics] if args.key?(:metrics)
|
7916
8106
|
@metricx_input = args[:metricx_input] if args.key?(:metricx_input)
|
7917
8107
|
@pairwise_metric_input = args[:pairwise_metric_input] if args.key?(:pairwise_metric_input)
|
7918
8108
|
@pairwise_question_answering_quality_input = args[:pairwise_question_answering_quality_input] if args.key?(:pairwise_question_answering_quality_input)
|
@@ -7981,6 +8171,12 @@ module Google
|
|
7981
8171
|
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GroundednessResult]
|
7982
8172
|
attr_accessor :groundedness_result
|
7983
8173
|
|
8174
|
+
# Metric results for each instance. The order of the metric results is
|
8175
|
+
# guaranteed to be the same as the order of the instances in the request.
|
8176
|
+
# Corresponds to the JSON property `metricResults`
|
8177
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1MetricResult>]
|
8178
|
+
attr_accessor :metric_results
|
8179
|
+
|
7984
8180
|
# Spec for MetricX result - calculates the MetricX score for the given instance
|
7985
8181
|
# using the version specified in the spec.
|
7986
8182
|
# Corresponds to the JSON property `metricxResult`
|
@@ -8120,6 +8316,7 @@ module Google
|
|
8120
8316
|
@fluency_result = args[:fluency_result] if args.key?(:fluency_result)
|
8121
8317
|
@fulfillment_result = args[:fulfillment_result] if args.key?(:fulfillment_result)
|
8122
8318
|
@groundedness_result = args[:groundedness_result] if args.key?(:groundedness_result)
|
8319
|
+
@metric_results = args[:metric_results] if args.key?(:metric_results)
|
8123
8320
|
@metricx_result = args[:metricx_result] if args.key?(:metricx_result)
|
8124
8321
|
@pairwise_metric_result = args[:pairwise_metric_result] if args.key?(:pairwise_metric_result)
|
8125
8322
|
@pairwise_question_answering_quality_result = args[:pairwise_question_answering_quality_result] if args.key?(:pairwise_question_answering_quality_result)
|
@@ -8277,6 +8474,999 @@ module Google
|
|
8277
8474
|
end
|
8278
8475
|
end
|
8279
8476
|
|
8477
|
+
# A single instance to be evaluated. Instances are used to specify the input
|
8478
|
+
# data for evaluation, from simple string comparisons to complex, multi-turn
|
8479
|
+
# model evaluations
|
8480
|
+
class GoogleCloudAiplatformV1EvaluationInstance
|
8481
|
+
include Google::Apis::Core::Hashable
|
8482
|
+
|
8483
|
+
# Instance data specified as a map.
|
8484
|
+
# Corresponds to the JSON property `otherData`
|
8485
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationInstanceMapInstance]
|
8486
|
+
attr_accessor :other_data
|
8487
|
+
|
8488
|
+
# Instance data used to populate placeholders in a metric prompt template.
|
8489
|
+
# Corresponds to the JSON property `prompt`
|
8490
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationInstanceInstanceData]
|
8491
|
+
attr_accessor :prompt
|
8492
|
+
|
8493
|
+
# Instance data used to populate placeholders in a metric prompt template.
|
8494
|
+
# Corresponds to the JSON property `reference`
|
8495
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationInstanceInstanceData]
|
8496
|
+
attr_accessor :reference
|
8497
|
+
|
8498
|
+
# Instance data used to populate placeholders in a metric prompt template.
|
8499
|
+
# Corresponds to the JSON property `response`
|
8500
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationInstanceInstanceData]
|
8501
|
+
attr_accessor :response
|
8502
|
+
|
8503
|
+
# Optional. Named groups of rubrics associated with the prompt. This is used for
|
8504
|
+
# rubric-based evaluations where rubrics can be referenced by a key. The key
|
8505
|
+
# could represent versions, associated metrics, etc.
|
8506
|
+
# Corresponds to the JSON property `rubricGroups`
|
8507
|
+
# @return [Hash<String,Google::Apis::AiplatformV1::GoogleCloudAiplatformV1RubricGroup>]
|
8508
|
+
attr_accessor :rubric_groups
|
8509
|
+
|
8510
|
+
def initialize(**args)
|
8511
|
+
update!(**args)
|
8512
|
+
end
|
8513
|
+
|
8514
|
+
# Update properties of this object
|
8515
|
+
def update!(**args)
|
8516
|
+
@other_data = args[:other_data] if args.key?(:other_data)
|
8517
|
+
@prompt = args[:prompt] if args.key?(:prompt)
|
8518
|
+
@reference = args[:reference] if args.key?(:reference)
|
8519
|
+
@response = args[:response] if args.key?(:response)
|
8520
|
+
@rubric_groups = args[:rubric_groups] if args.key?(:rubric_groups)
|
8521
|
+
end
|
8522
|
+
end
|
8523
|
+
|
8524
|
+
# Instance data used to populate placeholders in a metric prompt template.
|
8525
|
+
class GoogleCloudAiplatformV1EvaluationInstanceInstanceData
|
8526
|
+
include Google::Apis::Core::Hashable
|
8527
|
+
|
8528
|
+
# List of standard Content messages from Gemini API.
|
8529
|
+
# Corresponds to the JSON property `contents`
|
8530
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationInstanceInstanceDataContents]
|
8531
|
+
attr_accessor :contents
|
8532
|
+
|
8533
|
+
# Text data.
|
8534
|
+
# Corresponds to the JSON property `text`
|
8535
|
+
# @return [String]
|
8536
|
+
attr_accessor :text
|
8537
|
+
|
8538
|
+
def initialize(**args)
|
8539
|
+
update!(**args)
|
8540
|
+
end
|
8541
|
+
|
8542
|
+
# Update properties of this object
|
8543
|
+
def update!(**args)
|
8544
|
+
@contents = args[:contents] if args.key?(:contents)
|
8545
|
+
@text = args[:text] if args.key?(:text)
|
8546
|
+
end
|
8547
|
+
end
|
8548
|
+
|
8549
|
+
# List of standard Content messages from Gemini API.
|
8550
|
+
class GoogleCloudAiplatformV1EvaluationInstanceInstanceDataContents
|
8551
|
+
include Google::Apis::Core::Hashable
|
8552
|
+
|
8553
|
+
# Optional. Repeated contents.
|
8554
|
+
# Corresponds to the JSON property `contents`
|
8555
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content>]
|
8556
|
+
attr_accessor :contents
|
8557
|
+
|
8558
|
+
def initialize(**args)
|
8559
|
+
update!(**args)
|
8560
|
+
end
|
8561
|
+
|
8562
|
+
# Update properties of this object
|
8563
|
+
def update!(**args)
|
8564
|
+
@contents = args[:contents] if args.key?(:contents)
|
8565
|
+
end
|
8566
|
+
end
|
8567
|
+
|
8568
|
+
# Instance data specified as a map.
|
8569
|
+
class GoogleCloudAiplatformV1EvaluationInstanceMapInstance
|
8570
|
+
include Google::Apis::Core::Hashable
|
8571
|
+
|
8572
|
+
# Optional. Map of instance data.
|
8573
|
+
# Corresponds to the JSON property `mapInstance`
|
8574
|
+
# @return [Hash<String,Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationInstanceInstanceData>]
|
8575
|
+
attr_accessor :map_instance
|
8576
|
+
|
8577
|
+
def initialize(**args)
|
8578
|
+
update!(**args)
|
8579
|
+
end
|
8580
|
+
|
8581
|
+
# Update properties of this object
|
8582
|
+
def update!(**args)
|
8583
|
+
@map_instance = args[:map_instance] if args.key?(:map_instance)
|
8584
|
+
end
|
8585
|
+
end
|
8586
|
+
|
8587
|
+
# EvaluationItem is a single evaluation request or result. The content of an
|
8588
|
+
# EvaluationItem is immutable - it cannot be updated once created.
|
8589
|
+
# EvaluationItems can be deleted when no longer needed.
|
8590
|
+
class GoogleCloudAiplatformV1EvaluationItem
|
8591
|
+
include Google::Apis::Core::Hashable
|
8592
|
+
|
8593
|
+
# Output only. Timestamp when this item was created.
|
8594
|
+
# Corresponds to the JSON property `createTime`
|
8595
|
+
# @return [String]
|
8596
|
+
attr_accessor :create_time
|
8597
|
+
|
8598
|
+
# Required. The display name of the EvaluationItem.
|
8599
|
+
# Corresponds to the JSON property `displayName`
|
8600
|
+
# @return [String]
|
8601
|
+
attr_accessor :display_name
|
8602
|
+
|
8603
|
+
# The `Status` type defines a logical error model that is suitable for different
|
8604
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
8605
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
8606
|
+
# data: error code, error message, and error details. You can find out more
|
8607
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
8608
|
+
# //cloud.google.com/apis/design/errors).
|
8609
|
+
# Corresponds to the JSON property `error`
|
8610
|
+
# @return [Google::Apis::AiplatformV1::GoogleRpcStatus]
|
8611
|
+
attr_accessor :error
|
8612
|
+
|
8613
|
+
# Required. The type of the EvaluationItem.
|
8614
|
+
# Corresponds to the JSON property `evaluationItemType`
|
8615
|
+
# @return [String]
|
8616
|
+
attr_accessor :evaluation_item_type
|
8617
|
+
|
8618
|
+
# Single evaluation request.
|
8619
|
+
# Corresponds to the JSON property `evaluationRequest`
|
8620
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRequest]
|
8621
|
+
attr_accessor :evaluation_request
|
8622
|
+
|
8623
|
+
# Evaluation result.
|
8624
|
+
# Corresponds to the JSON property `evaluationResponse`
|
8625
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationResult]
|
8626
|
+
attr_accessor :evaluation_response
|
8627
|
+
|
8628
|
+
# The GCS object where the request or response is stored.
|
8629
|
+
# Corresponds to the JSON property `gcsUri`
|
8630
|
+
# @return [String]
|
8631
|
+
attr_accessor :gcs_uri
|
8632
|
+
|
8633
|
+
# Optional. Labels for the EvaluationItem.
|
8634
|
+
# Corresponds to the JSON property `labels`
|
8635
|
+
# @return [Hash<String,String>]
|
8636
|
+
attr_accessor :labels
|
8637
|
+
|
8638
|
+
# Optional. Metadata for the EvaluationItem.
|
8639
|
+
# Corresponds to the JSON property `metadata`
|
8640
|
+
# @return [Object]
|
8641
|
+
attr_accessor :metadata
|
8642
|
+
|
8643
|
+
# Identifier. The resource name of the EvaluationItem. Format: `projects/`
|
8644
|
+
# project`/locations/`location`/evaluationItems/`evaluation_item``
|
8645
|
+
# Corresponds to the JSON property `name`
|
8646
|
+
# @return [String]
|
8647
|
+
attr_accessor :name
|
8648
|
+
|
8649
|
+
def initialize(**args)
|
8650
|
+
update!(**args)
|
8651
|
+
end
|
8652
|
+
|
8653
|
+
# Update properties of this object
|
8654
|
+
def update!(**args)
|
8655
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
8656
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
8657
|
+
@error = args[:error] if args.key?(:error)
|
8658
|
+
@evaluation_item_type = args[:evaluation_item_type] if args.key?(:evaluation_item_type)
|
8659
|
+
@evaluation_request = args[:evaluation_request] if args.key?(:evaluation_request)
|
8660
|
+
@evaluation_response = args[:evaluation_response] if args.key?(:evaluation_response)
|
8661
|
+
@gcs_uri = args[:gcs_uri] if args.key?(:gcs_uri)
|
8662
|
+
@labels = args[:labels] if args.key?(:labels)
|
8663
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
8664
|
+
@name = args[:name] if args.key?(:name)
|
8665
|
+
end
|
8666
|
+
end
|
8667
|
+
|
8668
|
+
# Prompt to be evaluated.
|
8669
|
+
class GoogleCloudAiplatformV1EvaluationPrompt
|
8670
|
+
include Google::Apis::Core::Hashable
|
8671
|
+
|
8672
|
+
# Message to hold a prompt template and the values to populate the template.
|
8673
|
+
# Corresponds to the JSON property `promptTemplateData`
|
8674
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationPromptPromptTemplateData]
|
8675
|
+
attr_accessor :prompt_template_data
|
8676
|
+
|
8677
|
+
# Text prompt.
|
8678
|
+
# Corresponds to the JSON property `text`
|
8679
|
+
# @return [String]
|
8680
|
+
attr_accessor :text
|
8681
|
+
|
8682
|
+
# Fields and values that can be used to populate the prompt template.
|
8683
|
+
# Corresponds to the JSON property `value`
|
8684
|
+
# @return [Object]
|
8685
|
+
attr_accessor :value
|
8686
|
+
|
8687
|
+
def initialize(**args)
|
8688
|
+
update!(**args)
|
8689
|
+
end
|
8690
|
+
|
8691
|
+
# Update properties of this object
|
8692
|
+
def update!(**args)
|
8693
|
+
@prompt_template_data = args[:prompt_template_data] if args.key?(:prompt_template_data)
|
8694
|
+
@text = args[:text] if args.key?(:text)
|
8695
|
+
@value = args[:value] if args.key?(:value)
|
8696
|
+
end
|
8697
|
+
end
|
8698
|
+
|
8699
|
+
# Message to hold a prompt template and the values to populate the template.
|
8700
|
+
class GoogleCloudAiplatformV1EvaluationPromptPromptTemplateData
|
8701
|
+
include Google::Apis::Core::Hashable
|
8702
|
+
|
8703
|
+
# The values for fields in the prompt template.
|
8704
|
+
# Corresponds to the JSON property `values`
|
8705
|
+
# @return [Hash<String,Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content>]
|
8706
|
+
attr_accessor :values
|
8707
|
+
|
8708
|
+
def initialize(**args)
|
8709
|
+
update!(**args)
|
8710
|
+
end
|
8711
|
+
|
8712
|
+
# Update properties of this object
|
8713
|
+
def update!(**args)
|
8714
|
+
@values = args[:values] if args.key?(:values)
|
8715
|
+
end
|
8716
|
+
end
|
8717
|
+
|
8718
|
+
# Single evaluation request.
|
8719
|
+
class GoogleCloudAiplatformV1EvaluationRequest
|
8720
|
+
include Google::Apis::Core::Hashable
|
8721
|
+
|
8722
|
+
# Optional. Responses from model under test and other baseline models for
|
8723
|
+
# comparison.
|
8724
|
+
# Corresponds to the JSON property `candidateResponses`
|
8725
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1CandidateResponse>]
|
8726
|
+
attr_accessor :candidate_responses
|
8727
|
+
|
8728
|
+
# Responses from model or agent.
|
8729
|
+
# Corresponds to the JSON property `goldenResponse`
|
8730
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1CandidateResponse]
|
8731
|
+
attr_accessor :golden_response
|
8732
|
+
|
8733
|
+
# Prompt to be evaluated.
|
8734
|
+
# Corresponds to the JSON property `prompt`
|
8735
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationPrompt]
|
8736
|
+
attr_accessor :prompt
|
8737
|
+
|
8738
|
+
# Optional. Named groups of rubrics associated with this prompt. The key is a
|
8739
|
+
# user-defined name for the rubric group.
|
8740
|
+
# Corresponds to the JSON property `rubrics`
|
8741
|
+
# @return [Hash<String,Google::Apis::AiplatformV1::GoogleCloudAiplatformV1RubricGroup>]
|
8742
|
+
attr_accessor :rubrics
|
8743
|
+
|
8744
|
+
def initialize(**args)
|
8745
|
+
update!(**args)
|
8746
|
+
end
|
8747
|
+
|
8748
|
+
# Update properties of this object
|
8749
|
+
def update!(**args)
|
8750
|
+
@candidate_responses = args[:candidate_responses] if args.key?(:candidate_responses)
|
8751
|
+
@golden_response = args[:golden_response] if args.key?(:golden_response)
|
8752
|
+
@prompt = args[:prompt] if args.key?(:prompt)
|
8753
|
+
@rubrics = args[:rubrics] if args.key?(:rubrics)
|
8754
|
+
end
|
8755
|
+
end
|
8756
|
+
|
8757
|
+
# Evaluation result.
|
8758
|
+
class GoogleCloudAiplatformV1EvaluationResult
|
8759
|
+
include Google::Apis::Core::Hashable
|
8760
|
+
|
8761
|
+
# Optional. The results for the metric.
|
8762
|
+
# Corresponds to the JSON property `candidateResults`
|
8763
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1CandidateResult>]
|
8764
|
+
attr_accessor :candidate_results
|
8765
|
+
|
8766
|
+
# Required. The request item that was evaluated. Format: projects/`project`/
|
8767
|
+
# locations/`location`/evaluationItems/`evaluation_item`
|
8768
|
+
# Corresponds to the JSON property `evaluationRequest`
|
8769
|
+
# @return [String]
|
8770
|
+
attr_accessor :evaluation_request
|
8771
|
+
|
8772
|
+
# Required. The evaluation run that was used to generate the result. Format:
|
8773
|
+
# projects/`project`/locations/`location`/evaluationRuns/`evaluation_run`
|
8774
|
+
# Corresponds to the JSON property `evaluationRun`
|
8775
|
+
# @return [String]
|
8776
|
+
attr_accessor :evaluation_run
|
8777
|
+
|
8778
|
+
# Optional. Metadata about the evaluation result.
|
8779
|
+
# Corresponds to the JSON property `metadata`
|
8780
|
+
# @return [Object]
|
8781
|
+
attr_accessor :metadata
|
8782
|
+
|
8783
|
+
# Required. The metric that was evaluated.
|
8784
|
+
# Corresponds to the JSON property `metric`
|
8785
|
+
# @return [String]
|
8786
|
+
attr_accessor :metric
|
8787
|
+
|
8788
|
+
# Single evaluation request.
|
8789
|
+
# Corresponds to the JSON property `request`
|
8790
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRequest]
|
8791
|
+
attr_accessor :request
|
8792
|
+
|
8793
|
+
def initialize(**args)
|
8794
|
+
update!(**args)
|
8795
|
+
end
|
8796
|
+
|
8797
|
+
# Update properties of this object
|
8798
|
+
def update!(**args)
|
8799
|
+
@candidate_results = args[:candidate_results] if args.key?(:candidate_results)
|
8800
|
+
@evaluation_request = args[:evaluation_request] if args.key?(:evaluation_request)
|
8801
|
+
@evaluation_run = args[:evaluation_run] if args.key?(:evaluation_run)
|
8802
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
8803
|
+
@metric = args[:metric] if args.key?(:metric)
|
8804
|
+
@request = args[:request] if args.key?(:request)
|
8805
|
+
end
|
8806
|
+
end
|
8807
|
+
|
8808
|
+
# The results of the evaluation run.
|
8809
|
+
class GoogleCloudAiplatformV1EvaluationResults
|
8810
|
+
include Google::Apis::Core::Hashable
|
8811
|
+
|
8812
|
+
# The evaluation set where item level results are stored.
|
8813
|
+
# Corresponds to the JSON property `evaluationSet`
|
8814
|
+
# @return [String]
|
8815
|
+
attr_accessor :evaluation_set
|
8816
|
+
|
8817
|
+
# The summary metrics for the evaluation run.
|
8818
|
+
# Corresponds to the JSON property `summaryMetrics`
|
8819
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SummaryMetrics]
|
8820
|
+
attr_accessor :summary_metrics
|
8821
|
+
|
8822
|
+
def initialize(**args)
|
8823
|
+
update!(**args)
|
8824
|
+
end
|
8825
|
+
|
8826
|
+
# Update properties of this object
|
8827
|
+
def update!(**args)
|
8828
|
+
@evaluation_set = args[:evaluation_set] if args.key?(:evaluation_set)
|
8829
|
+
@summary_metrics = args[:summary_metrics] if args.key?(:summary_metrics)
|
8830
|
+
end
|
8831
|
+
end
|
8832
|
+
|
8833
|
+
# Configuration for a rubric group to be generated/saved for evaluation.
|
8834
|
+
class GoogleCloudAiplatformV1EvaluationRubricConfig
|
8835
|
+
include Google::Apis::Core::Hashable
|
8836
|
+
|
8837
|
+
# Specification for a pre-defined metric.
|
8838
|
+
# Corresponds to the JSON property `predefinedRubricGenerationSpec`
|
8839
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricPredefinedMetricSpec]
|
8840
|
+
attr_accessor :predefined_rubric_generation_spec
|
8841
|
+
|
8842
|
+
# Specification for how rubrics should be generated.
|
8843
|
+
# Corresponds to the JSON property `rubricGenerationSpec`
|
8844
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricRubricGenerationSpec]
|
8845
|
+
attr_accessor :rubric_generation_spec
|
8846
|
+
|
8847
|
+
# Required. The key used to save the generated rubrics. If a generation spec is
|
8848
|
+
# provided, this key will be used for the name of the generated rubric group.
|
8849
|
+
# Otherwise, this key will be used to look up the existing rubric group on the
|
8850
|
+
# evaluation item. Note that if a rubric group key is specified on both a rubric
|
8851
|
+
# config and an evaluation metric, the key from the metric will be used to
|
8852
|
+
# select the rubrics for evaluation.
|
8853
|
+
# Corresponds to the JSON property `rubricGroupKey`
|
8854
|
+
# @return [String]
|
8855
|
+
attr_accessor :rubric_group_key
|
8856
|
+
|
8857
|
+
def initialize(**args)
|
8858
|
+
update!(**args)
|
8859
|
+
end
|
8860
|
+
|
8861
|
+
# Update properties of this object
|
8862
|
+
def update!(**args)
|
8863
|
+
@predefined_rubric_generation_spec = args[:predefined_rubric_generation_spec] if args.key?(:predefined_rubric_generation_spec)
|
8864
|
+
@rubric_generation_spec = args[:rubric_generation_spec] if args.key?(:rubric_generation_spec)
|
8865
|
+
@rubric_group_key = args[:rubric_group_key] if args.key?(:rubric_group_key)
|
8866
|
+
end
|
8867
|
+
end
|
8868
|
+
|
8869
|
+
# EvaluationRun is a resource that represents a single evaluation run, which
|
8870
|
+
# includes a set of prompts, model responses, evaluation configuration and the
|
8871
|
+
# resulting metrics.
|
8872
|
+
class GoogleCloudAiplatformV1EvaluationRun
|
8873
|
+
include Google::Apis::Core::Hashable
|
8874
|
+
|
8875
|
+
# Output only. Time when the evaluation run was completed.
|
8876
|
+
# Corresponds to the JSON property `completionTime`
|
8877
|
+
# @return [String]
|
8878
|
+
attr_accessor :completion_time
|
8879
|
+
|
8880
|
+
# Output only. Time when the evaluation run was created.
|
8881
|
+
# Corresponds to the JSON property `createTime`
|
8882
|
+
# @return [String]
|
8883
|
+
attr_accessor :create_time
|
8884
|
+
|
8885
|
+
# The data source for the evaluation run.
|
8886
|
+
# Corresponds to the JSON property `dataSource`
|
8887
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunDataSource]
|
8888
|
+
attr_accessor :data_source
|
8889
|
+
|
8890
|
+
# Required. The display name of the Evaluation Run.
|
8891
|
+
# Corresponds to the JSON property `displayName`
|
8892
|
+
# @return [String]
|
8893
|
+
attr_accessor :display_name
|
8894
|
+
|
8895
|
+
# The `Status` type defines a logical error model that is suitable for different
|
8896
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
8897
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
8898
|
+
# data: error code, error message, and error details. You can find out more
|
8899
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
8900
|
+
# //cloud.google.com/apis/design/errors).
|
8901
|
+
# Corresponds to the JSON property `error`
|
8902
|
+
# @return [Google::Apis::AiplatformV1::GoogleRpcStatus]
|
8903
|
+
attr_accessor :error
|
8904
|
+
|
8905
|
+
# The Evalution configuration used for the evaluation run.
|
8906
|
+
# Corresponds to the JSON property `evaluationConfig`
|
8907
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunEvaluationConfig]
|
8908
|
+
attr_accessor :evaluation_config
|
8909
|
+
|
8910
|
+
# The results of the evaluation run.
|
8911
|
+
# Corresponds to the JSON property `evaluationResults`
|
8912
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationResults]
|
8913
|
+
attr_accessor :evaluation_results
|
8914
|
+
|
8915
|
+
# Output only. The specific evaluation set of the evaluation run. For runs with
|
8916
|
+
# an evaluation set input, this will be that same set. For runs with BigQuery
|
8917
|
+
# input, it's the sampled BigQuery dataset.
|
8918
|
+
# Corresponds to the JSON property `evaluationSetSnapshot`
|
8919
|
+
# @return [String]
|
8920
|
+
attr_accessor :evaluation_set_snapshot
|
8921
|
+
|
8922
|
+
# Optional. The candidate to inference config map for the evaluation run. The
|
8923
|
+
# candidate can be up to 128 characters long and can consist of any UTF-8
|
8924
|
+
# characters.
|
8925
|
+
# Corresponds to the JSON property `inferenceConfigs`
|
8926
|
+
# @return [Hash<String,Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunInferenceConfig>]
|
8927
|
+
attr_accessor :inference_configs
|
8928
|
+
|
8929
|
+
# Optional. Labels for the evaluation run.
|
8930
|
+
# Corresponds to the JSON property `labels`
|
8931
|
+
# @return [Hash<String,String>]
|
8932
|
+
attr_accessor :labels
|
8933
|
+
|
8934
|
+
# Optional. Metadata about the evaluation run, can be used by the caller to
|
8935
|
+
# store additional tracking information about the evaluation run.
|
8936
|
+
# Corresponds to the JSON property `metadata`
|
8937
|
+
# @return [Object]
|
8938
|
+
attr_accessor :metadata
|
8939
|
+
|
8940
|
+
# Identifier. The resource name of the EvaluationRun. This is a unique
|
8941
|
+
# identifier. Format: `projects/`project`/locations/`location`/evaluationRuns/`
|
8942
|
+
# evaluation_run``
|
8943
|
+
# Corresponds to the JSON property `name`
|
8944
|
+
# @return [String]
|
8945
|
+
attr_accessor :name
|
8946
|
+
|
8947
|
+
# Output only. The state of the evaluation run.
|
8948
|
+
# Corresponds to the JSON property `state`
|
8949
|
+
# @return [String]
|
8950
|
+
attr_accessor :state
|
8951
|
+
|
8952
|
+
def initialize(**args)
|
8953
|
+
update!(**args)
|
8954
|
+
end
|
8955
|
+
|
8956
|
+
# Update properties of this object
|
8957
|
+
def update!(**args)
|
8958
|
+
@completion_time = args[:completion_time] if args.key?(:completion_time)
|
8959
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
8960
|
+
@data_source = args[:data_source] if args.key?(:data_source)
|
8961
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
8962
|
+
@error = args[:error] if args.key?(:error)
|
8963
|
+
@evaluation_config = args[:evaluation_config] if args.key?(:evaluation_config)
|
8964
|
+
@evaluation_results = args[:evaluation_results] if args.key?(:evaluation_results)
|
8965
|
+
@evaluation_set_snapshot = args[:evaluation_set_snapshot] if args.key?(:evaluation_set_snapshot)
|
8966
|
+
@inference_configs = args[:inference_configs] if args.key?(:inference_configs)
|
8967
|
+
@labels = args[:labels] if args.key?(:labels)
|
8968
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
8969
|
+
@name = args[:name] if args.key?(:name)
|
8970
|
+
@state = args[:state] if args.key?(:state)
|
8971
|
+
end
|
8972
|
+
end
|
8973
|
+
|
8974
|
+
# The data source for the evaluation run.
|
8975
|
+
class GoogleCloudAiplatformV1EvaluationRunDataSource
|
8976
|
+
include Google::Apis::Core::Hashable
|
8977
|
+
|
8978
|
+
# The request set for the evaluation run.
|
8979
|
+
# Corresponds to the JSON property `bigqueryRequestSet`
|
8980
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1BigQueryRequestSet]
|
8981
|
+
attr_accessor :bigquery_request_set
|
8982
|
+
|
8983
|
+
# The EvaluationSet resource name. Format: `projects/`project`/locations/`
|
8984
|
+
# location`/evaluationSets/`evaluation_set``
|
8985
|
+
# Corresponds to the JSON property `evaluationSet`
|
8986
|
+
# @return [String]
|
8987
|
+
attr_accessor :evaluation_set
|
8988
|
+
|
8989
|
+
def initialize(**args)
|
8990
|
+
update!(**args)
|
8991
|
+
end
|
8992
|
+
|
8993
|
+
# Update properties of this object
|
8994
|
+
def update!(**args)
|
8995
|
+
@bigquery_request_set = args[:bigquery_request_set] if args.key?(:bigquery_request_set)
|
8996
|
+
@evaluation_set = args[:evaluation_set] if args.key?(:evaluation_set)
|
8997
|
+
end
|
8998
|
+
end
|
8999
|
+
|
9000
|
+
# The Evalution configuration used for the evaluation run.
|
9001
|
+
class GoogleCloudAiplatformV1EvaluationRunEvaluationConfig
|
9002
|
+
include Google::Apis::Core::Hashable
|
9003
|
+
|
9004
|
+
# The autorater config used for the evaluation run.
|
9005
|
+
# Corresponds to the JSON property `autoraterConfig`
|
9006
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunEvaluationConfigAutoraterConfig]
|
9007
|
+
attr_accessor :autorater_config
|
9008
|
+
|
9009
|
+
# Required. The metrics to be calculated in the evaluation run.
|
9010
|
+
# Corresponds to the JSON property `metrics`
|
9011
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetric>]
|
9012
|
+
attr_accessor :metrics
|
9013
|
+
|
9014
|
+
# The output config for the evaluation run.
|
9015
|
+
# Corresponds to the JSON property `outputConfig`
|
9016
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunEvaluationConfigOutputConfig]
|
9017
|
+
attr_accessor :output_config
|
9018
|
+
|
9019
|
+
# Prompt template used for inference.
|
9020
|
+
# Corresponds to the JSON property `promptTemplate`
|
9021
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunEvaluationConfigPromptTemplate]
|
9022
|
+
attr_accessor :prompt_template
|
9023
|
+
|
9024
|
+
# Optional. The rubric configs for the evaluation run. They are used to generate
|
9025
|
+
# rubrics which can be used by rubric-based metrics. Multiple rubric configs can
|
9026
|
+
# be specified for rubric generation but only one rubric config can be used for
|
9027
|
+
# a rubric-based metric. If more than one rubric config is provided, the
|
9028
|
+
# evaluation metric must specify a rubric group key. Note that if a generation
|
9029
|
+
# spec is specified on both a rubric config and an evaluation metric, the
|
9030
|
+
# rubrics generated for the metric will be used for evaluation.
|
9031
|
+
# Corresponds to the JSON property `rubricConfigs`
|
9032
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRubricConfig>]
|
9033
|
+
attr_accessor :rubric_configs
|
9034
|
+
|
9035
|
+
def initialize(**args)
|
9036
|
+
update!(**args)
|
9037
|
+
end
|
9038
|
+
|
9039
|
+
# Update properties of this object
|
9040
|
+
def update!(**args)
|
9041
|
+
@autorater_config = args[:autorater_config] if args.key?(:autorater_config)
|
9042
|
+
@metrics = args[:metrics] if args.key?(:metrics)
|
9043
|
+
@output_config = args[:output_config] if args.key?(:output_config)
|
9044
|
+
@prompt_template = args[:prompt_template] if args.key?(:prompt_template)
|
9045
|
+
@rubric_configs = args[:rubric_configs] if args.key?(:rubric_configs)
|
9046
|
+
end
|
9047
|
+
end
|
9048
|
+
|
9049
|
+
# The autorater config used for the evaluation run.
|
9050
|
+
class GoogleCloudAiplatformV1EvaluationRunEvaluationConfigAutoraterConfig
|
9051
|
+
include Google::Apis::Core::Hashable
|
9052
|
+
|
9053
|
+
# Optional. The fully qualified name of the publisher model or tuned autorater
|
9054
|
+
# endpoint to use. Publisher model format: `projects/`project`/locations/`
|
9055
|
+
# location`/publishers/*/models/*` Tuned model endpoint format: `projects/`
|
9056
|
+
# project`/locations/`location`/endpoints/`endpoint``
|
9057
|
+
# Corresponds to the JSON property `autoraterModel`
|
9058
|
+
# @return [String]
|
9059
|
+
attr_accessor :autorater_model
|
9060
|
+
|
9061
|
+
# Generation config.
|
9062
|
+
# Corresponds to the JSON property `generationConfig`
|
9063
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GenerationConfig]
|
9064
|
+
attr_accessor :generation_config
|
9065
|
+
|
9066
|
+
# Optional. Number of samples for each instance in the dataset. If not specified,
|
9067
|
+
# the default is 4. Minimum value is 1, maximum value is 32.
|
9068
|
+
# Corresponds to the JSON property `sampleCount`
|
9069
|
+
# @return [Fixnum]
|
9070
|
+
attr_accessor :sample_count
|
9071
|
+
|
9072
|
+
def initialize(**args)
|
9073
|
+
update!(**args)
|
9074
|
+
end
|
9075
|
+
|
9076
|
+
# Update properties of this object
|
9077
|
+
def update!(**args)
|
9078
|
+
@autorater_model = args[:autorater_model] if args.key?(:autorater_model)
|
9079
|
+
@generation_config = args[:generation_config] if args.key?(:generation_config)
|
9080
|
+
@sample_count = args[:sample_count] if args.key?(:sample_count)
|
9081
|
+
end
|
9082
|
+
end
|
9083
|
+
|
9084
|
+
# The output config for the evaluation run.
|
9085
|
+
class GoogleCloudAiplatformV1EvaluationRunEvaluationConfigOutputConfig
|
9086
|
+
include Google::Apis::Core::Hashable
|
9087
|
+
|
9088
|
+
# The BigQuery location for the output content.
|
9089
|
+
# Corresponds to the JSON property `bigqueryDestination`
|
9090
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1BigQueryDestination]
|
9091
|
+
attr_accessor :bigquery_destination
|
9092
|
+
|
9093
|
+
# The Google Cloud Storage location where the output is to be written to.
|
9094
|
+
# Corresponds to the JSON property `gcsDestination`
|
9095
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GcsDestination]
|
9096
|
+
attr_accessor :gcs_destination
|
9097
|
+
|
9098
|
+
def initialize(**args)
|
9099
|
+
update!(**args)
|
9100
|
+
end
|
9101
|
+
|
9102
|
+
# Update properties of this object
|
9103
|
+
def update!(**args)
|
9104
|
+
@bigquery_destination = args[:bigquery_destination] if args.key?(:bigquery_destination)
|
9105
|
+
@gcs_destination = args[:gcs_destination] if args.key?(:gcs_destination)
|
9106
|
+
end
|
9107
|
+
end
|
9108
|
+
|
9109
|
+
# Prompt template used for inference.
|
9110
|
+
class GoogleCloudAiplatformV1EvaluationRunEvaluationConfigPromptTemplate
|
9111
|
+
include Google::Apis::Core::Hashable
|
9112
|
+
|
9113
|
+
# Prompt template stored in Cloud Storage. Format: "gs://my-bucket/file-name.txt"
|
9114
|
+
# .
|
9115
|
+
# Corresponds to the JSON property `gcsUri`
|
9116
|
+
# @return [String]
|
9117
|
+
attr_accessor :gcs_uri
|
9118
|
+
|
9119
|
+
# Inline prompt template. Template variables should be in the format "`var_name`"
|
9120
|
+
# . Example: "Translate the following from `source_lang` to `target_lang`: `text`
|
9121
|
+
# "
|
9122
|
+
# Corresponds to the JSON property `promptTemplate`
|
9123
|
+
# @return [String]
|
9124
|
+
attr_accessor :prompt_template
|
9125
|
+
|
9126
|
+
def initialize(**args)
|
9127
|
+
update!(**args)
|
9128
|
+
end
|
9129
|
+
|
9130
|
+
# Update properties of this object
|
9131
|
+
def update!(**args)
|
9132
|
+
@gcs_uri = args[:gcs_uri] if args.key?(:gcs_uri)
|
9133
|
+
@prompt_template = args[:prompt_template] if args.key?(:prompt_template)
|
9134
|
+
end
|
9135
|
+
end
|
9136
|
+
|
9137
|
+
# An inference config used for model inference during the evaluation run.
|
9138
|
+
class GoogleCloudAiplatformV1EvaluationRunInferenceConfig
|
9139
|
+
include Google::Apis::Core::Hashable
|
9140
|
+
|
9141
|
+
# Generation config.
|
9142
|
+
# Corresponds to the JSON property `generationConfig`
|
9143
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GenerationConfig]
|
9144
|
+
attr_accessor :generation_config
|
9145
|
+
|
9146
|
+
# Required. The fully qualified name of the publisher model or endpoint to use.
|
9147
|
+
# Publisher model format: `projects/`project`/locations/`location`/publishers/*/
|
9148
|
+
# models/*` Endpoint format: `projects/`project`/locations/`location`/endpoints/`
|
9149
|
+
# endpoint``
|
9150
|
+
# Corresponds to the JSON property `model`
|
9151
|
+
# @return [String]
|
9152
|
+
attr_accessor :model
|
9153
|
+
|
9154
|
+
def initialize(**args)
|
9155
|
+
update!(**args)
|
9156
|
+
end
|
9157
|
+
|
9158
|
+
# Update properties of this object
|
9159
|
+
def update!(**args)
|
9160
|
+
@generation_config = args[:generation_config] if args.key?(:generation_config)
|
9161
|
+
@model = args[:model] if args.key?(:model)
|
9162
|
+
end
|
9163
|
+
end
|
9164
|
+
|
9165
|
+
# The metric used for evaluation runs.
|
9166
|
+
class GoogleCloudAiplatformV1EvaluationRunMetric
|
9167
|
+
include Google::Apis::Core::Hashable
|
9168
|
+
|
9169
|
+
# Specification for a computation based metric.
|
9170
|
+
# Corresponds to the JSON property `computationBasedMetricSpec`
|
9171
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricComputationBasedMetricSpec]
|
9172
|
+
attr_accessor :computation_based_metric_spec
|
9173
|
+
|
9174
|
+
# Specification for an LLM based metric.
|
9175
|
+
# Corresponds to the JSON property `llmBasedMetricSpec`
|
9176
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricLlmBasedMetricSpec]
|
9177
|
+
attr_accessor :llm_based_metric_spec
|
9178
|
+
|
9179
|
+
# Required. The name of the metric.
|
9180
|
+
# Corresponds to the JSON property `metric`
|
9181
|
+
# @return [String]
|
9182
|
+
attr_accessor :metric
|
9183
|
+
|
9184
|
+
# Specification for a pre-defined metric.
|
9185
|
+
# Corresponds to the JSON property `predefinedMetricSpec`
|
9186
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricPredefinedMetricSpec]
|
9187
|
+
attr_accessor :predefined_metric_spec
|
9188
|
+
|
9189
|
+
# Specification for a metric that is based on rubrics.
|
9190
|
+
# Corresponds to the JSON property `rubricBasedMetricSpec`
|
9191
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricRubricBasedMetricSpec]
|
9192
|
+
attr_accessor :rubric_based_metric_spec
|
9193
|
+
|
9194
|
+
def initialize(**args)
|
9195
|
+
update!(**args)
|
9196
|
+
end
|
9197
|
+
|
9198
|
+
# Update properties of this object
|
9199
|
+
def update!(**args)
|
9200
|
+
@computation_based_metric_spec = args[:computation_based_metric_spec] if args.key?(:computation_based_metric_spec)
|
9201
|
+
@llm_based_metric_spec = args[:llm_based_metric_spec] if args.key?(:llm_based_metric_spec)
|
9202
|
+
@metric = args[:metric] if args.key?(:metric)
|
9203
|
+
@predefined_metric_spec = args[:predefined_metric_spec] if args.key?(:predefined_metric_spec)
|
9204
|
+
@rubric_based_metric_spec = args[:rubric_based_metric_spec] if args.key?(:rubric_based_metric_spec)
|
9205
|
+
end
|
9206
|
+
end
|
9207
|
+
|
9208
|
+
# Specification for a computation based metric.
|
9209
|
+
class GoogleCloudAiplatformV1EvaluationRunMetricComputationBasedMetricSpec
|
9210
|
+
include Google::Apis::Core::Hashable
|
9211
|
+
|
9212
|
+
# Optional. A map of parameters for the metric, e.g. `"rouge_type": "rougeL"`.
|
9213
|
+
# Corresponds to the JSON property `parameters`
|
9214
|
+
# @return [Hash<String,Object>]
|
9215
|
+
attr_accessor :parameters
|
9216
|
+
|
9217
|
+
# Required. The type of the computation based metric.
|
9218
|
+
# Corresponds to the JSON property `type`
|
9219
|
+
# @return [String]
|
9220
|
+
attr_accessor :type
|
9221
|
+
|
9222
|
+
def initialize(**args)
|
9223
|
+
update!(**args)
|
9224
|
+
end
|
9225
|
+
|
9226
|
+
# Update properties of this object
|
9227
|
+
def update!(**args)
|
9228
|
+
@parameters = args[:parameters] if args.key?(:parameters)
|
9229
|
+
@type = args[:type] if args.key?(:type)
|
9230
|
+
end
|
9231
|
+
end
|
9232
|
+
|
9233
|
+
# Specification for an LLM based metric.
|
9234
|
+
class GoogleCloudAiplatformV1EvaluationRunMetricLlmBasedMetricSpec
|
9235
|
+
include Google::Apis::Core::Hashable
|
9236
|
+
|
9237
|
+
# Optional. Optional additional configuration for the metric.
|
9238
|
+
# Corresponds to the JSON property `additionalConfig`
|
9239
|
+
# @return [Hash<String,Object>]
|
9240
|
+
attr_accessor :additional_config
|
9241
|
+
|
9242
|
+
# The autorater config used for the evaluation run.
|
9243
|
+
# Corresponds to the JSON property `judgeAutoraterConfig`
|
9244
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunEvaluationConfigAutoraterConfig]
|
9245
|
+
attr_accessor :judge_autorater_config
|
9246
|
+
|
9247
|
+
# Required. Template for the prompt sent to the judge model.
|
9248
|
+
# Corresponds to the JSON property `metricPromptTemplate`
|
9249
|
+
# @return [String]
|
9250
|
+
attr_accessor :metric_prompt_template
|
9251
|
+
|
9252
|
+
# Specification for a pre-defined metric.
|
9253
|
+
# Corresponds to the JSON property `predefinedRubricGenerationSpec`
|
9254
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricPredefinedMetricSpec]
|
9255
|
+
attr_accessor :predefined_rubric_generation_spec
|
9256
|
+
|
9257
|
+
# Specification for how rubrics should be generated.
|
9258
|
+
# Corresponds to the JSON property `rubricGenerationSpec`
|
9259
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricRubricGenerationSpec]
|
9260
|
+
attr_accessor :rubric_generation_spec
|
9261
|
+
|
9262
|
+
# Use a pre-defined group of rubrics associated with the input. Refers to a key
|
9263
|
+
# in the rubric_groups map of EvaluationInstance.
|
9264
|
+
# Corresponds to the JSON property `rubricGroupKey`
|
9265
|
+
# @return [String]
|
9266
|
+
attr_accessor :rubric_group_key
|
9267
|
+
|
9268
|
+
# Optional. System instructions for the judge model.
|
9269
|
+
# Corresponds to the JSON property `systemInstruction`
|
9270
|
+
# @return [String]
|
9271
|
+
attr_accessor :system_instruction
|
9272
|
+
|
9273
|
+
def initialize(**args)
|
9274
|
+
update!(**args)
|
9275
|
+
end
|
9276
|
+
|
9277
|
+
# Update properties of this object
|
9278
|
+
def update!(**args)
|
9279
|
+
@additional_config = args[:additional_config] if args.key?(:additional_config)
|
9280
|
+
@judge_autorater_config = args[:judge_autorater_config] if args.key?(:judge_autorater_config)
|
9281
|
+
@metric_prompt_template = args[:metric_prompt_template] if args.key?(:metric_prompt_template)
|
9282
|
+
@predefined_rubric_generation_spec = args[:predefined_rubric_generation_spec] if args.key?(:predefined_rubric_generation_spec)
|
9283
|
+
@rubric_generation_spec = args[:rubric_generation_spec] if args.key?(:rubric_generation_spec)
|
9284
|
+
@rubric_group_key = args[:rubric_group_key] if args.key?(:rubric_group_key)
|
9285
|
+
@system_instruction = args[:system_instruction] if args.key?(:system_instruction)
|
9286
|
+
end
|
9287
|
+
end
|
9288
|
+
|
9289
|
+
# Specification for a pre-defined metric.
|
9290
|
+
class GoogleCloudAiplatformV1EvaluationRunMetricPredefinedMetricSpec
|
9291
|
+
include Google::Apis::Core::Hashable
|
9292
|
+
|
9293
|
+
# Required. The name of a pre-defined metric, such as "instruction_following_v1"
|
9294
|
+
# or "text_quality_v1".
|
9295
|
+
# Corresponds to the JSON property `metricSpecName`
|
9296
|
+
# @return [String]
|
9297
|
+
attr_accessor :metric_spec_name
|
9298
|
+
|
9299
|
+
# Optional. The parameters needed to run the pre-defined metric.
|
9300
|
+
# Corresponds to the JSON property `parameters`
|
9301
|
+
# @return [Hash<String,Object>]
|
9302
|
+
attr_accessor :parameters
|
9303
|
+
|
9304
|
+
def initialize(**args)
|
9305
|
+
update!(**args)
|
9306
|
+
end
|
9307
|
+
|
9308
|
+
# Update properties of this object
|
9309
|
+
def update!(**args)
|
9310
|
+
@metric_spec_name = args[:metric_spec_name] if args.key?(:metric_spec_name)
|
9311
|
+
@parameters = args[:parameters] if args.key?(:parameters)
|
9312
|
+
end
|
9313
|
+
end
|
9314
|
+
|
9315
|
+
# Specification for a metric that is based on rubrics.
|
9316
|
+
class GoogleCloudAiplatformV1EvaluationRunMetricRubricBasedMetricSpec
|
9317
|
+
include Google::Apis::Core::Hashable
|
9318
|
+
|
9319
|
+
# Defines a list of rubrics, used when providing rubrics inline.
|
9320
|
+
# Corresponds to the JSON property `inlineRubrics`
|
9321
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricRubricBasedMetricSpecRepeatedRubrics]
|
9322
|
+
attr_accessor :inline_rubrics
|
9323
|
+
|
9324
|
+
# The autorater config used for the evaluation run.
|
9325
|
+
# Corresponds to the JSON property `judgeAutoraterConfig`
|
9326
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunEvaluationConfigAutoraterConfig]
|
9327
|
+
attr_accessor :judge_autorater_config
|
9328
|
+
|
9329
|
+
# Optional. Template for the prompt used by the judge model to evaluate against
|
9330
|
+
# rubrics.
|
9331
|
+
# Corresponds to the JSON property `metricPromptTemplate`
|
9332
|
+
# @return [String]
|
9333
|
+
attr_accessor :metric_prompt_template
|
9334
|
+
|
9335
|
+
# Specification for how rubrics should be generated.
|
9336
|
+
# Corresponds to the JSON property `rubricGenerationSpec`
|
9337
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricRubricGenerationSpec]
|
9338
|
+
attr_accessor :rubric_generation_spec
|
9339
|
+
|
9340
|
+
# Use a pre-defined group of rubrics associated with the input content. This
|
9341
|
+
# refers to a key in the `rubric_groups` map of `RubricEnhancedContents`.
|
9342
|
+
# Corresponds to the JSON property `rubricGroupKey`
|
9343
|
+
# @return [String]
|
9344
|
+
attr_accessor :rubric_group_key
|
9345
|
+
|
9346
|
+
def initialize(**args)
|
9347
|
+
update!(**args)
|
9348
|
+
end
|
9349
|
+
|
9350
|
+
# Update properties of this object
|
9351
|
+
def update!(**args)
|
9352
|
+
@inline_rubrics = args[:inline_rubrics] if args.key?(:inline_rubrics)
|
9353
|
+
@judge_autorater_config = args[:judge_autorater_config] if args.key?(:judge_autorater_config)
|
9354
|
+
@metric_prompt_template = args[:metric_prompt_template] if args.key?(:metric_prompt_template)
|
9355
|
+
@rubric_generation_spec = args[:rubric_generation_spec] if args.key?(:rubric_generation_spec)
|
9356
|
+
@rubric_group_key = args[:rubric_group_key] if args.key?(:rubric_group_key)
|
9357
|
+
end
|
9358
|
+
end
|
9359
|
+
|
9360
|
+
# Defines a list of rubrics, used when providing rubrics inline.
|
9361
|
+
class GoogleCloudAiplatformV1EvaluationRunMetricRubricBasedMetricSpecRepeatedRubrics
|
9362
|
+
include Google::Apis::Core::Hashable
|
9363
|
+
|
9364
|
+
# The list of rubrics.
|
9365
|
+
# Corresponds to the JSON property `rubrics`
|
9366
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Rubric>]
|
9367
|
+
attr_accessor :rubrics
|
9368
|
+
|
9369
|
+
def initialize(**args)
|
9370
|
+
update!(**args)
|
9371
|
+
end
|
9372
|
+
|
9373
|
+
# Update properties of this object
|
9374
|
+
def update!(**args)
|
9375
|
+
@rubrics = args[:rubrics] if args.key?(:rubrics)
|
9376
|
+
end
|
9377
|
+
end
|
9378
|
+
|
9379
|
+
# Specification for how rubrics should be generated.
|
9380
|
+
class GoogleCloudAiplatformV1EvaluationRunMetricRubricGenerationSpec
|
9381
|
+
include Google::Apis::Core::Hashable
|
9382
|
+
|
9383
|
+
# The autorater config used for the evaluation run.
|
9384
|
+
# Corresponds to the JSON property `modelConfig`
|
9385
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunEvaluationConfigAutoraterConfig]
|
9386
|
+
attr_accessor :model_config
|
9387
|
+
|
9388
|
+
# Optional. Template for the prompt used to generate rubrics. The details should
|
9389
|
+
# be updated based on the most-recent recipe requirements.
|
9390
|
+
# Corresponds to the JSON property `promptTemplate`
|
9391
|
+
# @return [String]
|
9392
|
+
attr_accessor :prompt_template
|
9393
|
+
|
9394
|
+
# Optional. The type of rubric content to be generated.
|
9395
|
+
# Corresponds to the JSON property `rubricContentType`
|
9396
|
+
# @return [String]
|
9397
|
+
attr_accessor :rubric_content_type
|
9398
|
+
|
9399
|
+
# Optional. An optional, pre-defined list of allowed types for generated rubrics.
|
9400
|
+
# If this field is provided, it implies `include_rubric_type` should be true,
|
9401
|
+
# and the generated rubric types should be chosen from this ontology.
|
9402
|
+
# Corresponds to the JSON property `rubricTypeOntology`
|
9403
|
+
# @return [Array<String>]
|
9404
|
+
attr_accessor :rubric_type_ontology
|
9405
|
+
|
9406
|
+
def initialize(**args)
|
9407
|
+
update!(**args)
|
9408
|
+
end
|
9409
|
+
|
9410
|
+
# Update properties of this object
|
9411
|
+
def update!(**args)
|
9412
|
+
@model_config = args[:model_config] if args.key?(:model_config)
|
9413
|
+
@prompt_template = args[:prompt_template] if args.key?(:prompt_template)
|
9414
|
+
@rubric_content_type = args[:rubric_content_type] if args.key?(:rubric_content_type)
|
9415
|
+
@rubric_type_ontology = args[:rubric_type_ontology] if args.key?(:rubric_type_ontology)
|
9416
|
+
end
|
9417
|
+
end
|
9418
|
+
|
9419
|
+
# EvaluationSet is a collection of related EvaluationItems that are evaluated
|
9420
|
+
# together.
|
9421
|
+
class GoogleCloudAiplatformV1EvaluationSet
|
9422
|
+
include Google::Apis::Core::Hashable
|
9423
|
+
|
9424
|
+
# Output only. Timestamp when this item was created.
|
9425
|
+
# Corresponds to the JSON property `createTime`
|
9426
|
+
# @return [String]
|
9427
|
+
attr_accessor :create_time
|
9428
|
+
|
9429
|
+
# Required. The display name of the EvaluationSet.
|
9430
|
+
# Corresponds to the JSON property `displayName`
|
9431
|
+
# @return [String]
|
9432
|
+
attr_accessor :display_name
|
9433
|
+
|
9434
|
+
# Required. The EvaluationItems that are part of this dataset.
|
9435
|
+
# Corresponds to the JSON property `evaluationItems`
|
9436
|
+
# @return [Array<String>]
|
9437
|
+
attr_accessor :evaluation_items
|
9438
|
+
|
9439
|
+
# Optional. Metadata for the EvaluationSet.
|
9440
|
+
# Corresponds to the JSON property `metadata`
|
9441
|
+
# @return [Object]
|
9442
|
+
attr_accessor :metadata
|
9443
|
+
|
9444
|
+
# Identifier. The resource name of the EvaluationSet. Format: `projects/`project`
|
9445
|
+
# /locations/`location`/evaluationSets/`evaluation_set``
|
9446
|
+
# Corresponds to the JSON property `name`
|
9447
|
+
# @return [String]
|
9448
|
+
attr_accessor :name
|
9449
|
+
|
9450
|
+
# Output only. Timestamp when this item was last updated.
|
9451
|
+
# Corresponds to the JSON property `updateTime`
|
9452
|
+
# @return [String]
|
9453
|
+
attr_accessor :update_time
|
9454
|
+
|
9455
|
+
def initialize(**args)
|
9456
|
+
update!(**args)
|
9457
|
+
end
|
9458
|
+
|
9459
|
+
# Update properties of this object
|
9460
|
+
def update!(**args)
|
9461
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
9462
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
9463
|
+
@evaluation_items = args[:evaluation_items] if args.key?(:evaluation_items)
|
9464
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
9465
|
+
@name = args[:name] if args.key?(:name)
|
9466
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
9467
|
+
end
|
9468
|
+
end
|
9469
|
+
|
8280
9470
|
# An edge describing the relationship between an Artifact and an Execution in a
|
8281
9471
|
# lineage graph.
|
8282
9472
|
class GoogleCloudAiplatformV1Event
|
@@ -12985,6 +14175,116 @@ module Google
|
|
12985
14175
|
end
|
12986
14176
|
end
|
12987
14177
|
|
14178
|
+
# Request message for EvaluationService.GenerateInstanceRubrics.
|
14179
|
+
class GoogleCloudAiplatformV1GenerateInstanceRubricsRequest
|
14180
|
+
include Google::Apis::Core::Hashable
|
14181
|
+
|
14182
|
+
# Required. The prompt to generate rubrics from. For single-turn queries, this
|
14183
|
+
# is a single instance. For multi-turn queries, this is a repeated field that
|
14184
|
+
# contains conversation history + latest request.
|
14185
|
+
# Corresponds to the JSON property `contents`
|
14186
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content>]
|
14187
|
+
attr_accessor :contents
|
14188
|
+
|
14189
|
+
# The spec for a pre-defined metric.
|
14190
|
+
# Corresponds to the JSON property `predefinedRubricGenerationSpec`
|
14191
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PredefinedMetricSpec]
|
14192
|
+
attr_accessor :predefined_rubric_generation_spec
|
14193
|
+
|
14194
|
+
# Specification for how rubrics should be generated.
|
14195
|
+
# Corresponds to the JSON property `rubricGenerationSpec`
|
14196
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1RubricGenerationSpec]
|
14197
|
+
attr_accessor :rubric_generation_spec
|
14198
|
+
|
14199
|
+
def initialize(**args)
|
14200
|
+
update!(**args)
|
14201
|
+
end
|
14202
|
+
|
14203
|
+
# Update properties of this object
|
14204
|
+
def update!(**args)
|
14205
|
+
@contents = args[:contents] if args.key?(:contents)
|
14206
|
+
@predefined_rubric_generation_spec = args[:predefined_rubric_generation_spec] if args.key?(:predefined_rubric_generation_spec)
|
14207
|
+
@rubric_generation_spec = args[:rubric_generation_spec] if args.key?(:rubric_generation_spec)
|
14208
|
+
end
|
14209
|
+
end
|
14210
|
+
|
14211
|
+
# Response message for EvaluationService.GenerateInstanceRubrics.
|
14212
|
+
class GoogleCloudAiplatformV1GenerateInstanceRubricsResponse
|
14213
|
+
include Google::Apis::Core::Hashable
|
14214
|
+
|
14215
|
+
# Output only. A list of generated rubrics.
|
14216
|
+
# Corresponds to the JSON property `generatedRubrics`
|
14217
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Rubric>]
|
14218
|
+
attr_accessor :generated_rubrics
|
14219
|
+
|
14220
|
+
def initialize(**args)
|
14221
|
+
update!(**args)
|
14222
|
+
end
|
14223
|
+
|
14224
|
+
# Update properties of this object
|
14225
|
+
def update!(**args)
|
14226
|
+
@generated_rubrics = args[:generated_rubrics] if args.key?(:generated_rubrics)
|
14227
|
+
end
|
14228
|
+
end
|
14229
|
+
|
14230
|
+
# Request message for DataFoundryService.GenerateSyntheticData.
|
14231
|
+
class GoogleCloudAiplatformV1GenerateSyntheticDataRequest
|
14232
|
+
include Google::Apis::Core::Hashable
|
14233
|
+
|
14234
|
+
# Required. The number of synthetic examples to generate. For this stateless API,
|
14235
|
+
# the count is limited to a small number.
|
14236
|
+
# Corresponds to the JSON property `count`
|
14237
|
+
# @return [Fixnum]
|
14238
|
+
attr_accessor :count
|
14239
|
+
|
14240
|
+
# Optional. A list of few-shot examples to guide the model's output style and
|
14241
|
+
# format.
|
14242
|
+
# Corresponds to the JSON property `examples`
|
14243
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SyntheticExample>]
|
14244
|
+
attr_accessor :examples
|
14245
|
+
|
14246
|
+
# Required. The schema of the desired output, defined by a list of fields.
|
14247
|
+
# Corresponds to the JSON property `outputFieldSpecs`
|
14248
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1OutputFieldSpec>]
|
14249
|
+
attr_accessor :output_field_specs
|
14250
|
+
|
14251
|
+
# Defines a generation strategy based on a high-level task description.
|
14252
|
+
# Corresponds to the JSON property `taskDescription`
|
14253
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1TaskDescriptionStrategy]
|
14254
|
+
attr_accessor :task_description
|
14255
|
+
|
14256
|
+
def initialize(**args)
|
14257
|
+
update!(**args)
|
14258
|
+
end
|
14259
|
+
|
14260
|
+
# Update properties of this object
|
14261
|
+
def update!(**args)
|
14262
|
+
@count = args[:count] if args.key?(:count)
|
14263
|
+
@examples = args[:examples] if args.key?(:examples)
|
14264
|
+
@output_field_specs = args[:output_field_specs] if args.key?(:output_field_specs)
|
14265
|
+
@task_description = args[:task_description] if args.key?(:task_description)
|
14266
|
+
end
|
14267
|
+
end
|
14268
|
+
|
14269
|
+
# The response containing the generated data.
|
14270
|
+
class GoogleCloudAiplatformV1GenerateSyntheticDataResponse
|
14271
|
+
include Google::Apis::Core::Hashable
|
14272
|
+
|
14273
|
+
# A list of generated synthetic examples.
|
14274
|
+
# Corresponds to the JSON property `syntheticExamples`
|
14275
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SyntheticExample>]
|
14276
|
+
attr_accessor :synthetic_examples
|
14277
|
+
|
14278
|
+
def initialize(**args)
|
14279
|
+
update!(**args)
|
14280
|
+
end
|
14281
|
+
|
14282
|
+
# Update properties of this object
|
14283
|
+
def update!(**args)
|
14284
|
+
@synthetic_examples = args[:synthetic_examples] if args.key?(:synthetic_examples)
|
14285
|
+
end
|
14286
|
+
end
|
14287
|
+
|
12988
14288
|
# Generate video response.
|
12989
14289
|
class GoogleCloudAiplatformV1GenerateVideoResponse
|
12990
14290
|
include Google::Apis::Core::Hashable
|
@@ -13411,25 +14711,12 @@ module Google
|
|
13411
14711
|
class GoogleCloudAiplatformV1GoogleMaps
|
13412
14712
|
include Google::Apis::Core::Hashable
|
13413
14713
|
|
13414
|
-
# The generic reusable api auth config. Deprecated. Please use AuthConfig (
|
13415
|
-
# google/cloud/aiplatform/master/auth.proto) instead.
|
13416
|
-
# Corresponds to the JSON property `apiAuth`
|
13417
|
-
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ApiAuth]
|
13418
|
-
attr_accessor :api_auth
|
13419
|
-
|
13420
|
-
# Auth configuration to run the extension.
|
13421
|
-
# Corresponds to the JSON property `authConfig`
|
13422
|
-
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1AuthConfig]
|
13423
|
-
attr_accessor :auth_config
|
13424
|
-
|
13425
14714
|
def initialize(**args)
|
13426
14715
|
update!(**args)
|
13427
14716
|
end
|
13428
14717
|
|
13429
14718
|
# Update properties of this object
|
13430
14719
|
def update!(**args)
|
13431
|
-
@api_auth = args[:api_auth] if args.key?(:api_auth)
|
13432
|
-
@auth_config = args[:auth_config] if args.key?(:auth_config)
|
13433
14720
|
end
|
13434
14721
|
end
|
13435
14722
|
|
@@ -15684,6 +16971,81 @@ module Google
|
|
15684
16971
|
end
|
15685
16972
|
end
|
15686
16973
|
|
16974
|
+
# Response message for EvaluationManagementService.ListEvaluationItems.
|
16975
|
+
class GoogleCloudAiplatformV1ListEvaluationItemsResponse
|
16976
|
+
include Google::Apis::Core::Hashable
|
16977
|
+
|
16978
|
+
# List of EvaluationItems in the requested page.
|
16979
|
+
# Corresponds to the JSON property `evaluationItems`
|
16980
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationItem>]
|
16981
|
+
attr_accessor :evaluation_items
|
16982
|
+
|
16983
|
+
# A token to retrieve the next page of results.
|
16984
|
+
# Corresponds to the JSON property `nextPageToken`
|
16985
|
+
# @return [String]
|
16986
|
+
attr_accessor :next_page_token
|
16987
|
+
|
16988
|
+
def initialize(**args)
|
16989
|
+
update!(**args)
|
16990
|
+
end
|
16991
|
+
|
16992
|
+
# Update properties of this object
|
16993
|
+
def update!(**args)
|
16994
|
+
@evaluation_items = args[:evaluation_items] if args.key?(:evaluation_items)
|
16995
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
16996
|
+
end
|
16997
|
+
end
|
16998
|
+
|
16999
|
+
# Response message for EvaluationManagementService.ListEvaluationRuns.
|
17000
|
+
class GoogleCloudAiplatformV1ListEvaluationRunsResponse
|
17001
|
+
include Google::Apis::Core::Hashable
|
17002
|
+
|
17003
|
+
# List of EvaluationRuns in the requested page.
|
17004
|
+
# Corresponds to the JSON property `evaluationRuns`
|
17005
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRun>]
|
17006
|
+
attr_accessor :evaluation_runs
|
17007
|
+
|
17008
|
+
# A token to retrieve the next page of results.
|
17009
|
+
# Corresponds to the JSON property `nextPageToken`
|
17010
|
+
# @return [String]
|
17011
|
+
attr_accessor :next_page_token
|
17012
|
+
|
17013
|
+
def initialize(**args)
|
17014
|
+
update!(**args)
|
17015
|
+
end
|
17016
|
+
|
17017
|
+
# Update properties of this object
|
17018
|
+
def update!(**args)
|
17019
|
+
@evaluation_runs = args[:evaluation_runs] if args.key?(:evaluation_runs)
|
17020
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
17021
|
+
end
|
17022
|
+
end
|
17023
|
+
|
17024
|
+
# Response message for EvaluationManagementService.ListEvaluationSets.
|
17025
|
+
class GoogleCloudAiplatformV1ListEvaluationSetsResponse
|
17026
|
+
include Google::Apis::Core::Hashable
|
17027
|
+
|
17028
|
+
# List of EvaluationSets in the requested page.
|
17029
|
+
# Corresponds to the JSON property `evaluationSets`
|
17030
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationSet>]
|
17031
|
+
attr_accessor :evaluation_sets
|
17032
|
+
|
17033
|
+
# A token to retrieve the next page of results.
|
17034
|
+
# Corresponds to the JSON property `nextPageToken`
|
17035
|
+
# @return [String]
|
17036
|
+
attr_accessor :next_page_token
|
17037
|
+
|
17038
|
+
def initialize(**args)
|
17039
|
+
update!(**args)
|
17040
|
+
end
|
17041
|
+
|
17042
|
+
# Update properties of this object
|
17043
|
+
def update!(**args)
|
17044
|
+
@evaluation_sets = args[:evaluation_sets] if args.key?(:evaluation_sets)
|
17045
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
17046
|
+
end
|
17047
|
+
end
|
17048
|
+
|
15687
17049
|
# Response message for MetadataService.ListExecutions.
|
15688
17050
|
class GoogleCloudAiplatformV1ListExecutionsResponse
|
15689
17051
|
include Google::Apis::Core::Hashable
|
@@ -17182,6 +18544,11 @@ module Google
|
|
17182
18544
|
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PointwiseMetricSpec]
|
17183
18545
|
attr_accessor :pointwise_metric_spec
|
17184
18546
|
|
18547
|
+
# The spec for a pre-defined metric.
|
18548
|
+
# Corresponds to the JSON property `predefinedMetricSpec`
|
18549
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PredefinedMetricSpec]
|
18550
|
+
attr_accessor :predefined_metric_spec
|
18551
|
+
|
17185
18552
|
# Spec for rouge score metric - calculates the recall of n-grams in prediction
|
17186
18553
|
# as compared to reference - returns a score ranging between 0 and 1.
|
17187
18554
|
# Corresponds to the JSON property `rougeSpec`
|
@@ -17199,10 +18566,54 @@ module Google
|
|
17199
18566
|
@exact_match_spec = args[:exact_match_spec] if args.key?(:exact_match_spec)
|
17200
18567
|
@pairwise_metric_spec = args[:pairwise_metric_spec] if args.key?(:pairwise_metric_spec)
|
17201
18568
|
@pointwise_metric_spec = args[:pointwise_metric_spec] if args.key?(:pointwise_metric_spec)
|
18569
|
+
@predefined_metric_spec = args[:predefined_metric_spec] if args.key?(:predefined_metric_spec)
|
17202
18570
|
@rouge_spec = args[:rouge_spec] if args.key?(:rouge_spec)
|
17203
18571
|
end
|
17204
18572
|
end
|
17205
18573
|
|
18574
|
+
# Result for a single metric on a single instance.
|
18575
|
+
class GoogleCloudAiplatformV1MetricResult
|
18576
|
+
include Google::Apis::Core::Hashable
|
18577
|
+
|
18578
|
+
# The `Status` type defines a logical error model that is suitable for different
|
18579
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
18580
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
18581
|
+
# data: error code, error message, and error details. You can find out more
|
18582
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
18583
|
+
# //cloud.google.com/apis/design/errors).
|
18584
|
+
# Corresponds to the JSON property `error`
|
18585
|
+
# @return [Google::Apis::AiplatformV1::GoogleRpcStatus]
|
18586
|
+
attr_accessor :error
|
18587
|
+
|
18588
|
+
# Output only. The explanation for the metric result.
|
18589
|
+
# Corresponds to the JSON property `explanation`
|
18590
|
+
# @return [String]
|
18591
|
+
attr_accessor :explanation
|
18592
|
+
|
18593
|
+
# Output only. For rubric-based metrics, the verdicts for each rubric.
|
18594
|
+
# Corresponds to the JSON property `rubricVerdicts`
|
18595
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1RubricVerdict>]
|
18596
|
+
attr_accessor :rubric_verdicts
|
18597
|
+
|
18598
|
+
# Output only. The score for the metric. Please refer to each metric's
|
18599
|
+
# documentation for the meaning of the score.
|
18600
|
+
# Corresponds to the JSON property `score`
|
18601
|
+
# @return [Float]
|
18602
|
+
attr_accessor :score
|
18603
|
+
|
18604
|
+
def initialize(**args)
|
18605
|
+
update!(**args)
|
18606
|
+
end
|
18607
|
+
|
18608
|
+
# Update properties of this object
|
18609
|
+
def update!(**args)
|
18610
|
+
@error = args[:error] if args.key?(:error)
|
18611
|
+
@explanation = args[:explanation] if args.key?(:explanation)
|
18612
|
+
@rubric_verdicts = args[:rubric_verdicts] if args.key?(:rubric_verdicts)
|
18613
|
+
@score = args[:score] if args.key?(:score)
|
18614
|
+
end
|
18615
|
+
end
|
18616
|
+
|
17206
18617
|
# Input for MetricX metric.
|
17207
18618
|
class GoogleCloudAiplatformV1MetricxInput
|
17208
18619
|
include Google::Apis::Core::Hashable
|
@@ -21393,6 +22804,40 @@ module Google
|
|
21393
22804
|
end
|
21394
22805
|
end
|
21395
22806
|
|
22807
|
+
# Defines a specification for a single output field.
|
22808
|
+
class GoogleCloudAiplatformV1OutputFieldSpec
|
22809
|
+
include Google::Apis::Core::Hashable
|
22810
|
+
|
22811
|
+
# Required. The name of the output field.
|
22812
|
+
# Corresponds to the JSON property `fieldName`
|
22813
|
+
# @return [String]
|
22814
|
+
attr_accessor :field_name
|
22815
|
+
|
22816
|
+
# Optional. The data type of the field. Defaults to CONTENT if not set.
|
22817
|
+
# Corresponds to the JSON property `fieldType`
|
22818
|
+
# @return [String]
|
22819
|
+
attr_accessor :field_type
|
22820
|
+
|
22821
|
+
# Optional. Optional, but recommended. Additional guidance specific to this
|
22822
|
+
# field to provide targeted instructions for the LLM to generate the content of
|
22823
|
+
# a single output field. While the LLM can sometimes infer content from the
|
22824
|
+
# field name, providing explicit guidance is preferred.
|
22825
|
+
# Corresponds to the JSON property `guidance`
|
22826
|
+
# @return [String]
|
22827
|
+
attr_accessor :guidance
|
22828
|
+
|
22829
|
+
def initialize(**args)
|
22830
|
+
update!(**args)
|
22831
|
+
end
|
22832
|
+
|
22833
|
+
# Update properties of this object
|
22834
|
+
def update!(**args)
|
22835
|
+
@field_name = args[:field_name] if args.key?(:field_name)
|
22836
|
+
@field_type = args[:field_type] if args.key?(:field_type)
|
22837
|
+
@guidance = args[:guidance] if args.key?(:guidance)
|
22838
|
+
end
|
22839
|
+
end
|
22840
|
+
|
21396
22841
|
# PSC config that is used to automatically create PSC endpoints in the user
|
21397
22842
|
# projects.
|
21398
22843
|
class GoogleCloudAiplatformV1PscAutomationConfig
|
@@ -22874,6 +24319,32 @@ module Google
|
|
22874
24319
|
end
|
22875
24320
|
end
|
22876
24321
|
|
24322
|
+
# The spec for a pre-defined metric.
|
24323
|
+
class GoogleCloudAiplatformV1PredefinedMetricSpec
|
24324
|
+
include Google::Apis::Core::Hashable
|
24325
|
+
|
24326
|
+
# Required. The name of a pre-defined metric, such as "instruction_following_v1"
|
24327
|
+
# or "text_quality_v1".
|
24328
|
+
# Corresponds to the JSON property `metricSpecName`
|
24329
|
+
# @return [String]
|
24330
|
+
attr_accessor :metric_spec_name
|
24331
|
+
|
24332
|
+
# Optional. The parameters needed to run the pre-defined metric.
|
24333
|
+
# Corresponds to the JSON property `metricSpecParameters`
|
24334
|
+
# @return [Hash<String,Object>]
|
24335
|
+
attr_accessor :metric_spec_parameters
|
24336
|
+
|
24337
|
+
def initialize(**args)
|
24338
|
+
update!(**args)
|
24339
|
+
end
|
24340
|
+
|
24341
|
+
# Update properties of this object
|
24342
|
+
def update!(**args)
|
24343
|
+
@metric_spec_name = args[:metric_spec_name] if args.key?(:metric_spec_name)
|
24344
|
+
@metric_spec_parameters = args[:metric_spec_parameters] if args.key?(:metric_spec_parameters)
|
24345
|
+
end
|
24346
|
+
end
|
24347
|
+
|
22877
24348
|
# Assigns input data to training, validation, and test sets based on the value
|
22878
24349
|
# of a provided key. Supported only for tabular Datasets.
|
22879
24350
|
class GoogleCloudAiplatformV1PredefinedSplit
|
@@ -26296,6 +27767,11 @@ module Google
|
|
26296
27767
|
# @return [String]
|
26297
27768
|
attr_accessor :etag
|
26298
27769
|
|
27770
|
+
# Labels for the ReasoningEngine.
|
27771
|
+
# Corresponds to the JSON property `labels`
|
27772
|
+
# @return [Hash<String,String>]
|
27773
|
+
attr_accessor :labels
|
27774
|
+
|
26299
27775
|
# Identifier. The resource name of the ReasoningEngine. Format: `projects/`
|
26300
27776
|
# project`/locations/`location`/reasoningEngines/`reasoning_engine``
|
26301
27777
|
# Corresponds to the JSON property `name`
|
@@ -26323,6 +27799,7 @@ module Google
|
|
26323
27799
|
@display_name = args[:display_name] if args.key?(:display_name)
|
26324
27800
|
@encryption_spec = args[:encryption_spec] if args.key?(:encryption_spec)
|
26325
27801
|
@etag = args[:etag] if args.key?(:etag)
|
27802
|
+
@labels = args[:labels] if args.key?(:labels)
|
26326
27803
|
@name = args[:name] if args.key?(:name)
|
26327
27804
|
@spec = args[:spec] if args.key?(:spec)
|
26328
27805
|
@update_time = args[:update_time] if args.key?(:update_time)
|
@@ -26397,13 +27874,14 @@ module Google
|
|
26397
27874
|
attr_accessor :env
|
26398
27875
|
|
26399
27876
|
# Optional. The maximum number of application instances that can be launched to
|
26400
|
-
# handle increased traffic. Defaults to 100.
|
27877
|
+
# handle increased traffic. Defaults to 100. Range: [1, 1000]. If VPC-SC or PSC-
|
27878
|
+
# I is enabled, the acceptable range is [1, 100].
|
26401
27879
|
# Corresponds to the JSON property `maxInstances`
|
26402
27880
|
# @return [Fixnum]
|
26403
27881
|
attr_accessor :max_instances
|
26404
27882
|
|
26405
27883
|
# Optional. The minimum number of application instances that will be kept
|
26406
|
-
# running at all times. Defaults to 1.
|
27884
|
+
# running at all times. Defaults to 1. Range: [0, 10].
|
26407
27885
|
# Corresponds to the JSON property `minInstances`
|
26408
27886
|
# @return [Fixnum]
|
26409
27887
|
attr_accessor :min_instances
|
@@ -26415,9 +27893,11 @@ module Google
|
|
26415
27893
|
|
26416
27894
|
# Optional. Resource limits for each container. Only 'cpu' and 'memory' keys are
|
26417
27895
|
# supported. Defaults to `"cpu": "4", "memory": "4Gi"`. * The only supported
|
26418
|
-
# values for CPU are '1', '2', '4', and '8'. For more information, go to
|
26419
|
-
# cloud.google.com/run/docs/configuring/cpu. *
|
26420
|
-
#
|
27896
|
+
# values for CPU are '1', '2', '4', '6' and '8'. For more information, go to
|
27897
|
+
# https://cloud.google.com/run/docs/configuring/cpu. * The only supported values
|
27898
|
+
# for memory are '1Gi', '2Gi', ... '32 Gi'. * For required cpu on different
|
27899
|
+
# memory values, go to https://cloud.google.com/run/docs/configuring/memory-
|
27900
|
+
# limits
|
26421
27901
|
# Corresponds to the JSON property `resourceLimits`
|
26422
27902
|
# @return [Hash<String,String>]
|
26423
27903
|
attr_accessor :resource_limits
|
@@ -27185,6 +28665,48 @@ module Google
|
|
27185
28665
|
end
|
27186
28666
|
end
|
27187
28667
|
|
28668
|
+
# Message representing a single testable criterion for evaluation. One input
|
28669
|
+
# prompt could have multiple rubrics.
|
28670
|
+
class GoogleCloudAiplatformV1Rubric
|
28671
|
+
include Google::Apis::Core::Hashable
|
28672
|
+
|
28673
|
+
# Content of the rubric, defining the testable criteria.
|
28674
|
+
# Corresponds to the JSON property `content`
|
28675
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1RubricContent]
|
28676
|
+
attr_accessor :content
|
28677
|
+
|
28678
|
+
# Optional. The relative importance of this rubric.
|
28679
|
+
# Corresponds to the JSON property `importance`
|
28680
|
+
# @return [String]
|
28681
|
+
attr_accessor :importance
|
28682
|
+
|
28683
|
+
# Unique identifier for the rubric. This ID is used to refer to this rubric, e.g.
|
28684
|
+
# , in RubricVerdict.
|
28685
|
+
# Corresponds to the JSON property `rubricId`
|
28686
|
+
# @return [String]
|
28687
|
+
attr_accessor :rubric_id
|
28688
|
+
|
28689
|
+
# Optional. A type designator for the rubric, which can inform how it's
|
28690
|
+
# evaluated or interpreted by systems or users. It's recommended to use
|
28691
|
+
# consistent, well-defined, upper snake_case strings. Examples: "
|
28692
|
+
# SUMMARIZATION_QUALITY", "SAFETY_HARMFUL_CONTENT", "INSTRUCTION_ADHERENCE".
|
28693
|
+
# Corresponds to the JSON property `type`
|
28694
|
+
# @return [String]
|
28695
|
+
attr_accessor :type
|
28696
|
+
|
28697
|
+
def initialize(**args)
|
28698
|
+
update!(**args)
|
28699
|
+
end
|
28700
|
+
|
28701
|
+
# Update properties of this object
|
28702
|
+
def update!(**args)
|
28703
|
+
@content = args[:content] if args.key?(:content)
|
28704
|
+
@importance = args[:importance] if args.key?(:importance)
|
28705
|
+
@rubric_id = args[:rubric_id] if args.key?(:rubric_id)
|
28706
|
+
@type = args[:type] if args.key?(:type)
|
28707
|
+
end
|
28708
|
+
end
|
28709
|
+
|
27188
28710
|
# Instance and metric spec for RubricBasedInstructionFollowing metric.
|
27189
28711
|
class GoogleCloudAiplatformV1RubricBasedInstructionFollowingInput
|
27190
28712
|
include Google::Apis::Core::Hashable
|
@@ -27273,6 +28795,45 @@ module Google
|
|
27273
28795
|
end
|
27274
28796
|
end
|
27275
28797
|
|
28798
|
+
# Content of the rubric, defining the testable criteria.
|
28799
|
+
class GoogleCloudAiplatformV1RubricContent
|
28800
|
+
include Google::Apis::Core::Hashable
|
28801
|
+
|
28802
|
+
# Defines criteria based on a specific property.
|
28803
|
+
# Corresponds to the JSON property `property`
|
28804
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1RubricContentProperty]
|
28805
|
+
attr_accessor :property
|
28806
|
+
|
28807
|
+
def initialize(**args)
|
28808
|
+
update!(**args)
|
28809
|
+
end
|
28810
|
+
|
28811
|
+
# Update properties of this object
|
28812
|
+
def update!(**args)
|
28813
|
+
@property = args[:property] if args.key?(:property)
|
28814
|
+
end
|
28815
|
+
end
|
28816
|
+
|
28817
|
+
# Defines criteria based on a specific property.
|
28818
|
+
class GoogleCloudAiplatformV1RubricContentProperty
|
28819
|
+
include Google::Apis::Core::Hashable
|
28820
|
+
|
28821
|
+
# Description of the property being evaluated. Example: "The model's response is
|
28822
|
+
# grammatically correct."
|
28823
|
+
# Corresponds to the JSON property `description`
|
28824
|
+
# @return [String]
|
28825
|
+
attr_accessor :description
|
28826
|
+
|
28827
|
+
def initialize(**args)
|
28828
|
+
update!(**args)
|
28829
|
+
end
|
28830
|
+
|
28831
|
+
# Update properties of this object
|
28832
|
+
def update!(**args)
|
28833
|
+
@description = args[:description] if args.key?(:description)
|
28834
|
+
end
|
28835
|
+
end
|
28836
|
+
|
27276
28837
|
# Rubric critique result.
|
27277
28838
|
class GoogleCloudAiplatformV1RubricCritiqueResult
|
27278
28839
|
include Google::Apis::Core::Hashable
|
@@ -27300,6 +28861,116 @@ module Google
|
|
27300
28861
|
end
|
27301
28862
|
end
|
27302
28863
|
|
28864
|
+
# Specification for how rubrics should be generated.
|
28865
|
+
class GoogleCloudAiplatformV1RubricGenerationSpec
|
28866
|
+
include Google::Apis::Core::Hashable
|
28867
|
+
|
28868
|
+
# The configs for autorater. This is applicable to both EvaluateInstances and
|
28869
|
+
# EvaluateDataset.
|
28870
|
+
# Corresponds to the JSON property `modelConfig`
|
28871
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1AutoraterConfig]
|
28872
|
+
attr_accessor :model_config
|
28873
|
+
|
28874
|
+
# Template for the prompt used to generate rubrics. The details should be
|
28875
|
+
# updated based on the most-recent recipe requirements.
|
28876
|
+
# Corresponds to the JSON property `promptTemplate`
|
28877
|
+
# @return [String]
|
28878
|
+
attr_accessor :prompt_template
|
28879
|
+
|
28880
|
+
# The type of rubric content to be generated.
|
28881
|
+
# Corresponds to the JSON property `rubricContentType`
|
28882
|
+
# @return [String]
|
28883
|
+
attr_accessor :rubric_content_type
|
28884
|
+
|
28885
|
+
# Optional. An optional, pre-defined list of allowed types for generated rubrics.
|
28886
|
+
# If this field is provided, it implies `include_rubric_type` should be true,
|
28887
|
+
# and the generated rubric types should be chosen from this ontology.
|
28888
|
+
# Corresponds to the JSON property `rubricTypeOntology`
|
28889
|
+
# @return [Array<String>]
|
28890
|
+
attr_accessor :rubric_type_ontology
|
28891
|
+
|
28892
|
+
def initialize(**args)
|
28893
|
+
update!(**args)
|
28894
|
+
end
|
28895
|
+
|
28896
|
+
# Update properties of this object
|
28897
|
+
def update!(**args)
|
28898
|
+
@model_config = args[:model_config] if args.key?(:model_config)
|
28899
|
+
@prompt_template = args[:prompt_template] if args.key?(:prompt_template)
|
28900
|
+
@rubric_content_type = args[:rubric_content_type] if args.key?(:rubric_content_type)
|
28901
|
+
@rubric_type_ontology = args[:rubric_type_ontology] if args.key?(:rubric_type_ontology)
|
28902
|
+
end
|
28903
|
+
end
|
28904
|
+
|
28905
|
+
# A group of rubrics, used for grouping rubrics based on a metric or a version.
|
28906
|
+
class GoogleCloudAiplatformV1RubricGroup
|
28907
|
+
include Google::Apis::Core::Hashable
|
28908
|
+
|
28909
|
+
# Human-readable name for the group. This should be unique within a given
|
28910
|
+
# context if used for display or selection. Example: "Instruction Following V1",
|
28911
|
+
# "Content Quality - Summarization Task".
|
28912
|
+
# Corresponds to the JSON property `displayName`
|
28913
|
+
# @return [String]
|
28914
|
+
attr_accessor :display_name
|
28915
|
+
|
28916
|
+
# Unique identifier for the group.
|
28917
|
+
# Corresponds to the JSON property `groupId`
|
28918
|
+
# @return [String]
|
28919
|
+
attr_accessor :group_id
|
28920
|
+
|
28921
|
+
# Rubrics that are part of this group.
|
28922
|
+
# Corresponds to the JSON property `rubrics`
|
28923
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Rubric>]
|
28924
|
+
attr_accessor :rubrics
|
28925
|
+
|
28926
|
+
def initialize(**args)
|
28927
|
+
update!(**args)
|
28928
|
+
end
|
28929
|
+
|
28930
|
+
# Update properties of this object
|
28931
|
+
def update!(**args)
|
28932
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
28933
|
+
@group_id = args[:group_id] if args.key?(:group_id)
|
28934
|
+
@rubrics = args[:rubrics] if args.key?(:rubrics)
|
28935
|
+
end
|
28936
|
+
end
|
28937
|
+
|
28938
|
+
# Represents the verdict of an evaluation against a single rubric.
|
28939
|
+
class GoogleCloudAiplatformV1RubricVerdict
|
28940
|
+
include Google::Apis::Core::Hashable
|
28941
|
+
|
28942
|
+
# Message representing a single testable criterion for evaluation. One input
|
28943
|
+
# prompt could have multiple rubrics.
|
28944
|
+
# Corresponds to the JSON property `evaluatedRubric`
|
28945
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Rubric]
|
28946
|
+
attr_accessor :evaluated_rubric
|
28947
|
+
|
28948
|
+
# Optional. Human-readable reasoning or explanation for the verdict. This can
|
28949
|
+
# include specific examples or details from the evaluated content that justify
|
28950
|
+
# the given verdict.
|
28951
|
+
# Corresponds to the JSON property `reasoning`
|
28952
|
+
# @return [String]
|
28953
|
+
attr_accessor :reasoning
|
28954
|
+
|
28955
|
+
# Required. Outcome of the evaluation against the rubric, represented as a
|
28956
|
+
# boolean. `true` indicates a "Pass", `false` indicates a "Fail".
|
28957
|
+
# Corresponds to the JSON property `verdict`
|
28958
|
+
# @return [Boolean]
|
28959
|
+
attr_accessor :verdict
|
28960
|
+
alias_method :verdict?, :verdict
|
28961
|
+
|
28962
|
+
def initialize(**args)
|
28963
|
+
update!(**args)
|
28964
|
+
end
|
28965
|
+
|
28966
|
+
# Update properties of this object
|
28967
|
+
def update!(**args)
|
28968
|
+
@evaluated_rubric = args[:evaluated_rubric] if args.key?(:evaluated_rubric)
|
28969
|
+
@reasoning = args[:reasoning] if args.key?(:reasoning)
|
28970
|
+
@verdict = args[:verdict] if args.key?(:verdict)
|
28971
|
+
end
|
28972
|
+
end
|
28973
|
+
|
27303
28974
|
# Input for safety metric.
|
27304
28975
|
class GoogleCloudAiplatformV1SafetyInput
|
27305
28976
|
include Google::Apis::Core::Hashable
|
@@ -37065,6 +38736,37 @@ module Google
|
|
37065
38736
|
end
|
37066
38737
|
end
|
37067
38738
|
|
38739
|
+
# The summary metrics for the evaluation run.
|
38740
|
+
class GoogleCloudAiplatformV1SummaryMetrics
|
38741
|
+
include Google::Apis::Core::Hashable
|
38742
|
+
|
38743
|
+
# Optional. The number of items that failed to be evaluated.
|
38744
|
+
# Corresponds to the JSON property `failedItems`
|
38745
|
+
# @return [Fixnum]
|
38746
|
+
attr_accessor :failed_items
|
38747
|
+
|
38748
|
+
# Optional. Map of metric name to metric value.
|
38749
|
+
# Corresponds to the JSON property `metrics`
|
38750
|
+
# @return [Hash<String,Object>]
|
38751
|
+
attr_accessor :metrics
|
38752
|
+
|
38753
|
+
# Optional. The total number of items that were evaluated.
|
38754
|
+
# Corresponds to the JSON property `totalItems`
|
38755
|
+
# @return [Fixnum]
|
38756
|
+
attr_accessor :total_items
|
38757
|
+
|
38758
|
+
def initialize(**args)
|
38759
|
+
update!(**args)
|
38760
|
+
end
|
38761
|
+
|
38762
|
+
# Update properties of this object
|
38763
|
+
def update!(**args)
|
38764
|
+
@failed_items = args[:failed_items] if args.key?(:failed_items)
|
38765
|
+
@metrics = args[:metrics] if args.key?(:metrics)
|
38766
|
+
@total_items = args[:total_items] if args.key?(:total_items)
|
38767
|
+
end
|
38768
|
+
end
|
38769
|
+
|
37068
38770
|
# Hyperparameters for SFT.
|
37069
38771
|
class GoogleCloudAiplatformV1SupervisedHyperParameters
|
37070
38772
|
include Google::Apis::Core::Hashable
|
@@ -37364,6 +39066,55 @@ module Google
|
|
37364
39066
|
end
|
37365
39067
|
end
|
37366
39068
|
|
39069
|
+
# Represents a single synthetic example, composed of multiple fields. Used for
|
39070
|
+
# providing few-shot examples in the request and for returning generated
|
39071
|
+
# examples in the response.
|
39072
|
+
class GoogleCloudAiplatformV1SyntheticExample
|
39073
|
+
include Google::Apis::Core::Hashable
|
39074
|
+
|
39075
|
+
# Required. A list of fields that constitute an example.
|
39076
|
+
# Corresponds to the JSON property `fields`
|
39077
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SyntheticField>]
|
39078
|
+
attr_accessor :fields
|
39079
|
+
|
39080
|
+
def initialize(**args)
|
39081
|
+
update!(**args)
|
39082
|
+
end
|
39083
|
+
|
39084
|
+
# Update properties of this object
|
39085
|
+
def update!(**args)
|
39086
|
+
@fields = args[:fields] if args.key?(:fields)
|
39087
|
+
end
|
39088
|
+
end
|
39089
|
+
|
39090
|
+
# Represents a single named field within a SyntheticExample.
|
39091
|
+
class GoogleCloudAiplatformV1SyntheticField
|
39092
|
+
include Google::Apis::Core::Hashable
|
39093
|
+
|
39094
|
+
# The base structured datatype containing multi-part content of a message. A `
|
39095
|
+
# Content` includes a `role` field designating the producer of the `Content` and
|
39096
|
+
# a `parts` field containing multi-part data that contains the content of the
|
39097
|
+
# message turn.
|
39098
|
+
# Corresponds to the JSON property `content`
|
39099
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content]
|
39100
|
+
attr_accessor :content
|
39101
|
+
|
39102
|
+
# Optional. The name of the field.
|
39103
|
+
# Corresponds to the JSON property `fieldName`
|
39104
|
+
# @return [String]
|
39105
|
+
attr_accessor :field_name
|
39106
|
+
|
39107
|
+
def initialize(**args)
|
39108
|
+
update!(**args)
|
39109
|
+
end
|
39110
|
+
|
39111
|
+
# Update properties of this object
|
39112
|
+
def update!(**args)
|
39113
|
+
@content = args[:content] if args.key?(:content)
|
39114
|
+
@field_name = args[:field_name] if args.key?(:field_name)
|
39115
|
+
end
|
39116
|
+
end
|
39117
|
+
|
37367
39118
|
# The storage details for TFRecord output content.
|
37368
39119
|
class GoogleCloudAiplatformV1TfRecordDestination
|
37369
39120
|
include Google::Apis::Core::Hashable
|
@@ -37383,6 +39134,25 @@ module Google
|
|
37383
39134
|
end
|
37384
39135
|
end
|
37385
39136
|
|
39137
|
+
# Defines a generation strategy based on a high-level task description.
|
39138
|
+
class GoogleCloudAiplatformV1TaskDescriptionStrategy
|
39139
|
+
include Google::Apis::Core::Hashable
|
39140
|
+
|
39141
|
+
# Required. A high-level description of the synthetic data to be generated.
|
39142
|
+
# Corresponds to the JSON property `taskDescription`
|
39143
|
+
# @return [String]
|
39144
|
+
attr_accessor :task_description
|
39145
|
+
|
39146
|
+
def initialize(**args)
|
39147
|
+
update!(**args)
|
39148
|
+
end
|
39149
|
+
|
39150
|
+
# Update properties of this object
|
39151
|
+
def update!(**args)
|
39152
|
+
@task_description = args[:task_description] if args.key?(:task_description)
|
39153
|
+
end
|
39154
|
+
end
|
39155
|
+
|
37386
39156
|
# A tensor value type.
|
37387
39157
|
class GoogleCloudAiplatformV1Tensor
|
37388
39158
|
include Google::Apis::Core::Hashable
|