@ -287,6 +287,10 @@ message SearchRequest {
/ / The specification that configs the snippet in the search results.
message SnippetSpec {
/ / Max number of snippets returned in each search result.
/ /
/ / A snippet is an infomartive summary of a content with highlighting for
/ / UI rendering.
/ /
/ / If the matching snippets is less than the max_snippet_count , return all
/ / of the snippets ; otherwise , return the max_snippet_count.
/ /
@ -308,6 +312,36 @@ message SearchRequest {
int32 summary_result_count = 1 ;
}
/ / The specification that configs the extractive content in search results.
message ExtractiveContentSpec {
/ / The max number of extractive answers returned in each search result.
/ /
/ / An extractive answer is a verbatim answer extracted from the original
/ / document , which provides precise and contextually relevant answer to
/ / the search query.
/ /
/ / If the number of matching answers is less than the
/ / extractive_answer_count , return all of the answers ; otherwise , return
/ / the extractive_answer_count.
/ /
/ / At most 5 answers will be returned for each SearchResult.
int32 max_extractive_answer_count = 1 ;
/ / The max number of extractive segments returned in each search result.
/ /
/ / An extractive segment is a text segment extracted from the original
/ / document which is relevant to the search query and in general more
/ / verbose than an extrative 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 the
/ / max_extractive_segment_count , return all of the segments ; otherwise ,
/ / return the max_extractive_segment_count.
/ /
/ / Currently one segment will be returned for each SearchResult.
int32 max_extractive_segment_count = 2 ;
}
/ / If there is no snippet spec provided , there will be no snippet in the
/ / search result.
SnippetSpec snippet_spec = 1 ;
@ -315,6 +349,10 @@ message SearchRequest {
/ / If there is no summary spec provided , there will be no summary in the
/ / search response.
SummarySpec summary_spec = 2 ;
/ / If there is no extractive_content_spec provided , there will be no
/ / extractive answer in the search response.
ExtractiveContentSpec extractive_content_spec = 3 ;
}
/ / Required. The resource name of the Search serving config , such as
@ -549,6 +587,14 @@ message SearchResponse {
/ / performance.
string attribution_token = 4 ;
/ / The URI of a customer - defined redirect page. If redirect action is
/ / triggered , no search is performed , and only
/ / [ redirect_uri ] [ google.cloud.discoveryengine.v1beta.SearchResponse.redirect_uri ]
/ / and
/ / [ attribution_token ] [ google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token ]
/ / are set in the response.
string redirect_uri = 12 ;
/ / A token that can be sent as
/ / [ SearchRequest.page_token ] [ google.cloud.discoveryengine.v1beta.SearchRequest.page_token ]
/ / to retrieve the next page. If this field is omitted , there are no