Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1QuestionAnsweringQualityInstance

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

Spec for question answering quality instance.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1QuestionAnsweringQualityInstance

Returns a new instance of GoogleCloudAiplatformV1QuestionAnsweringQualityInstance.



28905
28906
28907
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 28905

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

Instance Attribute Details

#contextString

Required. Text to answer the question. Corresponds to the JSON property context

Returns:

  • (String)


28888
28889
28890
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 28888

def context
  @context
end

#instructionString

Required. Question Answering prompt for LLM. Corresponds to the JSON property instruction

Returns:

  • (String)


28893
28894
28895
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 28893

def instruction
  @instruction
end

#predictionString

Required. Output of the evaluated model. Corresponds to the JSON property prediction

Returns:

  • (String)


28898
28899
28900
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 28898

def prediction
  @prediction
end

#referenceString

Optional. Ground truth used to compare against the prediction. Corresponds to the JSON property reference

Returns:

  • (String)


28903
28904
28905
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 28903

def reference
  @reference
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



28910
28911
28912
28913
28914
28915
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 28910

def update!(**args)
  @context = args[:context] if args.key?(:context)
  @instruction = args[:instruction] if args.key?(:instruction)
  @prediction = args[:prediction] if args.key?(:prediction)
  @reference = args[:reference] if args.key?(:reference)
end