@@ -16,6 +16,8 @@ syntax = "proto3";
16
16
17
17
package google.cloud.dialogflow.cx.v3 ;
18
18
19
+ import "google/api/field_behavior.proto" ;
20
+
19
21
option cc_enable_arenas = true ;
20
22
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3" ;
21
23
option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb" ;
@@ -54,3 +56,183 @@ enum DataStoreType {
54
56
// A data store that contains structured data (for example FAQ).
55
57
STRUCTURED = 3 ;
56
58
}
59
+
60
+ // Data store connection feature output signals.
61
+ // Might be only partially field if processing stop before the final answer.
62
+ // Reasons for this can be, but are not limited to: empty UCS search results,
63
+ // positive RAI check outcome, grounding failure, ...
64
+ message DataStoreConnectionSignals {
65
+ // Diagnostic info related to the rewriter model call.
66
+ message RewriterModelCallSignals {
67
+ // Prompt as sent to the model.
68
+ string rendered_prompt = 1 ;
69
+
70
+ // Output of the generative model.
71
+ string model_output = 2 ;
72
+
73
+ // Name of the generative model. For example, "gemini-ultra", "gemini-pro",
74
+ // "gemini-1.5-flash" etc. Defaults to "Other" if the model is unknown.
75
+ string model = 3 ;
76
+ }
77
+
78
+ // Search snippet details.
79
+ message SearchSnippet {
80
+ // Title of the enclosing document.
81
+ string document_title = 1 ;
82
+
83
+ // Uri for the document. Present if specified for the document.
84
+ string document_uri = 2 ;
85
+
86
+ // Text included in the prompt.
87
+ string text = 3 ;
88
+ }
89
+
90
+ // Diagnostic info related to the answer generation model call.
91
+ message AnswerGenerationModelCallSignals {
92
+ // Prompt as sent to the model.
93
+ string rendered_prompt = 1 ;
94
+
95
+ // Output of the generative model.
96
+ string model_output = 2 ;
97
+
98
+ // Name of the generative model. For example, "gemini-ultra", "gemini-pro",
99
+ // "gemini-1.5-flash" etc. Defaults to "Other" if the model is unknown.
100
+ string model = 3 ;
101
+ }
102
+
103
+ // Answer part with citation.
104
+ message AnswerPart {
105
+ // Substring of the answer.
106
+ string text = 1 ;
107
+
108
+ // Citations for this answer part. Indices of `search_snippets`.
109
+ repeated int32 supporting_indices = 2 ;
110
+ }
111
+
112
+ // Snippet cited by the answer generation model.
113
+ message CitedSnippet {
114
+ // Details of the snippet.
115
+ SearchSnippet search_snippet = 1 ;
116
+
117
+ // Index of the snippet in `search_snippets` field.
118
+ int32 snippet_index = 2 ;
119
+ }
120
+
121
+ // Grounding signals.
122
+ message GroundingSignals {
123
+ // Represents the decision of the grounding check.
124
+ enum GroundingDecision {
125
+ // Decision not specified.
126
+ GROUNDING_DECISION_UNSPECIFIED = 0 ;
127
+
128
+ // Grounding have accepted the answer.
129
+ ACCEPTED_BY_GROUNDING = 1 ;
130
+
131
+ // Grounding have rejected the answer.
132
+ REJECTED_BY_GROUNDING = 2 ;
133
+ }
134
+
135
+ // Grounding score buckets.
136
+ enum GroundingScoreBucket {
137
+ // Score not specified.
138
+ GROUNDING_SCORE_BUCKET_UNSPECIFIED = 0 ;
139
+
140
+ // We have very low confidence that the answer is grounded.
141
+ VERY_LOW = 1 ;
142
+
143
+ // We have low confidence that the answer is grounded.
144
+ LOW = 3 ;
145
+
146
+ // We have medium confidence that the answer is grounded.
147
+ MEDIUM = 4 ;
148
+
149
+ // We have high confidence that the answer is grounded.
150
+ HIGH = 5 ;
151
+
152
+ // We have very high confidence that the answer is grounded.
153
+ VERY_HIGH = 6 ;
154
+ }
155
+
156
+ // Represents the decision of the grounding check.
157
+ GroundingDecision decision = 1 ;
158
+
159
+ // Grounding score bucket setting.
160
+ GroundingScoreBucket score = 2 ;
161
+ }
162
+
163
+ // Safety check results.
164
+ message SafetySignals {
165
+ // Safety decision.
166
+ // All kinds of check are incorporated into this final decision, including
167
+ // banned phrases check.
168
+ enum SafetyDecision {
169
+ // Decision not specified.
170
+ SAFETY_DECISION_UNSPECIFIED = 0 ;
171
+
172
+ // No manual or automatic safety check fired.
173
+ ACCEPTED_BY_SAFETY_CHECK = 1 ;
174
+
175
+ // One ore more safety checks fired.
176
+ REJECTED_BY_SAFETY_CHECK = 2 ;
177
+ }
178
+
179
+ // Specifies banned phrase match subject.
180
+ enum BannedPhraseMatch {
181
+ // No banned phrase check was executed.
182
+ BANNED_PHRASE_MATCH_UNSPECIFIED = 0 ;
183
+
184
+ // All banned phrase checks led to no match.
185
+ BANNED_PHRASE_MATCH_NONE = 1 ;
186
+
187
+ // A banned phrase matched the query.
188
+ BANNED_PHRASE_MATCH_QUERY = 2 ;
189
+
190
+ // A banned phrase matched the response.
191
+ BANNED_PHRASE_MATCH_RESPONSE = 3 ;
192
+ }
193
+
194
+ // Safety decision.
195
+ SafetyDecision decision = 1 ;
196
+
197
+ // Specifies banned phrase match subject.
198
+ BannedPhraseMatch banned_phrase_match = 2 ;
199
+
200
+ // The matched banned phrase if there was a match.
201
+ string matched_banned_phrase = 3 ;
202
+ }
203
+
204
+ // Optional. Diagnostic info related to the rewriter model call.
205
+ RewriterModelCallSignals rewriter_model_call_signals = 1
206
+ [(google.api.field_behavior ) = OPTIONAL ];
207
+
208
+ // Optional. Rewritten string query used for search.
209
+ string rewritten_query = 2 [(google.api.field_behavior ) = OPTIONAL ];
210
+
211
+ // Optional. Search snippets included in the answer generation prompt.
212
+ repeated SearchSnippet search_snippets = 3
213
+ [(google.api.field_behavior ) = OPTIONAL ];
214
+
215
+ // Optional. Diagnostic info related to the answer generation model call.
216
+ AnswerGenerationModelCallSignals answer_generation_model_call_signals = 4
217
+ [(google.api.field_behavior ) = OPTIONAL ];
218
+
219
+ // Optional. The final compiled answer.
220
+ string answer = 5 [(google.api.field_behavior ) = OPTIONAL ];
221
+
222
+ // Optional. Answer parts with relevant citations.
223
+ // Concatenation of texts should add up the `answer` (not counting
224
+ // whitespaces).
225
+ repeated AnswerPart answer_parts = 6 [(google.api.field_behavior ) = OPTIONAL ];
226
+
227
+ // Optional. Snippets cited by the answer generation model from the most to
228
+ // least relevant.
229
+ repeated CitedSnippet cited_snippets = 7
230
+ [(google.api.field_behavior ) = OPTIONAL ];
231
+
232
+ // Optional. Grounding signals.
233
+ GroundingSignals grounding_signals = 8
234
+ [(google.api.field_behavior ) = OPTIONAL ];
235
+
236
+ // Optional. Safety check result.
237
+ SafetySignals safety_signals = 9 [(google.api.field_behavior ) = OPTIONAL ];
238
+ }
0 commit comments