google-cloud-discovery_engine-v1beta 0.21.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 225df45cd6bd848d2256f00fb2165e3be81bac5c084e28be3bb9688cb94eed82
4
- data.tar.gz: 5527ba6246f256b79763414ae684f266f4f882dca319f33371bce5b269cbf20d
3
+ metadata.gz: 78e275b33576c302ab8e440d1c9163966b8d2fc2161ed9ad7c0dd7713d0f646d
4
+ data.tar.gz: 1c667b21e7349f66746ff44468c0dc048970d4992d0744b767ca76d8567109b6
5
5
  SHA512:
6
- metadata.gz: f17a2e5602e3aff5c862f5595549b94e0ccb40d48157cd72efd63fbc6574d78a6cdeab2e859c58aa90b1d48d3c5d5daa1d2b808ba268fcd2329de6a1ee97dadd
7
- data.tar.gz: 31aea61137e12ae88a0c64e6c0801025ffb7b13a4b992e06f690fcdd8e09078ea8b29aee7991360eda0d62bc5f389328c340bb196c858f37a580a97ef83e4b8d
6
+ metadata.gz: 17395001fae5b28121556691832d9ef5be24ab74cd05d6c8bf9a7f81699b2c360f37f6eb2975b340bb68622fea5d40be0dbef145641ea15ab9e5b38168f6d219
7
+ data.tar.gz: 9ad1d72c052d58339762023545c6b5731ea5f47a400b58ac4742dc57736403b1e0f081a6638267dc020ba44d4ba2078f4662966435fee46a014ee61d74d9cbb9
@@ -217,7 +217,7 @@ module Google
217
217
  # @param options [::Gapic::CallOptions, ::Hash]
218
218
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
219
219
  #
220
- # @overload search(serving_config: nil, branch: nil, query: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, one_box_page_size: nil, data_store_specs: nil, filter: nil, canonical_filter: nil, order_by: nil, user_info: nil, language_code: nil, region_code: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, embedding_spec: nil, ranking_expression: nil, safe_search: nil, user_labels: nil, natural_language_query_understanding_spec: nil, search_as_you_type_spec: nil, session: nil, session_spec: nil, relevance_threshold: nil, personalization_spec: nil)
220
+ # @overload search(serving_config: nil, branch: nil, query: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, one_box_page_size: nil, data_store_specs: nil, filter: nil, canonical_filter: nil, order_by: nil, user_info: nil, language_code: nil, region_code: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, embedding_spec: nil, ranking_expression: nil, ranking_expression_backend: nil, safe_search: nil, user_labels: nil, natural_language_query_understanding_spec: nil, search_as_you_type_spec: nil, session: nil, session_spec: nil, relevance_threshold: nil, personalization_spec: nil)
221
221
  # Pass arguments to `search` via keyword arguments. Note that at
222
222
  # least one keyword argument is required. To specify no parameters, or to keep all
223
223
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -397,8 +397,14 @@ module Google
397
397
  # The ranking expression controls the customized ranking on retrieval
398
398
  # documents. This overrides
399
399
  # {::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig#ranking_expression ServingConfig.ranking_expression}.
400
- # The ranking expression is a single function or multiple functions that are
401
- # joined by "+".
400
+ # The syntax and supported features depend on the
401
+ # `ranking_expression_backend` value. If `ranking_expression_backend` is not
402
+ # provided, it defaults to `RANK_BY_EMBEDDING`.
403
+ #
404
+ # If
405
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#ranking_expression_backend ranking_expression_backend}
406
+ # is not provided or set to `RANK_BY_EMBEDDING`, it should be a single
407
+ # function or multiple functions that are joined by "+".
402
408
  #
403
409
  # * ranking_expression = function, { " + ", function };
404
410
  #
@@ -413,13 +419,73 @@ module Google
413
419
  # between query and document.
414
420
  # * `embedding_field_path`: the document embedding field
415
421
  # used with query embedding vector.
416
- # * `dotProduct`: embedding function between embedding_field_path and query
417
- # embedding vector.
422
+ # * `dotProduct`: embedding function between `embedding_field_path` and
423
+ # query embedding vector.
418
424
  #
419
425
  # Example ranking expression:
420
426
  #
421
427
  # If document has an embedding field doc_embedding, the ranking expression
422
428
  # could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
429
+ #
430
+ # If
431
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#ranking_expression_backend ranking_expression_backend}
432
+ # is set to `RANK_BY_FORMULA`, the following expression types (and
433
+ # combinations of those chained using + or
434
+ # * operators) are supported:
435
+ #
436
+ # * `double`
437
+ # * `signal`
438
+ # * `log(signal)`
439
+ # * `exp(signal)`
440
+ # * `rr(signal, double > 0)` -- reciprocal rank transformation with second
441
+ # argument being a denominator constant.
442
+ # * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise.
443
+ # * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns
444
+ # signal2 | double, else returns signal1.
445
+ #
446
+ # Here are a few examples of ranking formulas that use the supported
447
+ # ranking expression types:
448
+ #
449
+ # - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`
450
+ # -- mostly rank by the logarithm of `keyword_similarity_score` with slight
451
+ # `semantic_smilarity_score` adjustment.
452
+ # - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 *
453
+ # is_nan(keyword_similarity_score)` -- rank by the exponent of
454
+ # `semantic_similarity_score` filling the value with 0 if it's NaN, also
455
+ # add constant 0.3 adjustment to the final score if
456
+ # `semantic_similarity_score` is NaN.
457
+ # - `0.2 * rr(semantic_similarity_score, 16) + 0.8 *
458
+ # rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank
459
+ # of `keyword_similarity_score` with slight adjustment of reciprocal rank
460
+ # of `semantic_smilarity_score`.
461
+ #
462
+ # The following signals are supported:
463
+ #
464
+ # * `semantic_similarity_score`: semantic similarity adjustment that is
465
+ # calculated using the embeddings generated by a proprietary Google model.
466
+ # This score determines how semantically similar a search query is to a
467
+ # document.
468
+ # * `keyword_similarity_score`: keyword match adjustment uses the Best
469
+ # Match 25 (BM25) ranking function. This score is calculated using a
470
+ # probabilistic model to estimate the probability that a document is
471
+ # relevant to a given query.
472
+ # * `relevance_score`: semantic relevance adjustment that uses a
473
+ # proprietary Google model to determine the meaning and intent behind a
474
+ # user's query in context with the content in the documents.
475
+ # * `pctr_rank`: predicted conversion rate adjustment as a rank use
476
+ # predicted Click-through rate (pCTR) to gauge the relevance and
477
+ # attractiveness of a search result from a user's perspective. A higher
478
+ # pCTR suggests that the result is more likely to satisfy the user's query
479
+ # and intent, making it a valuable signal for ranking.
480
+ # * `freshness_rank`: freshness adjustment as a rank
481
+ # * `document_age`: The time in hours elapsed since the document was last
482
+ # updated, a floating-point number (e.g., 0.25 means 15 minutes).
483
+ # * `topicality_rank`: topicality adjustment as a rank. Uses proprietary
484
+ # Google model to determine the keyword-based overlap between the query and
485
+ # the document.
486
+ # * `base_rank`: the default rank of the result
487
+ # @param ranking_expression_backend [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::RankingExpressionBackend]
488
+ # The backend to use for the ranking expression evaluation.
423
489
  # @param safe_search [::Boolean]
424
490
  # Whether to turn on safe search. This is only supported for
425
491
  # website search.
@@ -586,7 +652,7 @@ module Google
586
652
  # @param options [::Gapic::CallOptions, ::Hash]
587
653
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
588
654
  #
589
- # @overload search_lite(serving_config: nil, branch: nil, query: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, one_box_page_size: nil, data_store_specs: nil, filter: nil, canonical_filter: nil, order_by: nil, user_info: nil, language_code: nil, region_code: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, embedding_spec: nil, ranking_expression: nil, safe_search: nil, user_labels: nil, natural_language_query_understanding_spec: nil, search_as_you_type_spec: nil, session: nil, session_spec: nil, relevance_threshold: nil, personalization_spec: nil)
655
+ # @overload search_lite(serving_config: nil, branch: nil, query: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, one_box_page_size: nil, data_store_specs: nil, filter: nil, canonical_filter: nil, order_by: nil, user_info: nil, language_code: nil, region_code: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, embedding_spec: nil, ranking_expression: nil, ranking_expression_backend: nil, safe_search: nil, user_labels: nil, natural_language_query_understanding_spec: nil, search_as_you_type_spec: nil, session: nil, session_spec: nil, relevance_threshold: nil, personalization_spec: nil)
590
656
  # Pass arguments to `search_lite` via keyword arguments. Note that at
591
657
  # least one keyword argument is required. To specify no parameters, or to keep all
592
658
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -766,8 +832,14 @@ module Google
766
832
  # The ranking expression controls the customized ranking on retrieval
767
833
  # documents. This overrides
768
834
  # {::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig#ranking_expression ServingConfig.ranking_expression}.
769
- # The ranking expression is a single function or multiple functions that are
770
- # joined by "+".
835
+ # The syntax and supported features depend on the
836
+ # `ranking_expression_backend` value. If `ranking_expression_backend` is not
837
+ # provided, it defaults to `RANK_BY_EMBEDDING`.
838
+ #
839
+ # If
840
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#ranking_expression_backend ranking_expression_backend}
841
+ # is not provided or set to `RANK_BY_EMBEDDING`, it should be a single
842
+ # function or multiple functions that are joined by "+".
771
843
  #
772
844
  # * ranking_expression = function, { " + ", function };
773
845
  #
@@ -782,13 +854,73 @@ module Google
782
854
  # between query and document.
783
855
  # * `embedding_field_path`: the document embedding field
784
856
  # used with query embedding vector.
785
- # * `dotProduct`: embedding function between embedding_field_path and query
786
- # embedding vector.
857
+ # * `dotProduct`: embedding function between `embedding_field_path` and
858
+ # query embedding vector.
787
859
  #
788
860
  # Example ranking expression:
789
861
  #
790
862
  # If document has an embedding field doc_embedding, the ranking expression
791
863
  # could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
864
+ #
865
+ # If
866
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#ranking_expression_backend ranking_expression_backend}
867
+ # is set to `RANK_BY_FORMULA`, the following expression types (and
868
+ # combinations of those chained using + or
869
+ # * operators) are supported:
870
+ #
871
+ # * `double`
872
+ # * `signal`
873
+ # * `log(signal)`
874
+ # * `exp(signal)`
875
+ # * `rr(signal, double > 0)` -- reciprocal rank transformation with second
876
+ # argument being a denominator constant.
877
+ # * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise.
878
+ # * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns
879
+ # signal2 | double, else returns signal1.
880
+ #
881
+ # Here are a few examples of ranking formulas that use the supported
882
+ # ranking expression types:
883
+ #
884
+ # - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`
885
+ # -- mostly rank by the logarithm of `keyword_similarity_score` with slight
886
+ # `semantic_smilarity_score` adjustment.
887
+ # - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 *
888
+ # is_nan(keyword_similarity_score)` -- rank by the exponent of
889
+ # `semantic_similarity_score` filling the value with 0 if it's NaN, also
890
+ # add constant 0.3 adjustment to the final score if
891
+ # `semantic_similarity_score` is NaN.
892
+ # - `0.2 * rr(semantic_similarity_score, 16) + 0.8 *
893
+ # rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank
894
+ # of `keyword_similarity_score` with slight adjustment of reciprocal rank
895
+ # of `semantic_smilarity_score`.
896
+ #
897
+ # The following signals are supported:
898
+ #
899
+ # * `semantic_similarity_score`: semantic similarity adjustment that is
900
+ # calculated using the embeddings generated by a proprietary Google model.
901
+ # This score determines how semantically similar a search query is to a
902
+ # document.
903
+ # * `keyword_similarity_score`: keyword match adjustment uses the Best
904
+ # Match 25 (BM25) ranking function. This score is calculated using a
905
+ # probabilistic model to estimate the probability that a document is
906
+ # relevant to a given query.
907
+ # * `relevance_score`: semantic relevance adjustment that uses a
908
+ # proprietary Google model to determine the meaning and intent behind a
909
+ # user's query in context with the content in the documents.
910
+ # * `pctr_rank`: predicted conversion rate adjustment as a rank use
911
+ # predicted Click-through rate (pCTR) to gauge the relevance and
912
+ # attractiveness of a search result from a user's perspective. A higher
913
+ # pCTR suggests that the result is more likely to satisfy the user's query
914
+ # and intent, making it a valuable signal for ranking.
915
+ # * `freshness_rank`: freshness adjustment as a rank
916
+ # * `document_age`: The time in hours elapsed since the document was last
917
+ # updated, a floating-point number (e.g., 0.25 means 15 minutes).
918
+ # * `topicality_rank`: topicality adjustment as a rank. Uses proprietary
919
+ # Google model to determine the keyword-based overlap between the query and
920
+ # the document.
921
+ # * `base_rank`: the default rank of the result
922
+ # @param ranking_expression_backend [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::RankingExpressionBackend]
923
+ # The backend to use for the ranking expression evaluation.
792
924
  # @param safe_search [::Boolean]
793
925
  # Whether to turn on safe search. This is only supported for
794
926
  # website search.
@@ -210,7 +210,7 @@ module Google
210
210
  # @param options [::Gapic::CallOptions, ::Hash]
211
211
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
212
212
  #
213
- # @overload search(serving_config: nil, branch: nil, query: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, one_box_page_size: nil, data_store_specs: nil, filter: nil, canonical_filter: nil, order_by: nil, user_info: nil, language_code: nil, region_code: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, embedding_spec: nil, ranking_expression: nil, safe_search: nil, user_labels: nil, natural_language_query_understanding_spec: nil, search_as_you_type_spec: nil, session: nil, session_spec: nil, relevance_threshold: nil, personalization_spec: nil)
213
+ # @overload search(serving_config: nil, branch: nil, query: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, one_box_page_size: nil, data_store_specs: nil, filter: nil, canonical_filter: nil, order_by: nil, user_info: nil, language_code: nil, region_code: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, embedding_spec: nil, ranking_expression: nil, ranking_expression_backend: nil, safe_search: nil, user_labels: nil, natural_language_query_understanding_spec: nil, search_as_you_type_spec: nil, session: nil, session_spec: nil, relevance_threshold: nil, personalization_spec: nil)
214
214
  # Pass arguments to `search` via keyword arguments. Note that at
215
215
  # least one keyword argument is required. To specify no parameters, or to keep all
216
216
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -390,8 +390,14 @@ module Google
390
390
  # The ranking expression controls the customized ranking on retrieval
391
391
  # documents. This overrides
392
392
  # {::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig#ranking_expression ServingConfig.ranking_expression}.
393
- # The ranking expression is a single function or multiple functions that are
394
- # joined by "+".
393
+ # The syntax and supported features depend on the
394
+ # `ranking_expression_backend` value. If `ranking_expression_backend` is not
395
+ # provided, it defaults to `RANK_BY_EMBEDDING`.
396
+ #
397
+ # If
398
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#ranking_expression_backend ranking_expression_backend}
399
+ # is not provided or set to `RANK_BY_EMBEDDING`, it should be a single
400
+ # function or multiple functions that are joined by "+".
395
401
  #
396
402
  # * ranking_expression = function, { " + ", function };
397
403
  #
@@ -406,13 +412,73 @@ module Google
406
412
  # between query and document.
407
413
  # * `embedding_field_path`: the document embedding field
408
414
  # used with query embedding vector.
409
- # * `dotProduct`: embedding function between embedding_field_path and query
410
- # embedding vector.
415
+ # * `dotProduct`: embedding function between `embedding_field_path` and
416
+ # query embedding vector.
411
417
  #
412
418
  # Example ranking expression:
413
419
  #
414
420
  # If document has an embedding field doc_embedding, the ranking expression
415
421
  # could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
422
+ #
423
+ # If
424
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#ranking_expression_backend ranking_expression_backend}
425
+ # is set to `RANK_BY_FORMULA`, the following expression types (and
426
+ # combinations of those chained using + or
427
+ # * operators) are supported:
428
+ #
429
+ # * `double`
430
+ # * `signal`
431
+ # * `log(signal)`
432
+ # * `exp(signal)`
433
+ # * `rr(signal, double > 0)` -- reciprocal rank transformation with second
434
+ # argument being a denominator constant.
435
+ # * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise.
436
+ # * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns
437
+ # signal2 | double, else returns signal1.
438
+ #
439
+ # Here are a few examples of ranking formulas that use the supported
440
+ # ranking expression types:
441
+ #
442
+ # - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`
443
+ # -- mostly rank by the logarithm of `keyword_similarity_score` with slight
444
+ # `semantic_smilarity_score` adjustment.
445
+ # - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 *
446
+ # is_nan(keyword_similarity_score)` -- rank by the exponent of
447
+ # `semantic_similarity_score` filling the value with 0 if it's NaN, also
448
+ # add constant 0.3 adjustment to the final score if
449
+ # `semantic_similarity_score` is NaN.
450
+ # - `0.2 * rr(semantic_similarity_score, 16) + 0.8 *
451
+ # rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank
452
+ # of `keyword_similarity_score` with slight adjustment of reciprocal rank
453
+ # of `semantic_smilarity_score`.
454
+ #
455
+ # The following signals are supported:
456
+ #
457
+ # * `semantic_similarity_score`: semantic similarity adjustment that is
458
+ # calculated using the embeddings generated by a proprietary Google model.
459
+ # This score determines how semantically similar a search query is to a
460
+ # document.
461
+ # * `keyword_similarity_score`: keyword match adjustment uses the Best
462
+ # Match 25 (BM25) ranking function. This score is calculated using a
463
+ # probabilistic model to estimate the probability that a document is
464
+ # relevant to a given query.
465
+ # * `relevance_score`: semantic relevance adjustment that uses a
466
+ # proprietary Google model to determine the meaning and intent behind a
467
+ # user's query in context with the content in the documents.
468
+ # * `pctr_rank`: predicted conversion rate adjustment as a rank use
469
+ # predicted Click-through rate (pCTR) to gauge the relevance and
470
+ # attractiveness of a search result from a user's perspective. A higher
471
+ # pCTR suggests that the result is more likely to satisfy the user's query
472
+ # and intent, making it a valuable signal for ranking.
473
+ # * `freshness_rank`: freshness adjustment as a rank
474
+ # * `document_age`: The time in hours elapsed since the document was last
475
+ # updated, a floating-point number (e.g., 0.25 means 15 minutes).
476
+ # * `topicality_rank`: topicality adjustment as a rank. Uses proprietary
477
+ # Google model to determine the keyword-based overlap between the query and
478
+ # the document.
479
+ # * `base_rank`: the default rank of the result
480
+ # @param ranking_expression_backend [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::RankingExpressionBackend]
481
+ # The backend to use for the ranking expression evaluation.
416
482
  # @param safe_search [::Boolean]
417
483
  # Whether to turn on safe search. This is only supported for
418
484
  # website search.
@@ -572,7 +638,7 @@ module Google
572
638
  # @param options [::Gapic::CallOptions, ::Hash]
573
639
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
574
640
  #
575
- # @overload search_lite(serving_config: nil, branch: nil, query: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, one_box_page_size: nil, data_store_specs: nil, filter: nil, canonical_filter: nil, order_by: nil, user_info: nil, language_code: nil, region_code: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, embedding_spec: nil, ranking_expression: nil, safe_search: nil, user_labels: nil, natural_language_query_understanding_spec: nil, search_as_you_type_spec: nil, session: nil, session_spec: nil, relevance_threshold: nil, personalization_spec: nil)
641
+ # @overload search_lite(serving_config: nil, branch: nil, query: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, one_box_page_size: nil, data_store_specs: nil, filter: nil, canonical_filter: nil, order_by: nil, user_info: nil, language_code: nil, region_code: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, embedding_spec: nil, ranking_expression: nil, ranking_expression_backend: nil, safe_search: nil, user_labels: nil, natural_language_query_understanding_spec: nil, search_as_you_type_spec: nil, session: nil, session_spec: nil, relevance_threshold: nil, personalization_spec: nil)
576
642
  # Pass arguments to `search_lite` via keyword arguments. Note that at
577
643
  # least one keyword argument is required. To specify no parameters, or to keep all
578
644
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -752,8 +818,14 @@ module Google
752
818
  # The ranking expression controls the customized ranking on retrieval
753
819
  # documents. This overrides
754
820
  # {::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig#ranking_expression ServingConfig.ranking_expression}.
755
- # The ranking expression is a single function or multiple functions that are
756
- # joined by "+".
821
+ # The syntax and supported features depend on the
822
+ # `ranking_expression_backend` value. If `ranking_expression_backend` is not
823
+ # provided, it defaults to `RANK_BY_EMBEDDING`.
824
+ #
825
+ # If
826
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#ranking_expression_backend ranking_expression_backend}
827
+ # is not provided or set to `RANK_BY_EMBEDDING`, it should be a single
828
+ # function or multiple functions that are joined by "+".
757
829
  #
758
830
  # * ranking_expression = function, { " + ", function };
759
831
  #
@@ -768,13 +840,73 @@ module Google
768
840
  # between query and document.
769
841
  # * `embedding_field_path`: the document embedding field
770
842
  # used with query embedding vector.
771
- # * `dotProduct`: embedding function between embedding_field_path and query
772
- # embedding vector.
843
+ # * `dotProduct`: embedding function between `embedding_field_path` and
844
+ # query embedding vector.
773
845
  #
774
846
  # Example ranking expression:
775
847
  #
776
848
  # If document has an embedding field doc_embedding, the ranking expression
777
849
  # could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
850
+ #
851
+ # If
852
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#ranking_expression_backend ranking_expression_backend}
853
+ # is set to `RANK_BY_FORMULA`, the following expression types (and
854
+ # combinations of those chained using + or
855
+ # * operators) are supported:
856
+ #
857
+ # * `double`
858
+ # * `signal`
859
+ # * `log(signal)`
860
+ # * `exp(signal)`
861
+ # * `rr(signal, double > 0)` -- reciprocal rank transformation with second
862
+ # argument being a denominator constant.
863
+ # * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise.
864
+ # * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns
865
+ # signal2 | double, else returns signal1.
866
+ #
867
+ # Here are a few examples of ranking formulas that use the supported
868
+ # ranking expression types:
869
+ #
870
+ # - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`
871
+ # -- mostly rank by the logarithm of `keyword_similarity_score` with slight
872
+ # `semantic_smilarity_score` adjustment.
873
+ # - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 *
874
+ # is_nan(keyword_similarity_score)` -- rank by the exponent of
875
+ # `semantic_similarity_score` filling the value with 0 if it's NaN, also
876
+ # add constant 0.3 adjustment to the final score if
877
+ # `semantic_similarity_score` is NaN.
878
+ # - `0.2 * rr(semantic_similarity_score, 16) + 0.8 *
879
+ # rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank
880
+ # of `keyword_similarity_score` with slight adjustment of reciprocal rank
881
+ # of `semantic_smilarity_score`.
882
+ #
883
+ # The following signals are supported:
884
+ #
885
+ # * `semantic_similarity_score`: semantic similarity adjustment that is
886
+ # calculated using the embeddings generated by a proprietary Google model.
887
+ # This score determines how semantically similar a search query is to a
888
+ # document.
889
+ # * `keyword_similarity_score`: keyword match adjustment uses the Best
890
+ # Match 25 (BM25) ranking function. This score is calculated using a
891
+ # probabilistic model to estimate the probability that a document is
892
+ # relevant to a given query.
893
+ # * `relevance_score`: semantic relevance adjustment that uses a
894
+ # proprietary Google model to determine the meaning and intent behind a
895
+ # user's query in context with the content in the documents.
896
+ # * `pctr_rank`: predicted conversion rate adjustment as a rank use
897
+ # predicted Click-through rate (pCTR) to gauge the relevance and
898
+ # attractiveness of a search result from a user's perspective. A higher
899
+ # pCTR suggests that the result is more likely to satisfy the user's query
900
+ # and intent, making it a valuable signal for ranking.
901
+ # * `freshness_rank`: freshness adjustment as a rank
902
+ # * `document_age`: The time in hours elapsed since the document was last
903
+ # updated, a floating-point number (e.g., 0.25 means 15 minutes).
904
+ # * `topicality_rank`: topicality adjustment as a rank. Uses proprietary
905
+ # Google model to determine the keyword-based overlap between the query and
906
+ # the document.
907
+ # * `base_rank`: the default rank of the result
908
+ # @param ranking_expression_backend [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::RankingExpressionBackend]
909
+ # The backend to use for the ranking expression evaluation.
778
910
  # @param safe_search [::Boolean]
779
911
  # Whether to turn on safe search. This is only supported for
780
912
  # website search.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module DiscoveryEngine
23
23
  module V1beta
24
- VERSION = "0.21.0"
24
+ VERSION = "0.22.0"
25
25
  end
26
26
  end
27
27
  end
@@ -14,7 +14,7 @@ require 'google/cloud/discoveryengine/v1beta/document_pb'
14
14
  require 'google/protobuf/struct_pb'
15
15
 
16
16
 
17
- descriptor_data = "\n8google/cloud/discoveryengine/v1beta/search_service.proto\x12#google.cloud.discoveryengine.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/discoveryengine/v1beta/chunk.proto\x1a\x30google/cloud/discoveryengine/v1beta/common.proto\x1a\x32google/cloud/discoveryengine/v1beta/document.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xc2\x34\n\rSearchRequest\x12L\n\x0eserving_config\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,discoveryengine.googleapis.com/ServingConfig\x12:\n\x06\x62ranch\x18\x02 \x01(\tB*\xfa\x41\'\n%discoveryengine.googleapis.com/Branch\x12\r\n\x05query\x18\x03 \x01(\t\x12R\n\x0bimage_query\x18\x13 \x01(\x0b\x32=.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t\x12\x0e\n\x06offset\x18\x06 \x01(\x05\x12\x19\n\x11one_box_page_size\x18/ \x01(\x05\x12Z\n\x10\x64\x61ta_store_specs\x18 \x03(\x0b\x32@.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec\x12\x0e\n\x06\x66ilter\x18\x07 \x01(\t\x12\x18\n\x10\x63\x61nonical_filter\x18\x1d \x01(\t\x12\x10\n\x08order_by\x18\x08 \x01(\t\x12@\n\tuser_info\x18\x15 \x01(\x0b\x32-.google.cloud.discoveryengine.v1beta.UserInfo\x12\x15\n\rlanguage_code\x18# \x01(\t\x12\x13\n\x0bregion_code\x18$ \x01(\t\x12Q\n\x0b\x66\x61\x63\x65t_specs\x18\t \x03(\x0b\x32<.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec\x12P\n\nboost_spec\x18\n \x01(\x0b\x32<.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec\x12N\n\x06params\x18\x0b \x03(\x0b\x32>.google.cloud.discoveryengine.v1beta.SearchRequest.ParamsEntry\x12\x63\n\x14query_expansion_spec\x18\r \x01(\x0b\x32\x45.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec\x12\x65\n\x15spell_correction_spec\x18\x0e \x01(\x0b\x32\x46.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec\x12\x16\n\x0euser_pseudo_id\x18\x0f \x01(\t\x12\x61\n\x13\x63ontent_search_spec\x18\x18 \x01(\x0b\x32\x44.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec\x12X\n\x0e\x65mbedding_spec\x18\x17 \x01(\x0b\x32@.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec\x12\x1a\n\x12ranking_expression\x18\x1a \x01(\t\x12\x13\n\x0bsafe_search\x18\x14 \x01(\x08\x12W\n\x0buser_labels\x18\x16 \x03(\x0b\x32\x42.google.cloud.discoveryengine.v1beta.SearchRequest.UserLabelsEntry\x12\x8b\x01\n)natural_language_query_understanding_spec\x18\x1c \x01(\x0b\x32X.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec\x12g\n\x17search_as_you_type_spec\x18\x1f \x01(\x0b\x32\x46.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec\x12<\n\x07session\x18) \x01(\tB+\xfa\x41(\n&discoveryengine.googleapis.com/Session\x12T\n\x0csession_spec\x18* \x01(\x0b\x32>.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec\x12\x62\n\x13relevance_threshold\x18, \x01(\x0e\x32\x45.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold\x12\x64\n\x14personalization_spec\x18. \x01(\x0b\x32\x46.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec\x1a,\n\nImageQuery\x12\x15\n\x0bimage_bytes\x18\x01 \x01(\tH\x00\x42\x07\n\x05image\x1aj\n\rDataStoreSpec\x12\x44\n\ndata_store\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x84\x03\n\tFacetSpec\x12]\n\tfacet_key\x18\x01 \x01(\x0b\x32\x45.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKeyB\x03\xe0\x41\x02\x12\r\n\x05limit\x18\x02 \x01(\x05\x12\x1c\n\x14\x65xcluded_filter_keys\x18\x03 \x03(\t\x12\x1f\n\x17\x65nable_dynamic_position\x18\x04 \x01(\x08\x1a\xc9\x01\n\x08\x46\x61\x63\x65tKey\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12@\n\tintervals\x18\x02 \x03(\x0b\x32-.google.cloud.discoveryengine.v1beta.Interval\x12\x19\n\x11restricted_values\x18\x03 \x03(\t\x12\x10\n\x08prefixes\x18\x04 \x03(\t\x12\x10\n\x08\x63ontains\x18\x05 \x03(\t\x12\x18\n\x10\x63\x61se_insensitive\x18\x06 \x01(\x08\x12\x10\n\x08order_by\x18\x07 \x01(\t\x1a\xd0\x07\n\tBoostSpec\x12n\n\x15\x63ondition_boost_specs\x18\x01 \x03(\x0b\x32O.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec\x1a\xd2\x06\n\x12\x43onditionBoostSpec\x12\x11\n\tcondition\x18\x01 \x01(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02\x12|\n\x12\x62oost_control_spec\x18\x03 \x01(\x0b\x32`.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec\x1a\x9b\x05\n\x10\x42oostControlSpec\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12\x86\x01\n\x0e\x61ttribute_type\x18\x02 \x01(\x0e\x32n.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType\x12\x8e\x01\n\x12interpolation_type\x18\x03 \x01(\x0e\x32r.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType\x12\x85\x01\n\x0e\x63ontrol_points\x18\x04 \x03(\x0b\x32m.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint\x1a=\n\x0c\x43ontrolPoint\x12\x17\n\x0f\x61ttribute_value\x18\x01 \x01(\t\x12\x14\n\x0c\x62oost_amount\x18\x02 \x01(\x02\"M\n\rAttributeType\x12\x1e\n\x1a\x41TTRIBUTE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tNUMERICAL\x10\x01\x12\r\n\tFRESHNESS\x10\x02\"C\n\x11InterpolationType\x12\"\n\x1eINTERPOLATION_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06LINEAR\x10\x01\x1a\xd8\x01\n\x12QueryExpansionSpec\x12\x62\n\tcondition\x18\x01 \x01(\x0e\x32O.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition\x12\x1e\n\x16pin_unexpanded_results\x18\x02 \x01(\x08\">\n\tCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x08\n\x04\x41UTO\x10\x02\x1a\xad\x01\n\x13SpellCorrectionSpec\x12Y\n\x04mode\x18\x01 \x01(\x0e\x32K.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode\";\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSUGGESTION_ONLY\x10\x01\x12\x08\n\x04\x41UTO\x10\x02\x1a\xbe\x0c\n\x11\x43ontentSearchSpec\x12\x66\n\x0csnippet_spec\x18\x01 \x01(\x0b\x32P.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec\x12\x66\n\x0csummary_spec\x18\x02 \x01(\x0b\x32P.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec\x12{\n\x17\x65xtractive_content_spec\x18\x03 \x01(\x0b\x32Z.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec\x12q\n\x12search_result_mode\x18\x04 \x01(\x0e\x32U.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode\x12\x62\n\nchunk_spec\x18\x05 \x01(\x0b\x32N.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec\x1a`\n\x0bSnippetSpec\x12\x1d\n\x11max_snippet_count\x18\x01 \x01(\x05\x42\x02\x18\x01\x12\x1a\n\x0ereference_only\x18\x02 \x01(\x08\x42\x02\x18\x01\x12\x16\n\x0ereturn_snippet\x18\x03 \x01(\x08\x1a\xc4\x04\n\x0bSummarySpec\x12\x1c\n\x14summary_result_count\x18\x01 \x01(\x05\x12\x19\n\x11include_citations\x18\x02 \x01(\x08\x12 \n\x18ignore_adversarial_query\x18\x03 \x01(\x08\x12(\n ignore_non_summary_seeking_query\x18\x04 \x01(\x08\x12#\n\x1bignore_low_relevant_content\x18\t \x01(\x08\x12\'\n\x1aignore_jail_breaking_query\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12{\n\x11model_prompt_spec\x18\x05 \x01(\x0b\x32`.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec\x12\x15\n\rlanguage_code\x18\x06 \x01(\t\x12n\n\nmodel_spec\x18\x07 \x01(\x0b\x32Z.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec\x12\x1b\n\x13use_semantic_chunks\x18\x08 \x01(\x08\x1a#\n\x0fModelPromptSpec\x12\x10\n\x08preamble\x18\x01 \x01(\t\x1a\x1c\n\tModelSpec\x12\x0f\n\x07version\x18\x01 \x01(\t\x1a\xc5\x01\n\x15\x45xtractiveContentSpec\x12#\n\x1bmax_extractive_answer_count\x18\x01 \x01(\x05\x12$\n\x1cmax_extractive_segment_count\x18\x02 \x01(\x05\x12\'\n\x1freturn_extractive_segment_score\x18\x03 \x01(\x08\x12\x1d\n\x15num_previous_segments\x18\x04 \x01(\x05\x12\x19\n\x11num_next_segments\x18\x05 \x01(\x05\x1a\x41\n\tChunkSpec\x12\x1b\n\x13num_previous_chunks\x18\x01 \x01(\x05\x12\x17\n\x0fnum_next_chunks\x18\x02 \x01(\x05\"Q\n\x10SearchResultMode\x12\"\n\x1eSEARCH_RESULT_MODE_UNSPECIFIED\x10\x00\x12\r\n\tDOCUMENTS\x10\x01\x12\n\n\x06\x43HUNKS\x10\x02\x1a\xb3\x01\n\rEmbeddingSpec\x12k\n\x11\x65mbedding_vectors\x18\x01 \x03(\x0b\x32P.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector\x1a\x35\n\x0f\x45mbeddingVector\x12\x12\n\nfield_path\x18\x01 \x01(\t\x12\x0e\n\x06vector\x18\x02 \x03(\x02\x1a\xc4\x02\n%NaturalLanguageQueryUnderstandingSpec\x12\x97\x01\n\x1b\x66ilter_extraction_condition\x18\x01 \x01(\x0e\x32r.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition\x12.\n&geo_search_query_detection_field_names\x18\x02 \x03(\t\"Q\n\x19\x46ilterExtractionCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x1a\xbd\x01\n\x13SearchAsYouTypeSpec\x12\x63\n\tcondition\x18\x01 \x01(\x0e\x32P.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition\"A\n\tCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x1aq\n\x0bSessionSpec\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12,\n\x1fsearch_result_persistence_count\x18\x02 \x01(\x05H\x00\x88\x01\x01\x42\"\n _search_result_persistence_count\x1a\xa6\x01\n\x13PersonalizationSpec\x12Y\n\x04mode\x18\x01 \x01(\x0e\x32K.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode\"4\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x1a\x45\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"d\n\x12RelevanceThreshold\x12#\n\x1fRELEVANCE_THRESHOLD_UNSPECIFIED\x10\x00\x12\n\n\x06LOWEST\x10\x01\x12\x07\n\x03LOW\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x08\n\x04HIGH\x10\x04\"\x9b\x30\n\x0eSearchResponse\x12Q\n\x07results\x18\x01 \x03(\x0b\x32@.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult\x12I\n\x06\x66\x61\x63\x65ts\x18\x02 \x03(\x0b\x32\x39.google.cloud.discoveryengine.v1beta.SearchResponse.Facet\x12\x64\n\x14guided_search_result\x18\x08 \x01(\x0b\x32\x46.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x12\x19\n\x11\x61ttribution_token\x18\x04 \x01(\t\x12\x14\n\x0credirect_uri\x18\x0c \x01(\t\x12\x17\n\x0fnext_page_token\x18\x05 \x01(\t\x12\x17\n\x0f\x63orrected_query\x18\x07 \x01(\t\x12L\n\x07summary\x18\t \x01(\x0b\x32;.google.cloud.discoveryengine.v1beta.SearchResponse.Summary\x12\x18\n\x10\x61pplied_controls\x18\n \x03(\t\x12\x65\n\x15geo_search_debug_info\x18\x10 \x03(\x0b\x32\x46.google.cloud.discoveryengine.v1beta.SearchResponse.GeoSearchDebugInfo\x12\x64\n\x14query_expansion_info\x18\x0e \x01(\x0b\x32\x46.google.cloud.discoveryengine.v1beta.SearchResponse.QueryExpansionInfo\x12\x8c\x01\n)natural_language_query_understanding_info\x18\x0f \x01(\x0b\x32Y.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo\x12U\n\x0csession_info\x18\x13 \x01(\x0b\x32?.google.cloud.discoveryengine.v1beta.SearchResponse.SessionInfo\x12Y\n\x0fone_box_results\x18\x14 \x03(\x0b\x32@.google.cloud.discoveryengine.v1beta.SearchResponse.OneBoxResult\x1a\xe4\x02\n\x0cSearchResult\x12\n\n\x02id\x18\x01 \x01(\t\x12?\n\x08\x64ocument\x18\x02 \x01(\x0b\x32-.google.cloud.discoveryengine.v1beta.Document\x12\x39\n\x05\x63hunk\x18\x12 \x01(\x0b\x32*.google.cloud.discoveryengine.v1beta.Chunk\x12g\n\x0cmodel_scores\x18\x04 \x03(\x0b\x32Q.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.ModelScoresEntry\x1a\x63\n\x10ModelScoresEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.google.cloud.discoveryengine.v1beta.DoubleList:\x02\x38\x01\x1a\x81\x02\n\x05\x46\x61\x63\x65t\x12\x0b\n\x03key\x18\x01 \x01(\t\x12T\n\x06values\x18\x02 \x03(\x0b\x32\x44.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue\x12\x15\n\rdynamic_facet\x18\x03 \x01(\x08\x1a~\n\nFacetValue\x12\x0f\n\x05value\x18\x01 \x01(\tH\x00\x12\x41\n\x08interval\x18\x02 \x01(\x0b\x32-.google.cloud.discoveryengine.v1beta.IntervalH\x00\x12\r\n\x05\x63ount\x18\x03 \x01(\x03\x42\r\n\x0b\x66\x61\x63\x65t_value\x1a\xf3\x01\n\x12GuidedSearchResult\x12y\n\x15refinement_attributes\x18\x01 \x03(\x0b\x32Z.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute\x12\x1b\n\x13\x66ollow_up_questions\x18\x02 \x03(\t\x1a\x45\n\x13RefinementAttribute\x12\x15\n\rattribute_key\x18\x01 \x01(\t\x12\x17\n\x0f\x61ttribute_value\x18\x02 \x01(\t\x1a\xb3\x0c\n\x07Summary\x12\x14\n\x0csummary_text\x18\x01 \x01(\t\x12q\n\x17summary_skipped_reasons\x18\x02 \x03(\x0e\x32P.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummarySkippedReason\x12g\n\x11safety_attributes\x18\x03 \x01(\x0b\x32L.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SafetyAttributes\x12n\n\x15summary_with_metadata\x18\x04 \x01(\x0b\x32O.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummaryWithMetadata\x1a\x36\n\x10SafetyAttributes\x12\x12\n\ncategories\x18\x01 \x03(\t\x12\x0e\n\x06scores\x18\x02 \x03(\x02\x1ak\n\x10\x43itationMetadata\x12W\n\tcitations\x18\x01 \x03(\x0b\x32\x44.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Citation\x1a\x8f\x01\n\x08\x43itation\x12\x13\n\x0bstart_index\x18\x01 \x01(\x03\x12\x11\n\tend_index\x18\x02 \x01(\x03\x12[\n\x07sources\x18\x03 \x03(\x0b\x32J.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.CitationSource\x1a)\n\x0e\x43itationSource\x12\x17\n\x0freference_index\x18\x04 \x01(\x03\x1a\x90\x02\n\tReference\x12\r\n\x05title\x18\x01 \x01(\t\x12\x41\n\x08\x64ocument\x18\x02 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12\x0b\n\x03uri\x18\x03 \x01(\t\x12j\n\x0e\x63hunk_contents\x18\x04 \x03(\x0b\x32R.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Reference.ChunkContent\x1a\x38\n\x0c\x43hunkContent\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x17\n\x0fpage_identifier\x18\x02 \x01(\t\x1a\xea\x01\n\x13SummaryWithMetadata\x12\x0f\n\x07summary\x18\x01 \x01(\t\x12g\n\x11\x63itation_metadata\x18\x02 \x01(\x0b\x32L.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.CitationMetadata\x12Y\n\nreferences\x18\x03 \x03(\x0b\x32\x45.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Reference\"\xe3\x02\n\x14SummarySkippedReason\x12&\n\"SUMMARY_SKIPPED_REASON_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x41\x44VERSARIAL_QUERY_IGNORED\x10\x01\x12%\n!NON_SUMMARY_SEEKING_QUERY_IGNORED\x10\x02\x12\x1f\n\x1bOUT_OF_DOMAIN_QUERY_IGNORED\x10\x03\x12\x1e\n\x1aPOTENTIAL_POLICY_VIOLATION\x10\x04\x12\x19\n\x15LLM_ADDON_NOT_ENABLED\x10\x05\x12\x17\n\x13NO_RELEVANT_CONTENT\x10\x06\x12\x1f\n\x1bJAIL_BREAKING_QUERY_IGNORED\x10\x07\x12\x1d\n\x19\x43USTOMER_POLICY_VIOLATION\x10\x08\x12(\n$NON_SUMMARY_SEEKING_QUERY_IGNORED_V2\x10\t\x1aK\n\x12GeoSearchDebugInfo\x12\x1e\n\x16original_address_query\x18\x01 \x01(\t\x12\x15\n\rerror_message\x18\x02 \x01(\t\x1aI\n\x12QueryExpansionInfo\x12\x16\n\x0e\x65xpanded_query\x18\x01 \x01(\x08\x12\x1b\n\x13pinned_result_count\x18\x02 \x01(\x03\x1a\x81\x11\n%NaturalLanguageQueryUnderstandingInfo\x12\x19\n\x11\x65xtracted_filters\x18\x01 \x01(\t\x12\x17\n\x0frewritten_query\x18\x02 \x01(\t\x12\x98\x01\n\x1bstructured_extracted_filter\x18\x03 \x01(\x0b\x32s.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter\x1a\x88\x0f\n\x19StructuredExtractedFilter\x12\x92\x01\n\nexpression\x18\x01 \x01(\x0b\x32~.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression\x1aM\n\x10StringConstraint\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12\x0e\n\x06values\x18\x02 \x03(\t\x12\x15\n\rquery_segment\x18\x03 \x01(\t\x1a\xfa\x02\n\x10NumberConstraint\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12\xa4\x01\n\ncomparison\x18\x02 \x01(\x0e\x32\x8f\x01.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint.Comparison\x12\r\n\x05value\x18\x03 \x01(\x01\x12\x15\n\rquery_segment\x18\x04 \x01(\t\"\x84\x01\n\nComparison\x12\x1a\n\x16\x43OMPARISON_UNSPECIFIED\x10\x00\x12\n\n\x06\x45QUALS\x10\x01\x12\x14\n\x10LESS_THAN_EQUALS\x10\x02\x12\r\n\tLESS_THAN\x10\x03\x12\x17\n\x13GREATER_THAN_EQUALS\x10\x04\x12\x10\n\x0cGREATER_THAN\x10\x05\x1a{\n\x15GeolocationConstraint\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12\x10\n\x08latitude\x18\x04 \x01(\x01\x12\x11\n\tlongitude\x18\x05 \x01(\x01\x12\x18\n\x10radius_in_meters\x18\x03 \x01(\x02\x1a\xa5\x01\n\rAndExpression\x12\x93\x01\n\x0b\x65xpressions\x18\x01 \x03(\x0b\x32~.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression\x1a\xa4\x01\n\x0cOrExpression\x12\x93\x01\n\x0b\x65xpressions\x18\x01 \x03(\x0b\x32~.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression\x1a\xbd\x06\n\nExpression\x12\xa2\x01\n\x11string_constraint\x18\x01 \x01(\x0b\x32\x84\x01.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraintH\x00\x12\xa2\x01\n\x11number_constraint\x18\x02 \x01(\x0b\x32\x84\x01.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraintH\x00\x12\xac\x01\n\x16geolocation_constraint\x18\x03 \x01(\x0b\x32\x89\x01.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraintH\x00\x12\x96\x01\n\x08\x61nd_expr\x18\x04 \x01(\x0b\x32\x81\x01.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpressionH\x00\x12\x94\x01\n\x07or_expr\x18\x05 \x01(\x0b\x32\x80\x01.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpressionH\x00\x42\x06\n\x04\x65xpr\x1a-\n\x0bSessionInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08query_id\x18\x02 \x01(\t\x1a\xb5\x02\n\x0cOneBoxResult\x12\x61\n\x0cone_box_type\x18\x01 \x01(\x0e\x32K.google.cloud.discoveryengine.v1beta.SearchResponse.OneBoxResult.OneBoxType\x12X\n\x0esearch_results\x18\x02 \x03(\x0b\x32@.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult\"h\n\nOneBoxType\x12\x1c\n\x18ONE_BOX_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06PEOPLE\x10\x01\x12\x10\n\x0cORGANIZATION\x10\x02\x12\t\n\x05SLACK\x10\x03\x12\x13\n\x0fKNOWLEDGE_GRAPH\x10\x04\x32\xbf\x07\n\rSearchService\x12\xa3\x03\n\x06Search\x12\x32.google.cloud.discoveryengine.v1beta.SearchRequest\x1a\x33.google.cloud.discoveryengine.v1beta.SearchResponse\"\xaf\x02\x82\xd3\xe4\x93\x02\xa8\x02\"T/v1beta/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:search:\x01*Zg\"b/v1beta/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:search:\x01*Zd\"_/v1beta/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:search:\x01*\x12\xb3\x03\n\nSearchLite\x12\x32.google.cloud.discoveryengine.v1beta.SearchRequest\x1a\x33.google.cloud.discoveryengine.v1beta.SearchResponse\"\xbb\x02\x82\xd3\xe4\x93\x02\xb4\x02\"X/v1beta/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:searchLite:\x01*Zk\"f/v1beta/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:searchLite:\x01*Zh\"c/v1beta/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:searchLite:\x01*\x1aR\xca\x41\x1e\x64iscoveryengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x99\x02\n\'com.google.cloud.discoveryengine.v1betaB\x12SearchServiceProtoP\x01ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02#Google.Cloud.DiscoveryEngine.V1Beta\xca\x02#Google\\Cloud\\DiscoveryEngine\\V1beta\xea\x02&Google::Cloud::DiscoveryEngine::V1betab\x06proto3"
17
+ descriptor_data = "\n8google/cloud/discoveryengine/v1beta/search_service.proto\x12#google.cloud.discoveryengine.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/discoveryengine/v1beta/chunk.proto\x1a\x30google/cloud/discoveryengine/v1beta/common.proto\x1a\x32google/cloud/discoveryengine/v1beta/document.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xb8\x36\n\rSearchRequest\x12L\n\x0eserving_config\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,discoveryengine.googleapis.com/ServingConfig\x12:\n\x06\x62ranch\x18\x02 \x01(\tB*\xfa\x41\'\n%discoveryengine.googleapis.com/Branch\x12\r\n\x05query\x18\x03 \x01(\t\x12R\n\x0bimage_query\x18\x13 \x01(\x0b\x32=.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t\x12\x0e\n\x06offset\x18\x06 \x01(\x05\x12\x19\n\x11one_box_page_size\x18/ \x01(\x05\x12Z\n\x10\x64\x61ta_store_specs\x18 \x03(\x0b\x32@.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec\x12\x0e\n\x06\x66ilter\x18\x07 \x01(\t\x12\x18\n\x10\x63\x61nonical_filter\x18\x1d \x01(\t\x12\x10\n\x08order_by\x18\x08 \x01(\t\x12@\n\tuser_info\x18\x15 \x01(\x0b\x32-.google.cloud.discoveryengine.v1beta.UserInfo\x12\x15\n\rlanguage_code\x18# \x01(\t\x12\x13\n\x0bregion_code\x18$ \x01(\t\x12Q\n\x0b\x66\x61\x63\x65t_specs\x18\t \x03(\x0b\x32<.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec\x12P\n\nboost_spec\x18\n \x01(\x0b\x32<.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec\x12N\n\x06params\x18\x0b \x03(\x0b\x32>.google.cloud.discoveryengine.v1beta.SearchRequest.ParamsEntry\x12\x63\n\x14query_expansion_spec\x18\r \x01(\x0b\x32\x45.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec\x12\x65\n\x15spell_correction_spec\x18\x0e \x01(\x0b\x32\x46.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec\x12\x16\n\x0euser_pseudo_id\x18\x0f \x01(\t\x12\x61\n\x13\x63ontent_search_spec\x18\x18 \x01(\x0b\x32\x44.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec\x12X\n\x0e\x65mbedding_spec\x18\x17 \x01(\x0b\x32@.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec\x12\x1a\n\x12ranking_expression\x18\x1a \x01(\t\x12t\n\x1aranking_expression_backend\x18\x35 \x01(\x0e\x32K.google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackendB\x03\xe0\x41\x01\x12\x13\n\x0bsafe_search\x18\x14 \x01(\x08\x12W\n\x0buser_labels\x18\x16 \x03(\x0b\x32\x42.google.cloud.discoveryengine.v1beta.SearchRequest.UserLabelsEntry\x12\x8b\x01\n)natural_language_query_understanding_spec\x18\x1c \x01(\x0b\x32X.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec\x12g\n\x17search_as_you_type_spec\x18\x1f \x01(\x0b\x32\x46.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec\x12<\n\x07session\x18) \x01(\tB+\xfa\x41(\n&discoveryengine.googleapis.com/Session\x12T\n\x0csession_spec\x18* \x01(\x0b\x32>.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec\x12\x62\n\x13relevance_threshold\x18, \x01(\x0e\x32\x45.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold\x12\x64\n\x14personalization_spec\x18. \x01(\x0b\x32\x46.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec\x1a,\n\nImageQuery\x12\x15\n\x0bimage_bytes\x18\x01 \x01(\tH\x00\x42\x07\n\x05image\x1aj\n\rDataStoreSpec\x12\x44\n\ndata_store\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x84\x03\n\tFacetSpec\x12]\n\tfacet_key\x18\x01 \x01(\x0b\x32\x45.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKeyB\x03\xe0\x41\x02\x12\r\n\x05limit\x18\x02 \x01(\x05\x12\x1c\n\x14\x65xcluded_filter_keys\x18\x03 \x03(\t\x12\x1f\n\x17\x65nable_dynamic_position\x18\x04 \x01(\x08\x1a\xc9\x01\n\x08\x46\x61\x63\x65tKey\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12@\n\tintervals\x18\x02 \x03(\x0b\x32-.google.cloud.discoveryengine.v1beta.Interval\x12\x19\n\x11restricted_values\x18\x03 \x03(\t\x12\x10\n\x08prefixes\x18\x04 \x03(\t\x12\x10\n\x08\x63ontains\x18\x05 \x03(\t\x12\x18\n\x10\x63\x61se_insensitive\x18\x06 \x01(\x08\x12\x10\n\x08order_by\x18\x07 \x01(\t\x1a\xd0\x07\n\tBoostSpec\x12n\n\x15\x63ondition_boost_specs\x18\x01 \x03(\x0b\x32O.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec\x1a\xd2\x06\n\x12\x43onditionBoostSpec\x12\x11\n\tcondition\x18\x01 \x01(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02\x12|\n\x12\x62oost_control_spec\x18\x03 \x01(\x0b\x32`.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec\x1a\x9b\x05\n\x10\x42oostControlSpec\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12\x86\x01\n\x0e\x61ttribute_type\x18\x02 \x01(\x0e\x32n.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType\x12\x8e\x01\n\x12interpolation_type\x18\x03 \x01(\x0e\x32r.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType\x12\x85\x01\n\x0e\x63ontrol_points\x18\x04 \x03(\x0b\x32m.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint\x1a=\n\x0c\x43ontrolPoint\x12\x17\n\x0f\x61ttribute_value\x18\x01 \x01(\t\x12\x14\n\x0c\x62oost_amount\x18\x02 \x01(\x02\"M\n\rAttributeType\x12\x1e\n\x1a\x41TTRIBUTE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tNUMERICAL\x10\x01\x12\r\n\tFRESHNESS\x10\x02\"C\n\x11InterpolationType\x12\"\n\x1eINTERPOLATION_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06LINEAR\x10\x01\x1a\xd8\x01\n\x12QueryExpansionSpec\x12\x62\n\tcondition\x18\x01 \x01(\x0e\x32O.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition\x12\x1e\n\x16pin_unexpanded_results\x18\x02 \x01(\x08\">\n\tCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x08\n\x04\x41UTO\x10\x02\x1a\xad\x01\n\x13SpellCorrectionSpec\x12Y\n\x04mode\x18\x01 \x01(\x0e\x32K.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode\";\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSUGGESTION_ONLY\x10\x01\x12\x08\n\x04\x41UTO\x10\x02\x1a\xbe\x0c\n\x11\x43ontentSearchSpec\x12\x66\n\x0csnippet_spec\x18\x01 \x01(\x0b\x32P.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec\x12\x66\n\x0csummary_spec\x18\x02 \x01(\x0b\x32P.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec\x12{\n\x17\x65xtractive_content_spec\x18\x03 \x01(\x0b\x32Z.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec\x12q\n\x12search_result_mode\x18\x04 \x01(\x0e\x32U.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode\x12\x62\n\nchunk_spec\x18\x05 \x01(\x0b\x32N.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec\x1a`\n\x0bSnippetSpec\x12\x1d\n\x11max_snippet_count\x18\x01 \x01(\x05\x42\x02\x18\x01\x12\x1a\n\x0ereference_only\x18\x02 \x01(\x08\x42\x02\x18\x01\x12\x16\n\x0ereturn_snippet\x18\x03 \x01(\x08\x1a\xc4\x04\n\x0bSummarySpec\x12\x1c\n\x14summary_result_count\x18\x01 \x01(\x05\x12\x19\n\x11include_citations\x18\x02 \x01(\x08\x12 \n\x18ignore_adversarial_query\x18\x03 \x01(\x08\x12(\n ignore_non_summary_seeking_query\x18\x04 \x01(\x08\x12#\n\x1bignore_low_relevant_content\x18\t \x01(\x08\x12\'\n\x1aignore_jail_breaking_query\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12{\n\x11model_prompt_spec\x18\x05 \x01(\x0b\x32`.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec\x12\x15\n\rlanguage_code\x18\x06 \x01(\t\x12n\n\nmodel_spec\x18\x07 \x01(\x0b\x32Z.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec\x12\x1b\n\x13use_semantic_chunks\x18\x08 \x01(\x08\x1a#\n\x0fModelPromptSpec\x12\x10\n\x08preamble\x18\x01 \x01(\t\x1a\x1c\n\tModelSpec\x12\x0f\n\x07version\x18\x01 \x01(\t\x1a\xc5\x01\n\x15\x45xtractiveContentSpec\x12#\n\x1bmax_extractive_answer_count\x18\x01 \x01(\x05\x12$\n\x1cmax_extractive_segment_count\x18\x02 \x01(\x05\x12\'\n\x1freturn_extractive_segment_score\x18\x03 \x01(\x08\x12\x1d\n\x15num_previous_segments\x18\x04 \x01(\x05\x12\x19\n\x11num_next_segments\x18\x05 \x01(\x05\x1a\x41\n\tChunkSpec\x12\x1b\n\x13num_previous_chunks\x18\x01 \x01(\x05\x12\x17\n\x0fnum_next_chunks\x18\x02 \x01(\x05\"Q\n\x10SearchResultMode\x12\"\n\x1eSEARCH_RESULT_MODE_UNSPECIFIED\x10\x00\x12\r\n\tDOCUMENTS\x10\x01\x12\n\n\x06\x43HUNKS\x10\x02\x1a\xb3\x01\n\rEmbeddingSpec\x12k\n\x11\x65mbedding_vectors\x18\x01 \x03(\x0b\x32P.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector\x1a\x35\n\x0f\x45mbeddingVector\x12\x12\n\nfield_path\x18\x01 \x01(\t\x12\x0e\n\x06vector\x18\x02 \x03(\x02\x1a\xc4\x02\n%NaturalLanguageQueryUnderstandingSpec\x12\x97\x01\n\x1b\x66ilter_extraction_condition\x18\x01 \x01(\x0e\x32r.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition\x12.\n&geo_search_query_detection_field_names\x18\x02 \x03(\t\"Q\n\x19\x46ilterExtractionCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x1a\xbd\x01\n\x13SearchAsYouTypeSpec\x12\x63\n\tcondition\x18\x01 \x01(\x0e\x32P.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition\"A\n\tCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x1aq\n\x0bSessionSpec\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12,\n\x1fsearch_result_persistence_count\x18\x02 \x01(\x05H\x00\x88\x01\x01\x42\"\n _search_result_persistence_count\x1a\xa6\x01\n\x13PersonalizationSpec\x12Y\n\x04mode\x18\x01 \x01(\x0e\x32K.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode\"4\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x1a\x45\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"d\n\x12RelevanceThreshold\x12#\n\x1fRELEVANCE_THRESHOLD_UNSPECIFIED\x10\x00\x12\n\n\x06LOWEST\x10\x01\x12\x07\n\x03LOW\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x08\n\x04HIGH\x10\x04\"~\n\x18RankingExpressionBackend\x12*\n&RANKING_EXPRESSION_BACKEND_UNSPECIFIED\x10\x00\x12\x15\n\x11RANK_BY_EMBEDDING\x10\x03\x12\x13\n\x0fRANK_BY_FORMULA\x10\x04\"\x04\x08\x01\x10\x01\"\x04\x08\x02\x10\x02\"\xf9\x35\n\x0eSearchResponse\x12Q\n\x07results\x18\x01 \x03(\x0b\x32@.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult\x12I\n\x06\x66\x61\x63\x65ts\x18\x02 \x03(\x0b\x32\x39.google.cloud.discoveryengine.v1beta.SearchResponse.Facet\x12\x64\n\x14guided_search_result\x18\x08 \x01(\x0b\x32\x46.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x12\x19\n\x11\x61ttribution_token\x18\x04 \x01(\t\x12\x14\n\x0credirect_uri\x18\x0c \x01(\t\x12\x17\n\x0fnext_page_token\x18\x05 \x01(\t\x12\x17\n\x0f\x63orrected_query\x18\x07 \x01(\t\x12L\n\x07summary\x18\t \x01(\x0b\x32;.google.cloud.discoveryengine.v1beta.SearchResponse.Summary\x12\x18\n\x10\x61pplied_controls\x18\n \x03(\t\x12\x65\n\x15geo_search_debug_info\x18\x10 \x03(\x0b\x32\x46.google.cloud.discoveryengine.v1beta.SearchResponse.GeoSearchDebugInfo\x12\x64\n\x14query_expansion_info\x18\x0e \x01(\x0b\x32\x46.google.cloud.discoveryengine.v1beta.SearchResponse.QueryExpansionInfo\x12\x8c\x01\n)natural_language_query_understanding_info\x18\x0f \x01(\x0b\x32Y.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo\x12U\n\x0csession_info\x18\x13 \x01(\x0b\x32?.google.cloud.discoveryengine.v1beta.SearchResponse.SessionInfo\x12Y\n\x0fone_box_results\x18\x14 \x03(\x0b\x32@.google.cloud.discoveryengine.v1beta.SearchResponse.OneBoxResult\x1a\xc2\x08\n\x0cSearchResult\x12\n\n\x02id\x18\x01 \x01(\t\x12?\n\x08\x64ocument\x18\x02 \x01(\x0b\x32-.google.cloud.discoveryengine.v1beta.Document\x12\x39\n\x05\x63hunk\x18\x12 \x01(\x0b\x32*.google.cloud.discoveryengine.v1beta.Chunk\x12g\n\x0cmodel_scores\x18\x04 \x03(\x0b\x32Q.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.ModelScoresEntry\x12g\n\x0crank_signals\x18\x07 \x01(\x0b\x32L.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.RankSignalsB\x03\xe0\x41\x01\x1a\x63\n\x10ModelScoresEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.google.cloud.discoveryengine.v1beta.DoubleList:\x02\x38\x01\x1a\xf2\x04\n\x0bRankSignals\x12*\n\x18keyword_similarity_score\x18\x01 \x01(\x02\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12!\n\x0frelevance_score\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12+\n\x19semantic_similarity_score\x18\x03 \x01(\x02\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x1b\n\tpctr_rank\x18\x04 \x01(\x02\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12!\n\x0ftopicality_rank\x18\x06 \x01(\x02\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1e\n\x0c\x64ocument_age\x18\x07 \x01(\x02\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12!\n\x0f\x62oosting_factor\x18\x08 \x01(\x02\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x19\n\x0c\x64\x65\x66\x61ult_rank\x18 \x01(\x02\x42\x03\xe0\x41\x01\x12v\n\x0e\x63ustom_signals\x18! \x03(\x0b\x32Y.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.RankSignals.CustomSignalB\x03\xe0\x41\x01\x1a\x35\n\x0c\x43ustomSignal\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x42\x1b\n\x19_keyword_similarity_scoreB\x12\n\x10_relevance_scoreB\x1c\n\x1a_semantic_similarity_scoreB\x0c\n\n_pctr_rankB\x12\n\x10_topicality_rankB\x0f\n\r_document_ageB\x12\n\x10_boosting_factorJ\x04\x08\x05\x10\x06\x1a\x81\x02\n\x05\x46\x61\x63\x65t\x12\x0b\n\x03key\x18\x01 \x01(\t\x12T\n\x06values\x18\x02 \x03(\x0b\x32\x44.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue\x12\x15\n\rdynamic_facet\x18\x03 \x01(\x08\x1a~\n\nFacetValue\x12\x0f\n\x05value\x18\x01 \x01(\tH\x00\x12\x41\n\x08interval\x18\x02 \x01(\x0b\x32-.google.cloud.discoveryengine.v1beta.IntervalH\x00\x12\r\n\x05\x63ount\x18\x03 \x01(\x03\x42\r\n\x0b\x66\x61\x63\x65t_value\x1a\xf3\x01\n\x12GuidedSearchResult\x12y\n\x15refinement_attributes\x18\x01 \x03(\x0b\x32Z.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute\x12\x1b\n\x13\x66ollow_up_questions\x18\x02 \x03(\t\x1a\x45\n\x13RefinementAttribute\x12\x15\n\rattribute_key\x18\x01 \x01(\t\x12\x17\n\x0f\x61ttribute_value\x18\x02 \x01(\t\x1a\xb3\x0c\n\x07Summary\x12\x14\n\x0csummary_text\x18\x01 \x01(\t\x12q\n\x17summary_skipped_reasons\x18\x02 \x03(\x0e\x32P.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummarySkippedReason\x12g\n\x11safety_attributes\x18\x03 \x01(\x0b\x32L.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SafetyAttributes\x12n\n\x15summary_with_metadata\x18\x04 \x01(\x0b\x32O.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummaryWithMetadata\x1a\x36\n\x10SafetyAttributes\x12\x12\n\ncategories\x18\x01 \x03(\t\x12\x0e\n\x06scores\x18\x02 \x03(\x02\x1ak\n\x10\x43itationMetadata\x12W\n\tcitations\x18\x01 \x03(\x0b\x32\x44.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Citation\x1a\x8f\x01\n\x08\x43itation\x12\x13\n\x0bstart_index\x18\x01 \x01(\x03\x12\x11\n\tend_index\x18\x02 \x01(\x03\x12[\n\x07sources\x18\x03 \x03(\x0b\x32J.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.CitationSource\x1a)\n\x0e\x43itationSource\x12\x17\n\x0freference_index\x18\x04 \x01(\x03\x1a\x90\x02\n\tReference\x12\r\n\x05title\x18\x01 \x01(\t\x12\x41\n\x08\x64ocument\x18\x02 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12\x0b\n\x03uri\x18\x03 \x01(\t\x12j\n\x0e\x63hunk_contents\x18\x04 \x03(\x0b\x32R.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Reference.ChunkContent\x1a\x38\n\x0c\x43hunkContent\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x17\n\x0fpage_identifier\x18\x02 \x01(\t\x1a\xea\x01\n\x13SummaryWithMetadata\x12\x0f\n\x07summary\x18\x01 \x01(\t\x12g\n\x11\x63itation_metadata\x18\x02 \x01(\x0b\x32L.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.CitationMetadata\x12Y\n\nreferences\x18\x03 \x03(\x0b\x32\x45.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Reference\"\xe3\x02\n\x14SummarySkippedReason\x12&\n\"SUMMARY_SKIPPED_REASON_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x41\x44VERSARIAL_QUERY_IGNORED\x10\x01\x12%\n!NON_SUMMARY_SEEKING_QUERY_IGNORED\x10\x02\x12\x1f\n\x1bOUT_OF_DOMAIN_QUERY_IGNORED\x10\x03\x12\x1e\n\x1aPOTENTIAL_POLICY_VIOLATION\x10\x04\x12\x19\n\x15LLM_ADDON_NOT_ENABLED\x10\x05\x12\x17\n\x13NO_RELEVANT_CONTENT\x10\x06\x12\x1f\n\x1bJAIL_BREAKING_QUERY_IGNORED\x10\x07\x12\x1d\n\x19\x43USTOMER_POLICY_VIOLATION\x10\x08\x12(\n$NON_SUMMARY_SEEKING_QUERY_IGNORED_V2\x10\t\x1aK\n\x12GeoSearchDebugInfo\x12\x1e\n\x16original_address_query\x18\x01 \x01(\t\x12\x15\n\rerror_message\x18\x02 \x01(\t\x1aI\n\x12QueryExpansionInfo\x12\x16\n\x0e\x65xpanded_query\x18\x01 \x01(\x08\x12\x1b\n\x13pinned_result_count\x18\x02 \x01(\x03\x1a\x81\x11\n%NaturalLanguageQueryUnderstandingInfo\x12\x19\n\x11\x65xtracted_filters\x18\x01 \x01(\t\x12\x17\n\x0frewritten_query\x18\x02 \x01(\t\x12\x98\x01\n\x1bstructured_extracted_filter\x18\x03 \x01(\x0b\x32s.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter\x1a\x88\x0f\n\x19StructuredExtractedFilter\x12\x92\x01\n\nexpression\x18\x01 \x01(\x0b\x32~.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression\x1aM\n\x10StringConstraint\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12\x0e\n\x06values\x18\x02 \x03(\t\x12\x15\n\rquery_segment\x18\x03 \x01(\t\x1a\xfa\x02\n\x10NumberConstraint\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12\xa4\x01\n\ncomparison\x18\x02 \x01(\x0e\x32\x8f\x01.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint.Comparison\x12\r\n\x05value\x18\x03 \x01(\x01\x12\x15\n\rquery_segment\x18\x04 \x01(\t\"\x84\x01\n\nComparison\x12\x1a\n\x16\x43OMPARISON_UNSPECIFIED\x10\x00\x12\n\n\x06\x45QUALS\x10\x01\x12\x14\n\x10LESS_THAN_EQUALS\x10\x02\x12\r\n\tLESS_THAN\x10\x03\x12\x17\n\x13GREATER_THAN_EQUALS\x10\x04\x12\x10\n\x0cGREATER_THAN\x10\x05\x1a{\n\x15GeolocationConstraint\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12\x10\n\x08latitude\x18\x04 \x01(\x01\x12\x11\n\tlongitude\x18\x05 \x01(\x01\x12\x18\n\x10radius_in_meters\x18\x03 \x01(\x02\x1a\xa5\x01\n\rAndExpression\x12\x93\x01\n\x0b\x65xpressions\x18\x01 \x03(\x0b\x32~.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression\x1a\xa4\x01\n\x0cOrExpression\x12\x93\x01\n\x0b\x65xpressions\x18\x01 \x03(\x0b\x32~.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression\x1a\xbd\x06\n\nExpression\x12\xa2\x01\n\x11string_constraint\x18\x01 \x01(\x0b\x32\x84\x01.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraintH\x00\x12\xa2\x01\n\x11number_constraint\x18\x02 \x01(\x0b\x32\x84\x01.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraintH\x00\x12\xac\x01\n\x16geolocation_constraint\x18\x03 \x01(\x0b\x32\x89\x01.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraintH\x00\x12\x96\x01\n\x08\x61nd_expr\x18\x04 \x01(\x0b\x32\x81\x01.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpressionH\x00\x12\x94\x01\n\x07or_expr\x18\x05 \x01(\x0b\x32\x80\x01.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpressionH\x00\x42\x06\n\x04\x65xpr\x1a-\n\x0bSessionInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08query_id\x18\x02 \x01(\t\x1a\xb5\x02\n\x0cOneBoxResult\x12\x61\n\x0cone_box_type\x18\x01 \x01(\x0e\x32K.google.cloud.discoveryengine.v1beta.SearchResponse.OneBoxResult.OneBoxType\x12X\n\x0esearch_results\x18\x02 \x03(\x0b\x32@.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult\"h\n\nOneBoxType\x12\x1c\n\x18ONE_BOX_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06PEOPLE\x10\x01\x12\x10\n\x0cORGANIZATION\x10\x02\x12\t\n\x05SLACK\x10\x03\x12\x13\n\x0fKNOWLEDGE_GRAPH\x10\x04\x32\xbf\x07\n\rSearchService\x12\xa3\x03\n\x06Search\x12\x32.google.cloud.discoveryengine.v1beta.SearchRequest\x1a\x33.google.cloud.discoveryengine.v1beta.SearchResponse\"\xaf\x02\x82\xd3\xe4\x93\x02\xa8\x02\"T/v1beta/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:search:\x01*Zg\"b/v1beta/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:search:\x01*Zd\"_/v1beta/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:search:\x01*\x12\xb3\x03\n\nSearchLite\x12\x32.google.cloud.discoveryengine.v1beta.SearchRequest\x1a\x33.google.cloud.discoveryengine.v1beta.SearchResponse\"\xbb\x02\x82\xd3\xe4\x93\x02\xb4\x02\"X/v1beta/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:searchLite:\x01*Zk\"f/v1beta/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:searchLite:\x01*Zh\"c/v1beta/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:searchLite:\x01*\x1aR\xca\x41\x1e\x64iscoveryengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x99\x02\n\'com.google.cloud.discoveryengine.v1betaB\x12SearchServiceProtoP\x01ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02#Google.Cloud.DiscoveryEngine.V1Beta\xca\x02#Google\\Cloud\\DiscoveryEngine\\V1beta\xea\x02&Google::Cloud::DiscoveryEngine::V1betab\x06proto3"
18
18
 
19
19
  pool = Google::Protobuf::DescriptorPool.generated_pool
20
20
 
@@ -81,8 +81,11 @@ module Google
81
81
  SearchRequest::PersonalizationSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec").msgclass
82
82
  SearchRequest::PersonalizationSpec::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode").enummodule
83
83
  SearchRequest::RelevanceThreshold = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold").enummodule
84
+ SearchRequest::RankingExpressionBackend = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend").enummodule
84
85
  SearchResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchResponse").msgclass
85
86
  SearchResponse::SearchResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult").msgclass
87
+ SearchResponse::SearchResult::RankSignals = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.RankSignals").msgclass
88
+ SearchResponse::SearchResult::RankSignals::CustomSignal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.RankSignals.CustomSignal").msgclass
86
89
  SearchResponse::Facet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchResponse.Facet").msgclass
87
90
  SearchResponse::Facet::FacetValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue").msgclass
88
91
  SearchResponse::GuidedSearchResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult").msgclass
@@ -223,8 +223,14 @@ module Google
223
223
  # The ranking expression controls the customized ranking on retrieval
224
224
  # documents. This overrides
225
225
  # {::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig#ranking_expression ServingConfig.ranking_expression}.
226
- # The ranking expression is a single function or multiple functions that are
227
- # joined by "+".
226
+ # The syntax and supported features depend on the
227
+ # `ranking_expression_backend` value. If `ranking_expression_backend` is not
228
+ # provided, it defaults to `RANK_BY_EMBEDDING`.
229
+ #
230
+ # If
231
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#ranking_expression_backend ranking_expression_backend}
232
+ # is not provided or set to `RANK_BY_EMBEDDING`, it should be a single
233
+ # function or multiple functions that are joined by "+".
228
234
  #
229
235
  # * ranking_expression = function, { " + ", function };
230
236
  #
@@ -239,13 +245,74 @@ module Google
239
245
  # between query and document.
240
246
  # * `embedding_field_path`: the document embedding field
241
247
  # used with query embedding vector.
242
- # * `dotProduct`: embedding function between embedding_field_path and query
243
- # embedding vector.
248
+ # * `dotProduct`: embedding function between `embedding_field_path` and
249
+ # query embedding vector.
244
250
  #
245
251
  # Example ranking expression:
246
252
  #
247
253
  # If document has an embedding field doc_embedding, the ranking expression
248
254
  # could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
255
+ #
256
+ # If
257
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#ranking_expression_backend ranking_expression_backend}
258
+ # is set to `RANK_BY_FORMULA`, the following expression types (and
259
+ # combinations of those chained using + or
260
+ # * operators) are supported:
261
+ #
262
+ # * `double`
263
+ # * `signal`
264
+ # * `log(signal)`
265
+ # * `exp(signal)`
266
+ # * `rr(signal, double > 0)` -- reciprocal rank transformation with second
267
+ # argument being a denominator constant.
268
+ # * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise.
269
+ # * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns
270
+ # signal2 | double, else returns signal1.
271
+ #
272
+ # Here are a few examples of ranking formulas that use the supported
273
+ # ranking expression types:
274
+ #
275
+ # - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`
276
+ # -- mostly rank by the logarithm of `keyword_similarity_score` with slight
277
+ # `semantic_smilarity_score` adjustment.
278
+ # - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 *
279
+ # is_nan(keyword_similarity_score)` -- rank by the exponent of
280
+ # `semantic_similarity_score` filling the value with 0 if it's NaN, also
281
+ # add constant 0.3 adjustment to the final score if
282
+ # `semantic_similarity_score` is NaN.
283
+ # - `0.2 * rr(semantic_similarity_score, 16) + 0.8 *
284
+ # rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank
285
+ # of `keyword_similarity_score` with slight adjustment of reciprocal rank
286
+ # of `semantic_smilarity_score`.
287
+ #
288
+ # The following signals are supported:
289
+ #
290
+ # * `semantic_similarity_score`: semantic similarity adjustment that is
291
+ # calculated using the embeddings generated by a proprietary Google model.
292
+ # This score determines how semantically similar a search query is to a
293
+ # document.
294
+ # * `keyword_similarity_score`: keyword match adjustment uses the Best
295
+ # Match 25 (BM25) ranking function. This score is calculated using a
296
+ # probabilistic model to estimate the probability that a document is
297
+ # relevant to a given query.
298
+ # * `relevance_score`: semantic relevance adjustment that uses a
299
+ # proprietary Google model to determine the meaning and intent behind a
300
+ # user's query in context with the content in the documents.
301
+ # * `pctr_rank`: predicted conversion rate adjustment as a rank use
302
+ # predicted Click-through rate (pCTR) to gauge the relevance and
303
+ # attractiveness of a search result from a user's perspective. A higher
304
+ # pCTR suggests that the result is more likely to satisfy the user's query
305
+ # and intent, making it a valuable signal for ranking.
306
+ # * `freshness_rank`: freshness adjustment as a rank
307
+ # * `document_age`: The time in hours elapsed since the document was last
308
+ # updated, a floating-point number (e.g., 0.25 means 15 minutes).
309
+ # * `topicality_rank`: topicality adjustment as a rank. Uses proprietary
310
+ # Google model to determine the keyword-based overlap between the query and
311
+ # the document.
312
+ # * `base_rank`: the default rank of the result
313
+ # @!attribute [rw] ranking_expression_backend
314
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::RankingExpressionBackend]
315
+ # The backend to use for the ranking expression evaluation.
249
316
  # @!attribute [rw] safe_search
250
317
  # @return [::Boolean]
251
318
  # Whether to turn on safe search. This is only supported for
@@ -1153,6 +1220,19 @@ module Google
1153
1220
  # High relevance threshold.
1154
1221
  HIGH = 4
1155
1222
  end
1223
+
1224
+ # The backend to use for the ranking expression evaluation.
1225
+ module RankingExpressionBackend
1226
+ # Default option for unspecified/unknown values.
1227
+ RANKING_EXPRESSION_BACKEND_UNSPECIFIED = 0
1228
+
1229
+ # Ranking by custom embedding model, the default way to evaluate the
1230
+ # ranking expression.
1231
+ RANK_BY_EMBEDDING = 3
1232
+
1233
+ # Ranking by custom formula.
1234
+ RANK_BY_FORMULA = 4
1235
+ end
1156
1236
  end
1157
1237
 
1158
1238
  # Response message for
@@ -1251,6 +1331,9 @@ module Google
1251
1331
  # @!attribute [rw] model_scores
1252
1332
  # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1beta::DoubleList}]
1253
1333
  # Google provided available scores.
1334
+ # @!attribute [rw] rank_signals
1335
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals]
1336
+ # A set of ranking signals associated with the result.
1254
1337
  class SearchResult
1255
1338
  include ::Google::Protobuf::MessageExts
1256
1339
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -1263,6 +1346,51 @@ module Google
1263
1346
  include ::Google::Protobuf::MessageExts
1264
1347
  extend ::Google::Protobuf::MessageExts::ClassMethods
1265
1348
  end
1349
+
1350
+ # A set of ranking signals.
1351
+ # @!attribute [rw] keyword_similarity_score
1352
+ # @return [::Float]
1353
+ # Keyword matching adjustment.
1354
+ # @!attribute [rw] relevance_score
1355
+ # @return [::Float]
1356
+ # Semantic relevance adjustment.
1357
+ # @!attribute [rw] semantic_similarity_score
1358
+ # @return [::Float]
1359
+ # Semantic similarity adjustment.
1360
+ # @!attribute [rw] pctr_rank
1361
+ # @return [::Float]
1362
+ # Predicted conversion rate adjustment as a rank.
1363
+ # @!attribute [rw] topicality_rank
1364
+ # @return [::Float]
1365
+ # Topicality adjustment as a rank.
1366
+ # @!attribute [rw] document_age
1367
+ # @return [::Float]
1368
+ # Age of the document in hours.
1369
+ # @!attribute [rw] boosting_factor
1370
+ # @return [::Float]
1371
+ # Combined custom boosts for a doc.
1372
+ # @!attribute [rw] default_rank
1373
+ # @return [::Float]
1374
+ # The default rank of the result.
1375
+ # @!attribute [rw] custom_signals
1376
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals::CustomSignal>]
1377
+ # A list of custom clearbox signals.
1378
+ class RankSignals
1379
+ include ::Google::Protobuf::MessageExts
1380
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1381
+
1382
+ # Custom clearbox signal represented by name and value pair.
1383
+ # @!attribute [rw] name
1384
+ # @return [::String]
1385
+ # Name of the signal.
1386
+ # @!attribute [rw] value
1387
+ # @return [::Float]
1388
+ # Float value representing the ranking signal (e.g. 1.25 for BM25).
1389
+ class CustomSignal
1390
+ include ::Google::Protobuf::MessageExts
1391
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1392
+ end
1393
+ end
1266
1394
  end
1267
1395
 
1268
1396
  # A facet result.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-discovery_engine-v1beta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0
4
+ version: 0.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: '1.0'
18
+ version: '1.2'
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: '1.0'
25
+ version: '1.2'
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: google-cloud-errors
28
28
  requirement: !ruby/object:Gem::Requirement