Class: Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::BoostSpec

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

Overview

Specification to boost suggestions based on the condtion of the suggestion.

Defined Under Namespace

Classes: ConditionBoostSpec

Instance Attribute Summary collapse

Instance Attribute Details

#condition_boost_specs::Array<::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::BoostSpec::ConditionBoostSpec>

Returns Condition boost specifications. If a suggestion matches multiple conditions in the specifictions, boost values from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.

Note: Currently only support language condition boost.

Returns:



204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
# File 'proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb', line 204

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

  # Boost applies to suggestions which match a condition.
  # @!attribute [rw] condition
  #   @return [::String]
  #     An expression which specifies a boost condition. The syntax is the same
  #     as [filter expression
  #     syntax](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax).
  #     Currently, the only supported condition is a list of BCP-47 lang codes.
  #
  #     Example:
  #
  #     * To boost suggestions in languages `en` or `fr`:
  #     `(lang_code: ANY("en", "fr"))`
  # @!attribute [rw] boost
  #   @return [::Float]
  #     Strength of the boost, which should be in [-1, 1].
  #     Negative boost means demotion. Default is 0.0.
  #
  #     Setting to 1.0 gives the suggestions a big promotion. However, it does
  #     not necessarily mean that the top result will be a boosted suggestion.
  #
  #     Setting to -1.0 gives the suggestions a big demotion. However, other
  #     suggestions that are relevant might still be shown.
  #
  #     Setting to 0.0 means no boost applied. The boosting condition is
  #     ignored.
  class ConditionBoostSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end