Class: Google::Cloud::DiscoveryEngine::V1beta::CheckGroundingResponse

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/discoveryengine/v1beta/grounded_generation_service.rb

Overview

Response message for the GroundedGenerationService.CheckGrounding method.

Defined Under Namespace

Classes: CheckGroundingFactChunk, Claim

Instance Attribute Summary collapse

Instance Attribute Details

#cited_chunks::Array<::Google::Cloud::DiscoveryEngine::V1beta::FactChunk>

Returns List of facts cited across all claims in the answer candidate. These are derived from the facts supplied in the request.

Returns:



488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
# File 'proto_docs/google/cloud/discoveryengine/v1beta/grounded_generation_service.rb', line 488

class CheckGroundingResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Fact chunk for grounding check.
  # @!attribute [rw] chunk_text
  #   @return [::String]
  #     Text content of the fact chunk. Can be at most 10K characters long.
  class CheckGroundingFactChunk
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Text and citation info for a claim in the answer candidate.
  # @!attribute [rw] start_pos
  #   @return [::Integer]
  #     Position indicating the start of the claim in the answer candidate,
  #     measured in bytes.
  # @!attribute [rw] end_pos
  #   @return [::Integer]
  #     Position indicating the end of the claim in the answer candidate,
  #     exclusive.
  # @!attribute [rw] claim_text
  #   @return [::String]
  #     Text for the claim in the answer candidate. Always provided regardless of
  #     whether citations or anti-citations are found.
  # @!attribute [rw] citation_indices
  #   @return [::Array<::Integer>]
  #     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.
  # @!attribute [rw] grounding_check_required
  #   @return [::Boolean]
  #     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
  #     {::Google::Cloud::DiscoveryEngine::V1beta::CheckGroundingResponse::Claim#citation_indices citation_indices},
  #     [anti_citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.anti_citation_indices],
  #     and
  #     [score][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.score]
  #     should not be returned.
  class Claim
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#cited_facts::Array<::Google::Cloud::DiscoveryEngine::V1beta::CheckGroundingResponse::CheckGroundingFactChunk>

Returns List of facts cited across all claims in the answer candidate. These are derived from the facts supplied in the request.

Returns:



488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
# File 'proto_docs/google/cloud/discoveryengine/v1beta/grounded_generation_service.rb', line 488

class CheckGroundingResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Fact chunk for grounding check.
  # @!attribute [rw] chunk_text
  #   @return [::String]
  #     Text content of the fact chunk. Can be at most 10K characters long.
  class CheckGroundingFactChunk
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Text and citation info for a claim in the answer candidate.
  # @!attribute [rw] start_pos
  #   @return [::Integer]
  #     Position indicating the start of the claim in the answer candidate,
  #     measured in bytes.
  # @!attribute [rw] end_pos
  #   @return [::Integer]
  #     Position indicating the end of the claim in the answer candidate,
  #     exclusive.
  # @!attribute [rw] claim_text
  #   @return [::String]
  #     Text for the claim in the answer candidate. Always provided regardless of
  #     whether citations or anti-citations are found.
  # @!attribute [rw] citation_indices
  #   @return [::Array<::Integer>]
  #     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.
  # @!attribute [rw] grounding_check_required
  #   @return [::Boolean]
  #     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
  #     {::Google::Cloud::DiscoveryEngine::V1beta::CheckGroundingResponse::Claim#citation_indices citation_indices},
  #     [anti_citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.anti_citation_indices],
  #     and
  #     [score][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.score]
  #     should not be returned.
  class Claim
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#claims::Array<::Google::Cloud::DiscoveryEngine::V1beta::CheckGroundingResponse::Claim>

Returns Claim texts and citation info across all claims in the answer candidate.

Returns:



488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
# File 'proto_docs/google/cloud/discoveryengine/v1beta/grounded_generation_service.rb', line 488

class CheckGroundingResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Fact chunk for grounding check.
  # @!attribute [rw] chunk_text
  #   @return [::String]
  #     Text content of the fact chunk. Can be at most 10K characters long.
  class CheckGroundingFactChunk
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Text and citation info for a claim in the answer candidate.
  # @!attribute [rw] start_pos
  #   @return [::Integer]
  #     Position indicating the start of the claim in the answer candidate,
  #     measured in bytes.
  # @!attribute [rw] end_pos
  #   @return [::Integer]
  #     Position indicating the end of the claim in the answer candidate,
  #     exclusive.
  # @!attribute [rw] claim_text
  #   @return [::String]
  #     Text for the claim in the answer candidate. Always provided regardless of
  #     whether citations or anti-citations are found.
  # @!attribute [rw] citation_indices
  #   @return [::Array<::Integer>]
  #     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.
  # @!attribute [rw] grounding_check_required
  #   @return [::Boolean]
  #     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
  #     {::Google::Cloud::DiscoveryEngine::V1beta::CheckGroundingResponse::Claim#citation_indices citation_indices},
  #     [anti_citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.anti_citation_indices],
  #     and
  #     [score][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.score]
  #     should not be returned.
  class Claim
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#support_score::Float

Returns The support score for the input answer candidate. Higher the score, higher is the fraction of claims that are supported by the provided facts. This is always set when a response is returned.

Returns:

  • (::Float)

    The support score for the input answer candidate. Higher the score, higher is the fraction of claims that are supported by the provided facts. This is always set when a response is returned.



488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
# File 'proto_docs/google/cloud/discoveryengine/v1beta/grounded_generation_service.rb', line 488

class CheckGroundingResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Fact chunk for grounding check.
  # @!attribute [rw] chunk_text
  #   @return [::String]
  #     Text content of the fact chunk. Can be at most 10K characters long.
  class CheckGroundingFactChunk
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Text and citation info for a claim in the answer candidate.
  # @!attribute [rw] start_pos
  #   @return [::Integer]
  #     Position indicating the start of the claim in the answer candidate,
  #     measured in bytes.
  # @!attribute [rw] end_pos
  #   @return [::Integer]
  #     Position indicating the end of the claim in the answer candidate,
  #     exclusive.
  # @!attribute [rw] claim_text
  #   @return [::String]
  #     Text for the claim in the answer candidate. Always provided regardless of
  #     whether citations or anti-citations are found.
  # @!attribute [rw] citation_indices
  #   @return [::Array<::Integer>]
  #     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.
  # @!attribute [rw] grounding_check_required
  #   @return [::Boolean]
  #     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
  #     {::Google::Cloud::DiscoveryEngine::V1beta::CheckGroundingResponse::Claim#citation_indices citation_indices},
  #     [anti_citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.anti_citation_indices],
  #     and
  #     [score][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.score]
  #     should not be returned.
  class Claim
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end