Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRequest

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/aiplatform_v1/classes.rb,
lib/google/apis/aiplatform_v1/representations.rb,
lib/google/apis/aiplatform_v1/representations.rb

Overview

A single evaluation request supporting input for both single-turn model generation and multi-turn agent execution traces. Valid input modes: 1. Inference Mode: prompt is set (containing text or AgentData context). 2. Offline Eval Mode: prompt is unset, and candidate_responses contains agent_data (the completed execution trace). Validation Rule: Either prompt must be set, OR at least one of the candidate_responses must contain agent_data.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1EvaluationRequest

Returns a new instance of GoogleCloudAiplatformV1EvaluationRequest.



10604
10605
10606
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10604

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#candidate_responsesArray<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1CandidateResponse>

Optional. Responses from model under test and other baseline models for comparison. Corresponds to the JSON property candidateResponses



10585
10586
10587
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10585

def candidate_responses
  @candidate_responses
end

#golden_responseGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1CandidateResponse

Responses from model or agent. Corresponds to the JSON property goldenResponse



10590
10591
10592
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10590

def golden_response
  @golden_response
end

#promptGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationPrompt

Prompt to be evaluated. This can represent a single-turn prompt or a multi- turn conversation for agent evaluations. Corresponds to the JSON property prompt



10596
10597
10598
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10596

def prompt
  @prompt
end

#rubricsHash<String,Google::Apis::AiplatformV1::GoogleCloudAiplatformV1RubricGroup>

Optional. Named groups of rubrics associated with this prompt. The key is a user-defined name for the rubric group. Corresponds to the JSON property rubrics



10602
10603
10604
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10602

def rubrics
  @rubrics
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10609
10610
10611
10612
10613
10614
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10609

def update!(**args)
  @candidate_responses = args[:candidate_responses] if args.key?(:candidate_responses)
  @golden_response = args[:golden_response] if args.key?(:golden_response)
  @prompt = args[:prompt] if args.key?(:prompt)
  @rubrics = args[:rubrics] if args.key?(:rubrics)
end