Class: Google::Cloud::DiscoveryEngine::V1::CheckGroundingResponse
- Inherits:
-
Object
- Object
- Google::Cloud::DiscoveryEngine::V1::CheckGroundingResponse
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/discoveryengine/v1/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::V1::FactChunk>
List of facts cited across all claims in the answer candidate.
-
#cited_facts ⇒ ::Array<::Google::Cloud::DiscoveryEngine::V1::CheckGroundingResponse::CheckGroundingFactChunk>
List of facts cited across all claims in the answer candidate.
-
#claims ⇒ ::Array<::Google::Cloud::DiscoveryEngine::V1::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::V1::FactChunk>
Returns List of facts cited across all claims in the answer candidate. These are derived from the facts supplied in the request.
553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 |
# File 'proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb', line 553 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::V1::CheckGroundingResponse::Claim#citation_indices citation_indices} # should not be returned. class Claim include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#cited_facts ⇒ ::Array<::Google::Cloud::DiscoveryEngine::V1::CheckGroundingResponse::CheckGroundingFactChunk>
Returns List of facts cited across all claims in the answer candidate. These are derived from the facts supplied in the request.
553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 |
# File 'proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb', line 553 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::V1::CheckGroundingResponse::Claim#citation_indices citation_indices} # should not be returned. class Claim include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#claims ⇒ ::Array<::Google::Cloud::DiscoveryEngine::V1::CheckGroundingResponse::Claim>
Returns Claim texts and citation info across all claims in the answer candidate.
553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 |
# File 'proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb', line 553 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::V1::CheckGroundingResponse::Claim#citation_indices citation_indices} # 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.
553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 |
# File 'proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb', line 553 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::V1::CheckGroundingResponse::Claim#citation_indices citation_indices} # should not be returned. class Claim include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |