Class: Google::Cloud::DiscoveryEngine::V1beta::CheckGroundingResponse
- Inherits:
-
Object
- Object
- Google::Cloud::DiscoveryEngine::V1beta::CheckGroundingResponse
- 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
-
#cited_chunks ⇒ ::Array<::Google::Cloud::DiscoveryEngine::V1beta::FactChunk>
List of facts cited across all claims in the answer candidate.
-
#cited_facts ⇒ ::Array<::Google::Cloud::DiscoveryEngine::V1beta::CheckGroundingResponse::CheckGroundingFactChunk>
List of facts cited across all claims in the answer candidate.
-
#claims ⇒ ::Array<::Google::Cloud::DiscoveryEngine::V1beta::CheckGroundingResponse::Claim>
Claim texts and citation info across all claims in the answer candidate.
-
#support_score ⇒ ::Float
The support score for the input answer candidate.
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.
603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 |
# File 'proto_docs/google/cloud/discoveryengine/v1beta/grounded_generation_service.rb', line 603 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. 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). # @!attribute [rw] end_pos # @return [::Integer] # 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). # @!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} # should not be returned. # @!attribute [rw] score # @return [::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. 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.
603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 |
# File 'proto_docs/google/cloud/discoveryengine/v1beta/grounded_generation_service.rb', line 603 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. 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). # @!attribute [rw] end_pos # @return [::Integer] # 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). # @!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} # should not be returned. # @!attribute [rw] score # @return [::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. 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.
603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 |
# File 'proto_docs/google/cloud/discoveryengine/v1beta/grounded_generation_service.rb', line 603 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. 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). # @!attribute [rw] end_pos # @return [::Integer] # 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). # @!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} # should not be returned. # @!attribute [rw] score # @return [::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. 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.
603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 |
# File 'proto_docs/google/cloud/discoveryengine/v1beta/grounded_generation_service.rb', line 603 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. 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). # @!attribute [rw] end_pos # @return [::Integer] # 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). # @!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} # should not be returned. # @!attribute [rw] score # @return [::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. class Claim include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |