Class: Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim
- Inherits:
-
Object
- Object
- Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/discoveryengine_v1beta/classes.rb,
lib/google/apis/discoveryengine_v1beta/representations.rb,
lib/google/apis/discoveryengine_v1beta/representations.rb
Overview
Text and citation info for a claim in the answer candidate.
Instance Attribute Summary collapse
-
#citation_indices ⇒ Array<Fixnum>
A list of indices (into 'cited_chunks') specifying the citations associated with the claim.
-
#claim_text ⇒ String
Text for the claim in the answer candidate.
-
#end_pos ⇒ Fixnum
Position indicating the end of the claim in the answer candidate, exclusive, in bytes.
-
#grounding_check_required ⇒ Boolean
(also: #grounding_check_required?)
Indicates that this claim required grounding check.
-
#score ⇒ Float
Confidence score for the claim in the answer candidate, in the range of [0, 1].
-
#start_pos ⇒ Fixnum
Position indicating the start of the claim in the answer candidate, measured in bytes.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim
constructor
A new instance of GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim
Returns a new instance of GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim.
22474 22475 22476 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 22474 def initialize(**args) update!(**args) end |
Instance Attribute Details
#citation_indices ⇒ Array<Fixnum>
A list of indices (into 'cited_chunks') specifying the citations associated
with the claim. For instance [1,3,4] means that cited_chunks[1], cited_chunks[
3], cited_chunks[4] are the facts cited supporting for the claim. A citation
to a fact indicates that the claim is supported by the fact.
Corresponds to the JSON property citationIndices
22429 22430 22431 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 22429 def citation_indices @citation_indices end |
#claim_text ⇒ String
Text for the claim in the answer candidate. Always provided regardless of
whether citations or anti-citations are found.
Corresponds to the JSON property claimText
22435 22436 22437 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 22435 def claim_text @claim_text end |
#end_pos ⇒ Fixnum
Position indicating the end of the claim in the answer candidate, exclusive,
in bytes. Note that this is not measured in characters and, therefore, must be
rendered as such. For example, if the claim text contains non-ASCII characters,
the start and end positions vary when measured in characters (programming-
language-dependent) and when measured in bytes (programming-language-
independent).
Corresponds to the JSON property endPos
22445 22446 22447 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 22445 def end_pos @end_pos end |
#grounding_check_required ⇒ Boolean Also known as: grounding_check_required?
Indicates that this claim required grounding check. When the system decided
this claim doesn't require attribution/grounding check, this field will be set
to false. In that case, no grounding check was done for the claim and
therefore citation_indices should not be returned.
Corresponds to the JSON property groundingCheckRequired
22453 22454 22455 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 22453 def grounding_check_required @grounding_check_required end |
#score ⇒ Float
Confidence score for the claim in the answer candidate, in the range of [0, 1].
This is set only when CheckGroundingRequest.grounding_spec.
enable_claim_level_score is true.
Corresponds to the JSON property score
22461 22462 22463 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 22461 def score @score end |
#start_pos ⇒ Fixnum
Position indicating the start of the claim in the answer candidate, measured
in bytes. Note that this is not measured in characters and, therefore, must be
rendered in the user interface keeping in mind that some characters may take
more than one byte. For example, if the claim text contains non-ASCII
characters, the start and end positions vary when measured in characters (
programming-language-dependent) and when measured in bytes (programming-
language-independent).
Corresponds to the JSON property startPos
22472 22473 22474 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 22472 def start_pos @start_pos end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
22479 22480 22481 22482 22483 22484 22485 22486 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 22479 def update!(**args) @citation_indices = args[:citation_indices] if args.key?(:citation_indices) @claim_text = args[:claim_text] if args.key?(:claim_text) @end_pos = args[:end_pos] if args.key?(:end_pos) @grounding_check_required = args[:grounding_check_required] if args.key?(:grounding_check_required) @score = args[:score] if args.key?(:score) @start_pos = args[:start_pos] if args.key?(:start_pos) end |