Class: Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary

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

Overview

Summary of the top N search results specified by the summary spec.

Defined Under Namespace

Modules: SummarySkippedReason Classes: Citation, CitationMetadata, CitationSource, Reference, SafetyAttributes, SummaryWithMetadata

Instance Attribute Summary collapse

Instance Attribute Details

#safety_attributes::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SafetyAttributes

Returns A collection of Safety Attribute categories and their associated confidence scores.

Returns:



1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1556

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

  # Safety Attribute categories and their associated confidence scores.
  # @!attribute [rw] categories
  #   @return [::Array<::String>]
  #     The display names of Safety Attribute categories associated with the
  #     generated content. Order matches the Scores.
  # @!attribute [rw] scores
  #   @return [::Array<::Float>]
  #     The confidence scores of the each category, higher
  #     value means higher confidence. Order matches the Categories.
  class SafetyAttributes
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation metadata.
  # @!attribute [rw] citations
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Citation>]
  #     Citations for segments.
  class CitationMetadata
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation info for a segment.
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     Index indicates the start of the segment, measured in bytes/unicode.
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     End of the attributed segment, exclusive.
  # @!attribute [rw] sources
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationSource>]
  #     Citation sources for the attributed segment.
  class Citation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation source.
  # @!attribute [rw] reference_index
  #   @return [::Integer]
  #     Document reference index from SummaryWithMetadata.references.
  #     It is 0-indexed and the value will be zero if the reference_index is
  #     not set explicitly.
  class CitationSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Document reference.
  # @!attribute [rw] title
  #   @return [::String]
  #     Title of the document.
  # @!attribute [rw] document
  #   @return [::String]
  #     Required.
  #     {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name} of the
  #     document. Full resource name of the referenced document, in the format
  #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
  # @!attribute [rw] uri
  #   @return [::String]
  #     Cloud Storage or HTTP uri for the document.
  # @!attribute [rw] chunk_contents
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference::ChunkContent>]
  #     List of cited chunk contents derived from document content.
  class Reference
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Chunk content.
    # @!attribute [rw] content
    #   @return [::String]
    #     Chunk textual content.
    # @!attribute [rw] page_identifier
    #   @return [::String]
    #     Page identifier.
    class ChunkContent
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary with metadata information.
  # @!attribute [rw] summary
  #   @return [::String]
  #     Summary text with no citation information.
  # @!attribute [rw] citation_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationMetadata]
  #     Citation metadata for given summary.
  # @!attribute [rw] references
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference>]
  #     Document References.
  class SummaryWithMetadata
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # An Enum for summary-skipped reasons.
  module SummarySkippedReason
    # Default value. The summary skipped reason is not specified.
    SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

    # The adversarial query ignored case.
    #
    # Only used when
    # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
    # is set to `true`.
    ADVERSARIAL_QUERY_IGNORED = 1

    # The non-summary seeking query ignored case.
    #
    # Google skips the summary if the query is chit chat.
    # Only used when
    # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
    # is set to `true`.
    NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

    # The out-of-domain query ignored case.
    #
    # Google skips the summary if there are no high-relevance search results.
    # For example, the data store contains facts about company A but the
    # user query is asking questions about company B.
    OUT_OF_DOMAIN_QUERY_IGNORED = 3

    # The potential policy violation case.
    #
    # Google skips the summary if there is a potential policy violation
    # detected. This includes content that may be violent or toxic.
    POTENTIAL_POLICY_VIOLATION = 4

    # The LLM addon not enabled case.
    #
    # Google skips the summary if the LLM addon is not enabled.
    LLM_ADDON_NOT_ENABLED = 5

    # The no relevant content case.
    #
    # Google skips the summary if there is no relevant content in the
    # retrieved search results.
    NO_RELEVANT_CONTENT = 6

    # The jail-breaking query ignored case.
    #
    # For example, "Reply in the tone of a competing company's CEO".
    # Only used when
    # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
    # is set to `true`.
    JAIL_BREAKING_QUERY_IGNORED = 7

    # The customer policy violation case.
    #
    # Google skips the summary if there is a customer policy violation
    # detected. The policy is defined by the customer.
    CUSTOMER_POLICY_VIOLATION = 8

    # The non-answer seeking query ignored case.
    #
    # Google skips the summary if the query doesn't have clear intent.
    # Only used when
    # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
    # is set to `true`.
    NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

    # The time out case.
    #
    # Google skips the summary if the time out.
    TIME_OUT = 10
  end
end

#summary_skipped_reasons::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummarySkippedReason>

Returns Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.

Returns:



1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1556

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

  # Safety Attribute categories and their associated confidence scores.
  # @!attribute [rw] categories
  #   @return [::Array<::String>]
  #     The display names of Safety Attribute categories associated with the
  #     generated content. Order matches the Scores.
  # @!attribute [rw] scores
  #   @return [::Array<::Float>]
  #     The confidence scores of the each category, higher
  #     value means higher confidence. Order matches the Categories.
  class SafetyAttributes
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation metadata.
  # @!attribute [rw] citations
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Citation>]
  #     Citations for segments.
  class CitationMetadata
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation info for a segment.
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     Index indicates the start of the segment, measured in bytes/unicode.
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     End of the attributed segment, exclusive.
  # @!attribute [rw] sources
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationSource>]
  #     Citation sources for the attributed segment.
  class Citation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation source.
  # @!attribute [rw] reference_index
  #   @return [::Integer]
  #     Document reference index from SummaryWithMetadata.references.
  #     It is 0-indexed and the value will be zero if the reference_index is
  #     not set explicitly.
  class CitationSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Document reference.
  # @!attribute [rw] title
  #   @return [::String]
  #     Title of the document.
  # @!attribute [rw] document
  #   @return [::String]
  #     Required.
  #     {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name} of the
  #     document. Full resource name of the referenced document, in the format
  #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
  # @!attribute [rw] uri
  #   @return [::String]
  #     Cloud Storage or HTTP uri for the document.
  # @!attribute [rw] chunk_contents
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference::ChunkContent>]
  #     List of cited chunk contents derived from document content.
  class Reference
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Chunk content.
    # @!attribute [rw] content
    #   @return [::String]
    #     Chunk textual content.
    # @!attribute [rw] page_identifier
    #   @return [::String]
    #     Page identifier.
    class ChunkContent
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary with metadata information.
  # @!attribute [rw] summary
  #   @return [::String]
  #     Summary text with no citation information.
  # @!attribute [rw] citation_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationMetadata]
  #     Citation metadata for given summary.
  # @!attribute [rw] references
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference>]
  #     Document References.
  class SummaryWithMetadata
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # An Enum for summary-skipped reasons.
  module SummarySkippedReason
    # Default value. The summary skipped reason is not specified.
    SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

    # The adversarial query ignored case.
    #
    # Only used when
    # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
    # is set to `true`.
    ADVERSARIAL_QUERY_IGNORED = 1

    # The non-summary seeking query ignored case.
    #
    # Google skips the summary if the query is chit chat.
    # Only used when
    # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
    # is set to `true`.
    NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

    # The out-of-domain query ignored case.
    #
    # Google skips the summary if there are no high-relevance search results.
    # For example, the data store contains facts about company A but the
    # user query is asking questions about company B.
    OUT_OF_DOMAIN_QUERY_IGNORED = 3

    # The potential policy violation case.
    #
    # Google skips the summary if there is a potential policy violation
    # detected. This includes content that may be violent or toxic.
    POTENTIAL_POLICY_VIOLATION = 4

    # The LLM addon not enabled case.
    #
    # Google skips the summary if the LLM addon is not enabled.
    LLM_ADDON_NOT_ENABLED = 5

    # The no relevant content case.
    #
    # Google skips the summary if there is no relevant content in the
    # retrieved search results.
    NO_RELEVANT_CONTENT = 6

    # The jail-breaking query ignored case.
    #
    # For example, "Reply in the tone of a competing company's CEO".
    # Only used when
    # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
    # is set to `true`.
    JAIL_BREAKING_QUERY_IGNORED = 7

    # The customer policy violation case.
    #
    # Google skips the summary if there is a customer policy violation
    # detected. The policy is defined by the customer.
    CUSTOMER_POLICY_VIOLATION = 8

    # The non-answer seeking query ignored case.
    #
    # Google skips the summary if the query doesn't have clear intent.
    # Only used when
    # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
    # is set to `true`.
    NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

    # The time out case.
    #
    # Google skips the summary if the time out.
    TIME_OUT = 10
  end
end

#summary_text::String

Returns The summary content.

Returns:

  • (::String)

    The summary content.



1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1556

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

  # Safety Attribute categories and their associated confidence scores.
  # @!attribute [rw] categories
  #   @return [::Array<::String>]
  #     The display names of Safety Attribute categories associated with the
  #     generated content. Order matches the Scores.
  # @!attribute [rw] scores
  #   @return [::Array<::Float>]
  #     The confidence scores of the each category, higher
  #     value means higher confidence. Order matches the Categories.
  class SafetyAttributes
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation metadata.
  # @!attribute [rw] citations
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Citation>]
  #     Citations for segments.
  class CitationMetadata
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation info for a segment.
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     Index indicates the start of the segment, measured in bytes/unicode.
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     End of the attributed segment, exclusive.
  # @!attribute [rw] sources
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationSource>]
  #     Citation sources for the attributed segment.
  class Citation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation source.
  # @!attribute [rw] reference_index
  #   @return [::Integer]
  #     Document reference index from SummaryWithMetadata.references.
  #     It is 0-indexed and the value will be zero if the reference_index is
  #     not set explicitly.
  class CitationSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Document reference.
  # @!attribute [rw] title
  #   @return [::String]
  #     Title of the document.
  # @!attribute [rw] document
  #   @return [::String]
  #     Required.
  #     {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name} of the
  #     document. Full resource name of the referenced document, in the format
  #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
  # @!attribute [rw] uri
  #   @return [::String]
  #     Cloud Storage or HTTP uri for the document.
  # @!attribute [rw] chunk_contents
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference::ChunkContent>]
  #     List of cited chunk contents derived from document content.
  class Reference
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Chunk content.
    # @!attribute [rw] content
    #   @return [::String]
    #     Chunk textual content.
    # @!attribute [rw] page_identifier
    #   @return [::String]
    #     Page identifier.
    class ChunkContent
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary with metadata information.
  # @!attribute [rw] summary
  #   @return [::String]
  #     Summary text with no citation information.
  # @!attribute [rw] citation_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationMetadata]
  #     Citation metadata for given summary.
  # @!attribute [rw] references
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference>]
  #     Document References.
  class SummaryWithMetadata
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # An Enum for summary-skipped reasons.
  module SummarySkippedReason
    # Default value. The summary skipped reason is not specified.
    SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

    # The adversarial query ignored case.
    #
    # Only used when
    # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
    # is set to `true`.
    ADVERSARIAL_QUERY_IGNORED = 1

    # The non-summary seeking query ignored case.
    #
    # Google skips the summary if the query is chit chat.
    # Only used when
    # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
    # is set to `true`.
    NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

    # The out-of-domain query ignored case.
    #
    # Google skips the summary if there are no high-relevance search results.
    # For example, the data store contains facts about company A but the
    # user query is asking questions about company B.
    OUT_OF_DOMAIN_QUERY_IGNORED = 3

    # The potential policy violation case.
    #
    # Google skips the summary if there is a potential policy violation
    # detected. This includes content that may be violent or toxic.
    POTENTIAL_POLICY_VIOLATION = 4

    # The LLM addon not enabled case.
    #
    # Google skips the summary if the LLM addon is not enabled.
    LLM_ADDON_NOT_ENABLED = 5

    # The no relevant content case.
    #
    # Google skips the summary if there is no relevant content in the
    # retrieved search results.
    NO_RELEVANT_CONTENT = 6

    # The jail-breaking query ignored case.
    #
    # For example, "Reply in the tone of a competing company's CEO".
    # Only used when
    # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
    # is set to `true`.
    JAIL_BREAKING_QUERY_IGNORED = 7

    # The customer policy violation case.
    #
    # Google skips the summary if there is a customer policy violation
    # detected. The policy is defined by the customer.
    CUSTOMER_POLICY_VIOLATION = 8

    # The non-answer seeking query ignored case.
    #
    # Google skips the summary if the query doesn't have clear intent.
    # Only used when
    # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
    # is set to `true`.
    NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

    # The time out case.
    #
    # Google skips the summary if the time out.
    TIME_OUT = 10
  end
end

#summary_with_metadata::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummaryWithMetadata

Returns Summary with metadata information.



1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1556

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

  # Safety Attribute categories and their associated confidence scores.
  # @!attribute [rw] categories
  #   @return [::Array<::String>]
  #     The display names of Safety Attribute categories associated with the
  #     generated content. Order matches the Scores.
  # @!attribute [rw] scores
  #   @return [::Array<::Float>]
  #     The confidence scores of the each category, higher
  #     value means higher confidence. Order matches the Categories.
  class SafetyAttributes
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation metadata.
  # @!attribute [rw] citations
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Citation>]
  #     Citations for segments.
  class CitationMetadata
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation info for a segment.
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     Index indicates the start of the segment, measured in bytes/unicode.
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     End of the attributed segment, exclusive.
  # @!attribute [rw] sources
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationSource>]
  #     Citation sources for the attributed segment.
  class Citation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation source.
  # @!attribute [rw] reference_index
  #   @return [::Integer]
  #     Document reference index from SummaryWithMetadata.references.
  #     It is 0-indexed and the value will be zero if the reference_index is
  #     not set explicitly.
  class CitationSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Document reference.
  # @!attribute [rw] title
  #   @return [::String]
  #     Title of the document.
  # @!attribute [rw] document
  #   @return [::String]
  #     Required.
  #     {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name} of the
  #     document. Full resource name of the referenced document, in the format
  #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
  # @!attribute [rw] uri
  #   @return [::String]
  #     Cloud Storage or HTTP uri for the document.
  # @!attribute [rw] chunk_contents
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference::ChunkContent>]
  #     List of cited chunk contents derived from document content.
  class Reference
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Chunk content.
    # @!attribute [rw] content
    #   @return [::String]
    #     Chunk textual content.
    # @!attribute [rw] page_identifier
    #   @return [::String]
    #     Page identifier.
    class ChunkContent
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary with metadata information.
  # @!attribute [rw] summary
  #   @return [::String]
  #     Summary text with no citation information.
  # @!attribute [rw] citation_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationMetadata]
  #     Citation metadata for given summary.
  # @!attribute [rw] references
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference>]
  #     Document References.
  class SummaryWithMetadata
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # An Enum for summary-skipped reasons.
  module SummarySkippedReason
    # Default value. The summary skipped reason is not specified.
    SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

    # The adversarial query ignored case.
    #
    # Only used when
    # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
    # is set to `true`.
    ADVERSARIAL_QUERY_IGNORED = 1

    # The non-summary seeking query ignored case.
    #
    # Google skips the summary if the query is chit chat.
    # Only used when
    # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
    # is set to `true`.
    NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

    # The out-of-domain query ignored case.
    #
    # Google skips the summary if there are no high-relevance search results.
    # For example, the data store contains facts about company A but the
    # user query is asking questions about company B.
    OUT_OF_DOMAIN_QUERY_IGNORED = 3

    # The potential policy violation case.
    #
    # Google skips the summary if there is a potential policy violation
    # detected. This includes content that may be violent or toxic.
    POTENTIAL_POLICY_VIOLATION = 4

    # The LLM addon not enabled case.
    #
    # Google skips the summary if the LLM addon is not enabled.
    LLM_ADDON_NOT_ENABLED = 5

    # The no relevant content case.
    #
    # Google skips the summary if there is no relevant content in the
    # retrieved search results.
    NO_RELEVANT_CONTENT = 6

    # The jail-breaking query ignored case.
    #
    # For example, "Reply in the tone of a competing company's CEO".
    # Only used when
    # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
    # is set to `true`.
    JAIL_BREAKING_QUERY_IGNORED = 7

    # The customer policy violation case.
    #
    # Google skips the summary if there is a customer policy violation
    # detected. The policy is defined by the customer.
    CUSTOMER_POLICY_VIOLATION = 8

    # The non-answer seeking query ignored case.
    #
    # Google skips the summary if the query doesn't have clear intent.
    # Only used when
    # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
    # is set to `true`.
    NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

    # The time out case.
    #
    # Google skips the summary if the time out.
    TIME_OUT = 10
  end
end