@@ -69,6 +69,13 @@ message Answer {
6969
7070 // Page identifier.
7171 string page_identifier = 2 ;
72+
73+ // The relevance of the chunk for a given query. Values range from 0.0
74+ // (completely irrelevant) to 1.0 (completely relevant).
75+ // This value is for informational purpose only. It may change for
76+ // the same query and chunk at any time due to a model retraining or
77+ // change in implementation.
78+ optional float relevance_score = 3 ;
7279 }
7380
7481 // Document resource name.
@@ -121,20 +128,38 @@ message Answer {
121128 // Chunk textual content.
122129 string content = 2 ;
123130
124- // Relevance score.
131+ // The relevance of the chunk for a given query. Values range from 0.0
132+ // (completely irrelevant) to 1.0 (completely relevant).
133+ // This value is for informational purpose only. It may change for
134+ // the same query and chunk at any time due to a model retraining or
135+ // change in implementation.
125136 optional float relevance_score = 3 ;
126137
127138 // Document metadata.
128139 DocumentMetadata document_metadata = 4 ;
129140 }
130141
142+ // Structured search information.
143+ message StructuredDocumentInfo {
144+ // Document resource name.
145+ string document = 1 [(google.api.resource_reference ) = {
146+ type : "discoveryengine.googleapis.com/Document"
147+ }];
148+
149+ // Structured search data.
150+ google.protobuf.Struct struct_data = 2 ;
151+ }
152+
131153 // Search result content.
132154 oneof content {
133155 // Unstructured document information.
134156 UnstructuredDocumentInfo unstructured_document_info = 1 ;
135157
136158 // Chunk information.
137159 ChunkInfo chunk_info = 2 ;
160+
161+ // Structured document information.
162+ StructuredDocumentInfo structured_document_info = 3 ;
138163 }
139164 }
140165
@@ -168,7 +193,11 @@ message Answer {
168193 // Chunk textual content.
169194 string content = 2 ;
170195
171- // Relevance score.
196+ // The relevance of the chunk for a given query. Values range from
197+ // 0.0 (completely irrelevant) to 1.0 (completely relevant).
198+ // This value is for informational purpose only. It may change for
199+ // the same query and chunk at any time due to a model retraining or
200+ // change in implementation.
172201 optional float relevance_score = 3 ;
173202 }
174203
@@ -188,6 +217,14 @@ message Answer {
188217 // If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
189218 // populate chunk info.
190219 repeated ChunkInfo chunk_info = 5 ;
220+
221+ // Data representation.
222+ // The structured JSON data for the document.
223+ // It's populated from the struct data from the Document
224+ // , or the Chunk in
225+ // search result
226+ // .
227+ google.protobuf.Struct struct_data = 6 ;
191228 }
192229
193230 // Search results observed by the search action, it can be snippets info
@@ -247,6 +284,9 @@ message Answer {
247284
248285 // Non-answer-seeking query classification type.
249286 NON_ANSWER_SEEKING_QUERY = 2 ;
287+
288+ // Jail-breaking query classification type.
289+ JAIL_BREAKING_QUERY = 3 ;
250290 }
251291
252292 // Query classification type.
@@ -296,6 +336,19 @@ message Answer {
296336 // Google skips the answer if there is a potential policy violation
297337 // detected. This includes content that may be violent or toxic.
298338 POTENTIAL_POLICY_VIOLATION = 4 ;
339+
340+ // The no relevant content case.
341+ //
342+ // Google skips the answer if there is no relevant content in the
343+ // retrieved search results.
344+ NO_RELEVANT_CONTENT = 5 ;
345+
346+ // The jail-breaking query ignored case.
347+ //
348+ // For example, "Reply in the tone of a competing company's CEO".
349+ // Google skips the answer if the query is classified as a jail-breaking
350+ // query.
351+ JAIL_BREAKING_QUERY_IGNORED = 6 ;
299352 }
300353
301354 // Immutable. Fully qualified name
0 commit comments