Struct google_api_proto::google::cloud::discoveryengine::v1alpha::search_request::content_search_spec::ExtractiveContentSpec
source · pub struct ExtractiveContentSpec {
pub max_extractive_answer_count: i32,
pub max_extractive_segment_count: i32,
pub return_extractive_segment_score: bool,
pub num_previous_segments: i32,
pub num_next_segments: i32,
}
Expand description
A specification for configuring the extractive content in a search response.
Fields§
§max_extractive_answer_count: i32
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][google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult].
max_extractive_segment_count: i32
The max number of extractive segments returned in each search result. Only applied if the [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is set to [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1alpha.DataStore.ContentConfig.CONTENT_REQUIRED] or [DataStore.solution_types][google.cloud.discoveryengine.v1alpha.DataStore.solution_types] is [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.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
.
return_extractive_segment_score: bool
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
.
num_previous_segments: i32
Specifies whether to also include the adjacent from each selected
segments.
Return at most num_previous_segments
segments before each selected
segments.
num_next_segments: i32
Return at most num_next_segments
segments after each selected
segments.
Trait Implementations§
source§impl Clone for ExtractiveContentSpec
impl Clone for ExtractiveContentSpec
source§fn clone(&self) -> ExtractiveContentSpec
fn clone(&self) -> ExtractiveContentSpec
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ExtractiveContentSpec
impl Debug for ExtractiveContentSpec
source§impl Default for ExtractiveContentSpec
impl Default for ExtractiveContentSpec
source§impl Message for ExtractiveContentSpec
impl Message for ExtractiveContentSpec
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for ExtractiveContentSpec
impl PartialEq for ExtractiveContentSpec
source§fn eq(&self, other: &ExtractiveContentSpec) -> bool
fn eq(&self, other: &ExtractiveContentSpec) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for ExtractiveContentSpec
impl StructuralPartialEq for ExtractiveContentSpec
Auto Trait Implementations§
impl Freeze for ExtractiveContentSpec
impl RefUnwindSafe for ExtractiveContentSpec
impl Send for ExtractiveContentSpec
impl Sync for ExtractiveContentSpec
impl Unpin for ExtractiveContentSpec
impl UnwindSafe for ExtractiveContentSpec
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request