Class: Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec
- Inherits:
-
Object
- Object
- Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/discoveryengine_v1/classes.rb,
lib/google/apis/discoveryengine_v1/representations.rb,
lib/google/apis/discoveryengine_v1/representations.rb
Overview
A specification for configuring the extractive content in a search response.
Instance Attribute Summary collapse
-
#max_extractive_answer_count ⇒ Fixnum
The maximum number of extractive answers returned in each search result.
-
#max_extractive_segment_count ⇒ Fixnum
The max number of extractive segments returned in each search result.
-
#num_next_segments ⇒ Fixnum
Return at most
num_next_segments
segments after each selected segments. -
#num_previous_segments ⇒ Fixnum
Specifies whether to also include the adjacent from each selected segments.
-
#return_extractive_segment_score ⇒ Boolean
(also: #return_extractive_segment_score?)
Specifies whether to return the confidence score from the extractive segments in each search result.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec
constructor
A new instance of GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec
Returns a new instance of GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec.
18300 18301 18302 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 18300 def initialize(**args) update!(**args) end |
Instance Attribute Details
#max_extractive_answer_count ⇒ Fixnum
The maximum number of extractive answers returned in each search result. An
extractive answer is a verbatim answer extracted from the original document,
which provides a precise and contextually relevant answer to the search query.
If the number of matching answers is less than the
max_extractive_answer_count
, return all of the answers. Otherwise, return the
max_extractive_answer_count
. At most five answers are returned for each
SearchResult.
Corresponds to the JSON property maxExtractiveAnswerCount
18265 18266 18267 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 18265 def max_extractive_answer_count @max_extractive_answer_count end |
#max_extractive_segment_count ⇒ Fixnum
The max number of extractive segments returned in each search result. Only
applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED or
DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment is a
text segment extracted from the original document that is relevant to the
search query, and, in general, more verbose than an extractive answer. The
segment could then be used as input for LLMs to generate summaries and answers.
If the number of matching segments is less than max_extractive_segment_count
, return all of the segments. Otherwise, return the
max_extractive_segment_count
.
Corresponds to the JSON property maxExtractiveSegmentCount
18278 18279 18280 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 18278 def max_extractive_segment_count @max_extractive_segment_count end |
#num_next_segments ⇒ Fixnum
Return at most num_next_segments
segments after each selected segments.
Corresponds to the JSON property numNextSegments
18283 18284 18285 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 18283 def num_next_segments @num_next_segments end |
#num_previous_segments ⇒ Fixnum
Specifies whether to also include the adjacent from each selected segments.
Return at most num_previous_segments
segments before each selected segments.
Corresponds to the JSON property numPreviousSegments
18289 18290 18291 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 18289 def num_previous_segments @num_previous_segments end |
#return_extractive_segment_score ⇒ Boolean Also known as: return_extractive_segment_score?
Specifies whether to return the confidence score from the extractive segments
in each search result. This feature is available only for new or allowlisted
data stores. To allowlist your data store, contact your Customer Engineer. The
default value is false
.
Corresponds to the JSON property returnExtractiveSegmentScore
18297 18298 18299 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 18297 def return_extractive_segment_score @return_extractive_segment_score end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
18305 18306 18307 18308 18309 18310 18311 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 18305 def update!(**args) @max_extractive_answer_count = args[:max_extractive_answer_count] if args.key?(:max_extractive_answer_count) @max_extractive_segment_count = args[:max_extractive_segment_count] if args.key?(:max_extractive_segment_count) @num_next_segments = args[:num_next_segments] if args.key?(:num_next_segments) @num_previous_segments = args[:num_previous_segments] if args.key?(:num_previous_segments) @return_extractive_segment_score = args[:return_extractive_segment_score] if args.key?(:return_extractive_segment_score) end |