@google-cloud/discoveryengine 1.10.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +30 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/evaluation.proto +232 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/evaluation_service.proto +252 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +83 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/sample_query.proto +86 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/sample_query_service.proto +264 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/sample_query_set.proto +64 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/sample_query_set_service.proto +258 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/chunk.proto +119 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +0 -5
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +10 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +37 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/evaluation.proto +231 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/evaluation_service.proto +252 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +83 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/sample_query.proto +86 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/sample_query_service.proto +264 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/sample_query_set.proto +64 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/sample_query_set_service.proto +256 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +67 -8
- package/build/protos/google/cloud/discoveryengine/v1beta/serving_config.proto +11 -5
- package/build/protos/protos.d.ts +28997 -20222
- package/build/protos/protos.js +74749 -54453
- package/build/protos/protos.json +6933 -4764
- package/build/src/v1alpha/acl_config_service_client.d.ts +108 -0
- package/build/src/v1alpha/acl_config_service_client.js +157 -0
- package/build/src/v1alpha/chunk_service_client.d.ts +108 -0
- package/build/src/v1alpha/chunk_service_client.js +157 -0
- package/build/src/v1alpha/completion_service_client.d.ts +108 -0
- package/build/src/v1alpha/completion_service_client.js +157 -0
- package/build/src/v1alpha/control_service_client.d.ts +108 -0
- package/build/src/v1alpha/control_service_client.js +157 -0
- package/build/src/v1alpha/conversational_search_service_client.d.ts +108 -0
- package/build/src/v1alpha/conversational_search_service_client.js +157 -0
- package/build/src/v1alpha/data_store_service_client.d.ts +108 -0
- package/build/src/v1alpha/data_store_service_client.js +157 -0
- package/build/src/v1alpha/document_service_client.d.ts +108 -0
- package/build/src/v1alpha/document_service_client.js +157 -0
- package/build/src/v1alpha/engine_service_client.d.ts +108 -0
- package/build/src/v1alpha/engine_service_client.js +157 -0
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +108 -0
- package/build/src/v1alpha/estimate_billing_service_client.js +157 -0
- package/build/src/v1alpha/evaluation_service_client.d.ts +2349 -0
- package/build/src/v1alpha/evaluation_service_client.js +3288 -0
- package/build/src/v1alpha/evaluation_service_client_config.json +58 -0
- package/build/src/v1alpha/grounded_generation_service_client.d.ts +108 -0
- package/build/src/v1alpha/grounded_generation_service_client.js +157 -0
- package/build/src/v1alpha/index.d.ts +3 -0
- package/build/src/v1alpha/index.js +7 -1
- package/build/src/v1alpha/project_service_client.d.ts +108 -0
- package/build/src/v1alpha/project_service_client.js +157 -0
- package/build/src/v1alpha/rank_service_client.d.ts +108 -0
- package/build/src/v1alpha/rank_service_client.js +157 -0
- package/build/src/v1alpha/recommendation_service_client.d.ts +108 -0
- package/build/src/v1alpha/recommendation_service_client.js +157 -0
- package/build/src/v1alpha/sample_query_service_client.d.ts +2317 -0
- package/build/src/v1alpha/sample_query_service_client.js +3186 -0
- package/build/src/v1alpha/sample_query_service_client_config.json +68 -0
- package/build/src/v1alpha/sample_query_set_service_client.d.ts +2176 -0
- package/build/src/v1alpha/sample_query_set_service_client.js +2931 -0
- package/build/src/v1alpha/sample_query_set_service_client_config.json +63 -0
- package/build/src/v1alpha/schema_service_client.d.ts +108 -0
- package/build/src/v1alpha/schema_service_client.js +157 -0
- package/build/src/v1alpha/search_service_client.d.ts +108 -0
- package/build/src/v1alpha/search_service_client.js +157 -0
- package/build/src/v1alpha/search_tuning_service_client.d.ts +108 -0
- package/build/src/v1alpha/search_tuning_service_client.js +157 -0
- package/build/src/v1alpha/serving_config_service_client.d.ts +108 -0
- package/build/src/v1alpha/serving_config_service_client.js +157 -0
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +108 -0
- package/build/src/v1alpha/site_search_engine_service_client.js +157 -0
- package/build/src/v1alpha/user_event_service_client.d.ts +108 -0
- package/build/src/v1alpha/user_event_service_client.js +157 -0
- package/build/src/v1beta/completion_service_client.d.ts +237 -0
- package/build/src/v1beta/completion_service_client.js +339 -0
- package/build/src/v1beta/control_service_client.d.ts +237 -0
- package/build/src/v1beta/control_service_client.js +333 -0
- package/build/src/v1beta/conversational_search_service_client.d.ts +237 -0
- package/build/src/v1beta/conversational_search_service_client.js +333 -0
- package/build/src/v1beta/data_store_service_client.d.ts +237 -0
- package/build/src/v1beta/data_store_service_client.js +339 -0
- package/build/src/v1beta/document_service_client.d.ts +237 -0
- package/build/src/v1beta/document_service_client.js +339 -0
- package/build/src/v1beta/engine_service_client.d.ts +237 -0
- package/build/src/v1beta/engine_service_client.js +339 -0
- package/build/src/v1beta/evaluation_service_client.d.ts +2325 -0
- package/build/src/v1beta/evaluation_service_client.js +3252 -0
- package/build/src/v1beta/evaluation_service_client_config.json +58 -0
- package/build/src/v1beta/grounded_generation_service_client.d.ts +237 -0
- package/build/src/v1beta/grounded_generation_service_client.js +333 -0
- package/build/src/v1beta/index.d.ts +3 -0
- package/build/src/v1beta/index.js +7 -1
- package/build/src/v1beta/project_service_client.d.ts +237 -0
- package/build/src/v1beta/project_service_client.js +339 -0
- package/build/src/v1beta/rank_service_client.d.ts +237 -0
- package/build/src/v1beta/rank_service_client.js +333 -0
- package/build/src/v1beta/recommendation_service_client.d.ts +237 -0
- package/build/src/v1beta/recommendation_service_client.js +333 -0
- package/build/src/v1beta/sample_query_service_client.d.ts +2293 -0
- package/build/src/v1beta/sample_query_service_client.js +3150 -0
- package/build/src/v1beta/sample_query_service_client_config.json +68 -0
- package/build/src/v1beta/sample_query_set_service_client.d.ts +2150 -0
- package/build/src/v1beta/sample_query_set_service_client.js +2895 -0
- package/build/src/v1beta/sample_query_set_service_client_config.json +63 -0
- package/build/src/v1beta/schema_service_client.d.ts +237 -0
- package/build/src/v1beta/schema_service_client.js +339 -0
- package/build/src/v1beta/search_service_client.d.ts +267 -12
- package/build/src/v1beta/search_service_client.js +353 -8
- package/build/src/v1beta/search_tuning_service_client.d.ts +237 -0
- package/build/src/v1beta/search_tuning_service_client.js +339 -0
- package/build/src/v1beta/serving_config_service_client.d.ts +237 -0
- package/build/src/v1beta/serving_config_service_client.js +333 -0
- package/build/src/v1beta/site_search_engine_service_client.d.ts +237 -0
- package/build/src/v1beta/site_search_engine_service_client.js +339 -0
- package/build/src/v1beta/user_event_service_client.d.ts +237 -0
- package/build/src/v1beta/user_event_service_client.js +339 -0
- package/package.json +1 -1
@@ -0,0 +1,231 @@
|
|
1
|
+
// Copyright 2024 Google LLC
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
|
15
|
+
syntax = "proto3";
|
16
|
+
|
17
|
+
package google.cloud.discoveryengine.v1beta;
|
18
|
+
|
19
|
+
import "google/api/field_behavior.proto";
|
20
|
+
import "google/api/resource.proto";
|
21
|
+
import "google/cloud/discoveryengine/v1beta/search_service.proto";
|
22
|
+
import "google/protobuf/timestamp.proto";
|
23
|
+
import "google/rpc/status.proto";
|
24
|
+
|
25
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
|
26
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb";
|
27
|
+
option java_multiple_files = true;
|
28
|
+
option java_outer_classname = "EvaluationProto";
|
29
|
+
option java_package = "com.google.cloud.discoveryengine.v1beta";
|
30
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
31
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
|
32
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
|
33
|
+
|
34
|
+
// An evaluation is a single execution (or run) of an evaluation process. It
|
35
|
+
// encapsulates the state of the evaluation and the resulting data.
|
36
|
+
message Evaluation {
|
37
|
+
option (google.api.resource) = {
|
38
|
+
type: "discoveryengine.googleapis.com/Evaluation"
|
39
|
+
pattern: "projects/{project}/locations/{location}/evaluations/{evaluation}"
|
40
|
+
};
|
41
|
+
|
42
|
+
// Describes the specification of the evaluation.
|
43
|
+
message EvaluationSpec {
|
44
|
+
// Describes the specification of the query set.
|
45
|
+
message QuerySetSpec {
|
46
|
+
// Required. The full resource name of the
|
47
|
+
// [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]
|
48
|
+
// used for the evaluation, in the format of
|
49
|
+
// `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.
|
50
|
+
string sample_query_set = 1 [
|
51
|
+
(google.api.field_behavior) = REQUIRED,
|
52
|
+
(google.api.resource_reference) = {
|
53
|
+
type: "discoveryengine.googleapis.com/SampleQuerySet"
|
54
|
+
}
|
55
|
+
];
|
56
|
+
}
|
57
|
+
|
58
|
+
// The search specification.
|
59
|
+
oneof search_spec {
|
60
|
+
// Required. The search request that is used to perform the evaluation.
|
61
|
+
//
|
62
|
+
// Only the following fields within SearchRequest are supported; if any
|
63
|
+
// other fields are provided, an UNSUPPORTED error will be returned:
|
64
|
+
//
|
65
|
+
// * [SearchRequest.serving_config][google.cloud.discoveryengine.v1beta.SearchRequest.serving_config]
|
66
|
+
// * [SearchRequest.branch][google.cloud.discoveryengine.v1beta.SearchRequest.branch]
|
67
|
+
// * [SearchRequest.canonical_filter][google.cloud.discoveryengine.v1beta.SearchRequest.canonical_filter]
|
68
|
+
// * [SearchRequest.query_expansion_spec][google.cloud.discoveryengine.v1beta.SearchRequest.query_expansion_spec]
|
69
|
+
// * [SearchRequest.spell_correction_spec][google.cloud.discoveryengine.v1beta.SearchRequest.spell_correction_spec]
|
70
|
+
// * [SearchRequest.content_search_spec][google.cloud.discoveryengine.v1beta.SearchRequest.content_search_spec]
|
71
|
+
// * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id]
|
72
|
+
SearchRequest search_request = 2 [(google.api.field_behavior) = REQUIRED];
|
73
|
+
}
|
74
|
+
|
75
|
+
// Required. The specification of the query set.
|
76
|
+
QuerySetSpec query_set_spec = 1 [(google.api.field_behavior) = REQUIRED];
|
77
|
+
}
|
78
|
+
|
79
|
+
// Describes the state of an evaluation.
|
80
|
+
enum State {
|
81
|
+
// The evaluation is unspecified.
|
82
|
+
STATE_UNSPECIFIED = 0;
|
83
|
+
|
84
|
+
// The service is preparing to run the evaluation.
|
85
|
+
PENDING = 1;
|
86
|
+
|
87
|
+
// The evaluation is in progress.
|
88
|
+
RUNNING = 2;
|
89
|
+
|
90
|
+
// The evaluation completed successfully.
|
91
|
+
SUCCEEDED = 3;
|
92
|
+
|
93
|
+
// The evaluation failed.
|
94
|
+
FAILED = 4;
|
95
|
+
}
|
96
|
+
|
97
|
+
// Identifier. The full resource name of the
|
98
|
+
// [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation], in the format
|
99
|
+
// of `projects/{project}/locations/{location}/evaluations/{evaluation}`.
|
100
|
+
//
|
101
|
+
// This field must be a UTF-8 encoded string with a length limit of 1024
|
102
|
+
// characters.
|
103
|
+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
|
104
|
+
|
105
|
+
// Required. The specification of the evaluation.
|
106
|
+
EvaluationSpec evaluation_spec = 2 [(google.api.field_behavior) = REQUIRED];
|
107
|
+
|
108
|
+
// Output only. The metrics produced by the evaluation, averaged across all
|
109
|
+
// [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s in the
|
110
|
+
// [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet].
|
111
|
+
//
|
112
|
+
// Only populated when the evaluation's state is SUCCEEDED.
|
113
|
+
QualityMetrics quality_metrics = 3
|
114
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
115
|
+
|
116
|
+
// Output only. The state of the evaluation.
|
117
|
+
State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
|
118
|
+
|
119
|
+
// Output only. The error that occurred during evaluation. Only populated when
|
120
|
+
// the evaluation's state is FAILED.
|
121
|
+
google.rpc.Status error = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
|
122
|
+
|
123
|
+
// Output only. Timestamp the
|
124
|
+
// [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation] was created
|
125
|
+
// at.
|
126
|
+
google.protobuf.Timestamp create_time = 6
|
127
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
128
|
+
|
129
|
+
// Output only. Timestamp the
|
130
|
+
// [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation] was completed
|
131
|
+
// at.
|
132
|
+
google.protobuf.Timestamp end_time = 7
|
133
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
134
|
+
|
135
|
+
// Output only. A sample of errors encountered while processing the request.
|
136
|
+
repeated google.rpc.Status error_samples = 8
|
137
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
138
|
+
}
|
139
|
+
|
140
|
+
// Describes the metrics produced by the evaluation.
|
141
|
+
message QualityMetrics {
|
142
|
+
// Stores the metric values at specific top-k levels.
|
143
|
+
message TopkMetrics {
|
144
|
+
// The top-1 value.
|
145
|
+
double top_1 = 1;
|
146
|
+
|
147
|
+
// The top-3 value.
|
148
|
+
double top_3 = 2;
|
149
|
+
|
150
|
+
// The top-5 value.
|
151
|
+
double top_5 = 3;
|
152
|
+
|
153
|
+
// The top-10 value.
|
154
|
+
double top_10 = 4;
|
155
|
+
}
|
156
|
+
|
157
|
+
// Recall per document, at various top-k cutoff levels.
|
158
|
+
//
|
159
|
+
// Recall is the fraction of relevant documents retrieved out of all
|
160
|
+
// relevant documents.
|
161
|
+
//
|
162
|
+
// Example (top-5):
|
163
|
+
// * For a single
|
164
|
+
// [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], If 3 out
|
165
|
+
// of 5 relevant documents are retrieved in the top-5, recall@5 = 3/5 = 0.6
|
166
|
+
TopkMetrics doc_recall = 1;
|
167
|
+
|
168
|
+
// Precision per document, at various top-k cutoff levels.
|
169
|
+
//
|
170
|
+
// Precision is the fraction of retrieved documents that are relevant.
|
171
|
+
//
|
172
|
+
// Example (top-5):
|
173
|
+
// * For a single
|
174
|
+
// [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], If 4 out
|
175
|
+
// of 5 retrieved documents in the top-5 are relevant, precision@5 = 4/5 =
|
176
|
+
// 0.8
|
177
|
+
TopkMetrics doc_precision = 2;
|
178
|
+
|
179
|
+
// Normalized discounted cumulative gain (NDCG) per document, at various top-k
|
180
|
+
// cutoff levels.
|
181
|
+
//
|
182
|
+
// NDCG measures the ranking quality, giving higher relevance to top
|
183
|
+
// results.
|
184
|
+
//
|
185
|
+
// Example (top-3):
|
186
|
+
// Suppose [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]
|
187
|
+
// with three retrieved documents (D1, D2, D3) and binary relevance
|
188
|
+
// judgements (1 for relevant, 0 for not relevant):
|
189
|
+
//
|
190
|
+
// Retrieved: [D3 (0), D1 (1), D2 (1)]
|
191
|
+
// Ideal: [D1 (1), D2 (1), D3 (0)]
|
192
|
+
//
|
193
|
+
// Calculate NDCG@3 for each
|
194
|
+
// [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]:
|
195
|
+
// * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13
|
196
|
+
// * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63
|
197
|
+
// * NDCG@3: 1.13/1.63 = 0.693
|
198
|
+
TopkMetrics doc_ndcg = 3;
|
199
|
+
|
200
|
+
// Recall per page, at various top-k cutoff levels.
|
201
|
+
//
|
202
|
+
// Recall is the fraction of relevant pages retrieved out of all relevant
|
203
|
+
// pages.
|
204
|
+
//
|
205
|
+
// Example (top-5):
|
206
|
+
// * For a single
|
207
|
+
// [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], if 3 out
|
208
|
+
// of 5 relevant pages are retrieved in the top-5, recall@5 = 3/5 = 0.6
|
209
|
+
TopkMetrics page_recall = 4;
|
210
|
+
|
211
|
+
// Normalized discounted cumulative gain (NDCG) per page, at various top-k
|
212
|
+
// cutoff levels.
|
213
|
+
//
|
214
|
+
// NDCG measures the ranking quality, giving higher relevance to top
|
215
|
+
// results.
|
216
|
+
//
|
217
|
+
// Example (top-3):
|
218
|
+
// Suppose [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]
|
219
|
+
// with three retrieved pages (P1, P2, P3) and binary relevance judgements (1
|
220
|
+
// for relevant, 0 for not relevant):
|
221
|
+
//
|
222
|
+
// Retrieved: [P3 (0), P1 (1), P2 (1)]
|
223
|
+
// Ideal: [P1 (1), P2 (1), P3 (0)]
|
224
|
+
//
|
225
|
+
// Calculate NDCG@3 for
|
226
|
+
// [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]:
|
227
|
+
// * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13
|
228
|
+
// * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63
|
229
|
+
// * NDCG@3: 1.13/1.63 = 0.693
|
230
|
+
TopkMetrics page_ndcg = 5;
|
231
|
+
}
|
@@ -0,0 +1,252 @@
|
|
1
|
+
// Copyright 2024 Google LLC
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
|
15
|
+
syntax = "proto3";
|
16
|
+
|
17
|
+
package google.cloud.discoveryengine.v1beta;
|
18
|
+
|
19
|
+
import "google/api/annotations.proto";
|
20
|
+
import "google/api/client.proto";
|
21
|
+
import "google/api/field_behavior.proto";
|
22
|
+
import "google/api/resource.proto";
|
23
|
+
import "google/cloud/discoveryengine/v1beta/evaluation.proto";
|
24
|
+
import "google/cloud/discoveryengine/v1beta/sample_query.proto";
|
25
|
+
import "google/longrunning/operations.proto";
|
26
|
+
|
27
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
|
28
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb";
|
29
|
+
option java_multiple_files = true;
|
30
|
+
option java_outer_classname = "EvaluationServiceProto";
|
31
|
+
option java_package = "com.google.cloud.discoveryengine.v1beta";
|
32
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
33
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
|
34
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
|
35
|
+
|
36
|
+
// Service for managing
|
37
|
+
// [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s,
|
38
|
+
service EvaluationService {
|
39
|
+
option (google.api.default_host) = "discoveryengine.googleapis.com";
|
40
|
+
option (google.api.oauth_scopes) =
|
41
|
+
"https://www.googleapis.com/auth/cloud-platform";
|
42
|
+
|
43
|
+
// Gets a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].
|
44
|
+
rpc GetEvaluation(GetEvaluationRequest) returns (Evaluation) {
|
45
|
+
option (google.api.http) = {
|
46
|
+
get: "/v1beta/{name=projects/*/locations/*/evaluations/*}"
|
47
|
+
};
|
48
|
+
option (google.api.method_signature) = "name";
|
49
|
+
}
|
50
|
+
|
51
|
+
// Gets a list of
|
52
|
+
// [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s.
|
53
|
+
rpc ListEvaluations(ListEvaluationsRequest)
|
54
|
+
returns (ListEvaluationsResponse) {
|
55
|
+
option (google.api.http) = {
|
56
|
+
get: "/v1beta/{parent=projects/*/locations/*}/evaluations"
|
57
|
+
};
|
58
|
+
option (google.api.method_signature) = "parent";
|
59
|
+
}
|
60
|
+
|
61
|
+
// Creates a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].
|
62
|
+
//
|
63
|
+
// Upon creation, the evaluation will be automatically triggered and begin
|
64
|
+
// execution.
|
65
|
+
rpc CreateEvaluation(CreateEvaluationRequest)
|
66
|
+
returns (google.longrunning.Operation) {
|
67
|
+
option (google.api.http) = {
|
68
|
+
post: "/v1beta/{parent=projects/*/locations/*}/evaluations"
|
69
|
+
body: "evaluation"
|
70
|
+
};
|
71
|
+
option (google.api.method_signature) = "parent,evaluation";
|
72
|
+
option (google.longrunning.operation_info) = {
|
73
|
+
response_type: "google.cloud.discoveryengine.v1beta.Evaluation"
|
74
|
+
metadata_type: "google.cloud.discoveryengine.v1beta.CreateEvaluationMetadata"
|
75
|
+
};
|
76
|
+
}
|
77
|
+
|
78
|
+
// Gets a list of results for a given a
|
79
|
+
// [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].
|
80
|
+
rpc ListEvaluationResults(ListEvaluationResultsRequest)
|
81
|
+
returns (ListEvaluationResultsResponse) {
|
82
|
+
option (google.api.http) = {
|
83
|
+
get: "/v1beta/{evaluation=projects/*/locations/*/evaluations/*}:listResults"
|
84
|
+
};
|
85
|
+
option (google.api.method_signature) = "evaluation";
|
86
|
+
}
|
87
|
+
}
|
88
|
+
|
89
|
+
// Request message for
|
90
|
+
// [EvaluationService.GetEvaluation][google.cloud.discoveryengine.v1beta.EvaluationService.GetEvaluation]
|
91
|
+
// method.
|
92
|
+
message GetEvaluationRequest {
|
93
|
+
// Required. Full resource name of
|
94
|
+
// [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation], such as
|
95
|
+
// `projects/{project}/locations/{location}/evaluations/{evaluation}`.
|
96
|
+
//
|
97
|
+
// If the caller does not have permission to access the
|
98
|
+
// [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation], regardless of
|
99
|
+
// whether or not it exists, a PERMISSION_DENIED error is returned.
|
100
|
+
//
|
101
|
+
// If the requested
|
102
|
+
// [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation] does not
|
103
|
+
// exist, a NOT_FOUND error is returned.
|
104
|
+
string name = 1 [
|
105
|
+
(google.api.field_behavior) = REQUIRED,
|
106
|
+
(google.api.resource_reference) = {
|
107
|
+
type: "discoveryengine.googleapis.com/Evaluation"
|
108
|
+
}
|
109
|
+
];
|
110
|
+
}
|
111
|
+
|
112
|
+
// Request message for
|
113
|
+
// [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations]
|
114
|
+
// method.
|
115
|
+
message ListEvaluationsRequest {
|
116
|
+
// Required. The parent location resource name, such as
|
117
|
+
// `projects/{project}/locations/{location}`.
|
118
|
+
//
|
119
|
+
// If the caller does not have permission to list
|
120
|
+
// [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s under this
|
121
|
+
// location, regardless of whether or not this location exists, a
|
122
|
+
// `PERMISSION_DENIED` error is returned.
|
123
|
+
string parent = 1 [
|
124
|
+
(google.api.field_behavior) = REQUIRED,
|
125
|
+
(google.api.resource_reference) = {
|
126
|
+
type: "discoveryengine.googleapis.com/Location"
|
127
|
+
}
|
128
|
+
];
|
129
|
+
|
130
|
+
// Maximum number of
|
131
|
+
// [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s to return. If
|
132
|
+
// unspecified, defaults to 100. The maximum allowed value is 1000. Values
|
133
|
+
// above 1000 will be coerced to 1000.
|
134
|
+
//
|
135
|
+
// If this field is negative, an `INVALID_ARGUMENT` error is returned.
|
136
|
+
int32 page_size = 2;
|
137
|
+
|
138
|
+
// A page token
|
139
|
+
// [ListEvaluationsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationsResponse.next_page_token],
|
140
|
+
// received from a previous
|
141
|
+
// [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations]
|
142
|
+
// call. Provide this to retrieve the subsequent page.
|
143
|
+
//
|
144
|
+
// When paginating, all other parameters provided to
|
145
|
+
// [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations]
|
146
|
+
// must match the call that provided the page token. Otherwise, an
|
147
|
+
// `INVALID_ARGUMENT` error is returned.
|
148
|
+
string page_token = 3;
|
149
|
+
}
|
150
|
+
|
151
|
+
// Response message for
|
152
|
+
// [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations]
|
153
|
+
// method.
|
154
|
+
message ListEvaluationsResponse {
|
155
|
+
// The [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s.
|
156
|
+
repeated Evaluation evaluations = 1;
|
157
|
+
|
158
|
+
// A token that can be sent as
|
159
|
+
// [ListEvaluationsRequest.page_token][google.cloud.discoveryengine.v1beta.ListEvaluationsRequest.page_token]
|
160
|
+
// to retrieve the next page. If this field is omitted, there are no
|
161
|
+
// subsequent pages.
|
162
|
+
string next_page_token = 2;
|
163
|
+
}
|
164
|
+
|
165
|
+
// Request message for
|
166
|
+
// [EvaluationService.CreateEvaluation][google.cloud.discoveryengine.v1beta.EvaluationService.CreateEvaluation]
|
167
|
+
// method.
|
168
|
+
message CreateEvaluationRequest {
|
169
|
+
// Required. The parent resource name, such as
|
170
|
+
// `projects/{project}/locations/{location}`.
|
171
|
+
string parent = 1 [
|
172
|
+
(google.api.field_behavior) = REQUIRED,
|
173
|
+
(google.api.resource_reference) = {
|
174
|
+
type: "discoveryengine.googleapis.com/Location"
|
175
|
+
}
|
176
|
+
];
|
177
|
+
|
178
|
+
// Required. The [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]
|
179
|
+
// to create.
|
180
|
+
Evaluation evaluation = 2 [(google.api.field_behavior) = REQUIRED];
|
181
|
+
}
|
182
|
+
|
183
|
+
// Metadata for
|
184
|
+
// [EvaluationService.CreateEvaluation][google.cloud.discoveryengine.v1beta.EvaluationService.CreateEvaluation]
|
185
|
+
// method.
|
186
|
+
message CreateEvaluationMetadata {}
|
187
|
+
|
188
|
+
// Request message for
|
189
|
+
// [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults]
|
190
|
+
// method.
|
191
|
+
message ListEvaluationResultsRequest {
|
192
|
+
// Required. The evaluation resource name, such as
|
193
|
+
// `projects/{project}/locations/{location}/evaluations/{evaluation}`.
|
194
|
+
//
|
195
|
+
// If the caller does not have permission to list [EvaluationResult][]
|
196
|
+
// under this evaluation, regardless of whether or not this evaluation
|
197
|
+
// set exists, a `PERMISSION_DENIED` error is returned.
|
198
|
+
string evaluation = 1 [
|
199
|
+
(google.api.field_behavior) = REQUIRED,
|
200
|
+
(google.api.resource_reference) = {
|
201
|
+
type: "discoveryengine.googleapis.com/Evaluation"
|
202
|
+
}
|
203
|
+
];
|
204
|
+
|
205
|
+
// Maximum number of [EvaluationResult][] to return. If unspecified,
|
206
|
+
// defaults to 100. The maximum allowed value is 1000. Values above 1000 will
|
207
|
+
// be coerced to 1000.
|
208
|
+
//
|
209
|
+
// If this field is negative, an `INVALID_ARGUMENT` error is returned.
|
210
|
+
int32 page_size = 2;
|
211
|
+
|
212
|
+
// A page token
|
213
|
+
// [ListEvaluationResultsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.next_page_token],
|
214
|
+
// received from a previous
|
215
|
+
// [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults]
|
216
|
+
// call. Provide this to retrieve the subsequent page.
|
217
|
+
//
|
218
|
+
// When paginating, all other parameters provided to
|
219
|
+
// [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults]
|
220
|
+
// must match the call that provided the page token. Otherwise, an
|
221
|
+
// `INVALID_ARGUMENT` error is returned.
|
222
|
+
string page_token = 3;
|
223
|
+
}
|
224
|
+
|
225
|
+
// Response message for
|
226
|
+
// [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults]
|
227
|
+
// method.
|
228
|
+
message ListEvaluationResultsResponse {
|
229
|
+
// Represents the results of an evaluation for a single
|
230
|
+
// [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery].
|
231
|
+
message EvaluationResult {
|
232
|
+
// Output only. The
|
233
|
+
// [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] that was
|
234
|
+
// evaluated.
|
235
|
+
SampleQuery sample_query = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
236
|
+
|
237
|
+
// Output only. The metrics produced by the evaluation, for a given
|
238
|
+
// [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery].
|
239
|
+
QualityMetrics quality_metrics = 2
|
240
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
241
|
+
}
|
242
|
+
|
243
|
+
// The
|
244
|
+
// [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
|
245
|
+
repeated EvaluationResult evaluation_results = 1;
|
246
|
+
|
247
|
+
// A token that can be sent as
|
248
|
+
// [ListEvaluationResultsRequest.page_token][google.cloud.discoveryengine.v1beta.ListEvaluationResultsRequest.page_token]
|
249
|
+
// to retrieve the next page. If this field is omitted, there are no
|
250
|
+
// subsequent pages.
|
251
|
+
string next_page_token = 2;
|
252
|
+
}
|
@@ -20,6 +20,7 @@ import "google/api/field_behavior.proto";
|
|
20
20
|
import "google/api/resource.proto";
|
21
21
|
import "google/cloud/discoveryengine/v1beta/completion.proto";
|
22
22
|
import "google/cloud/discoveryengine/v1beta/document.proto";
|
23
|
+
import "google/cloud/discoveryengine/v1beta/sample_query.proto";
|
23
24
|
import "google/cloud/discoveryengine/v1beta/user_event.proto";
|
24
25
|
import "google/protobuf/field_mask.proto";
|
25
26
|
import "google/protobuf/timestamp.proto";
|
@@ -663,3 +664,85 @@ message ImportSuggestionDenyListEntriesMetadata {
|
|
663
664
|
// finish time.
|
664
665
|
google.protobuf.Timestamp update_time = 2;
|
665
666
|
}
|
667
|
+
|
668
|
+
// Request message for
|
669
|
+
// [SampleQueryService.ImportSampleQueries][google.cloud.discoveryengine.v1beta.SampleQueryService.ImportSampleQueries]
|
670
|
+
// method.
|
671
|
+
message ImportSampleQueriesRequest {
|
672
|
+
// The inline source for
|
673
|
+
// [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
|
674
|
+
message InlineSource {
|
675
|
+
// Required. A list of
|
676
|
+
// [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s to
|
677
|
+
// import. Max of 1000 items.
|
678
|
+
repeated SampleQuery sample_queries = 1
|
679
|
+
[(google.api.field_behavior) = REQUIRED];
|
680
|
+
}
|
681
|
+
|
682
|
+
// The source of the sample queries.
|
683
|
+
oneof source {
|
684
|
+
// The Inline source for sample query entries.
|
685
|
+
InlineSource inline_source = 2;
|
686
|
+
|
687
|
+
// Cloud Storage location for the input content.
|
688
|
+
GcsSource gcs_source = 3;
|
689
|
+
|
690
|
+
// BigQuery input source.
|
691
|
+
BigQuerySource bigquery_source = 4;
|
692
|
+
}
|
693
|
+
|
694
|
+
// Required. The parent sample query set resource name, such as
|
695
|
+
// `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.
|
696
|
+
//
|
697
|
+
// If the caller does not have permission to list
|
698
|
+
// [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s under this
|
699
|
+
// sample query set, regardless of whether or not this sample query set
|
700
|
+
// exists, a `PERMISSION_DENIED` error is returned.
|
701
|
+
string parent = 1 [
|
702
|
+
(google.api.field_behavior) = REQUIRED,
|
703
|
+
(google.api.resource_reference) = {
|
704
|
+
type: "discoveryengine.googleapis.com/SampleQuerySet"
|
705
|
+
}
|
706
|
+
];
|
707
|
+
|
708
|
+
// The desired location of errors incurred during the Import.
|
709
|
+
ImportErrorConfig error_config = 5;
|
710
|
+
}
|
711
|
+
|
712
|
+
// Response of the
|
713
|
+
// [SampleQueryService.ImportSampleQueries][google.cloud.discoveryengine.v1beta.SampleQueryService.ImportSampleQueries]
|
714
|
+
// method. If the long running operation is done, this message is returned by
|
715
|
+
// the google.longrunning.Operations.response field if the operation is
|
716
|
+
// successful.
|
717
|
+
message ImportSampleQueriesResponse {
|
718
|
+
// A sample of errors encountered while processing the request.
|
719
|
+
repeated google.rpc.Status error_samples = 1;
|
720
|
+
|
721
|
+
// The desired location of errors incurred during the Import.
|
722
|
+
ImportErrorConfig error_config = 2;
|
723
|
+
}
|
724
|
+
|
725
|
+
// Metadata related to the progress of the ImportSampleQueries
|
726
|
+
// operation. This will be returned by the google.longrunning.Operation.metadata
|
727
|
+
// field.
|
728
|
+
message ImportSampleQueriesMetadata {
|
729
|
+
// ImportSampleQueries operation create time.
|
730
|
+
google.protobuf.Timestamp create_time = 1;
|
731
|
+
|
732
|
+
// ImportSampleQueries operation last update time. If the operation is done,
|
733
|
+
// this is also the finish time.
|
734
|
+
google.protobuf.Timestamp update_time = 2;
|
735
|
+
|
736
|
+
// Count of [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s
|
737
|
+
// successfully imported.
|
738
|
+
int64 success_count = 3;
|
739
|
+
|
740
|
+
// Count of [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s
|
741
|
+
// that failed to be imported.
|
742
|
+
int64 failure_count = 4;
|
743
|
+
|
744
|
+
// Total count of
|
745
|
+
// [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s that were
|
746
|
+
// processed.
|
747
|
+
int64 total_count = 5;
|
748
|
+
}
|
@@ -0,0 +1,86 @@
|
|
1
|
+
// Copyright 2024 Google LLC
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
|
15
|
+
syntax = "proto3";
|
16
|
+
|
17
|
+
package google.cloud.discoveryengine.v1beta;
|
18
|
+
|
19
|
+
import "google/api/field_behavior.proto";
|
20
|
+
import "google/api/resource.proto";
|
21
|
+
import "google/protobuf/timestamp.proto";
|
22
|
+
|
23
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
|
24
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb";
|
25
|
+
option java_multiple_files = true;
|
26
|
+
option java_outer_classname = "SampleQueryProto";
|
27
|
+
option java_package = "com.google.cloud.discoveryengine.v1beta";
|
28
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
29
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
|
30
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
|
31
|
+
|
32
|
+
// Sample Query captures metadata to be used for evaluation.
|
33
|
+
message SampleQuery {
|
34
|
+
option (google.api.resource) = {
|
35
|
+
type: "discoveryengine.googleapis.com/SampleQuery"
|
36
|
+
pattern: "projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}"
|
37
|
+
};
|
38
|
+
|
39
|
+
// Query Entry captures metadata to be used for search evaluation.
|
40
|
+
message QueryEntry {
|
41
|
+
// Defines the parameters of the query's expected outcome.
|
42
|
+
message Target {
|
43
|
+
// Expected uri of the target.
|
44
|
+
//
|
45
|
+
// This field must be a UTF-8 encoded string with a length limit of 2048
|
46
|
+
// characters.
|
47
|
+
//
|
48
|
+
// Example of valid uris: `https://example.com/abc`,
|
49
|
+
// `gcs://example/example.pdf`.
|
50
|
+
string uri = 1;
|
51
|
+
|
52
|
+
// Expected page numbers of the target.
|
53
|
+
//
|
54
|
+
// Each page number must be non negative.
|
55
|
+
repeated int32 page_numbers = 2;
|
56
|
+
|
57
|
+
// Relevance score of the target.
|
58
|
+
optional double score = 3;
|
59
|
+
}
|
60
|
+
|
61
|
+
// Required. The query.
|
62
|
+
string query = 1 [(google.api.field_behavior) = REQUIRED];
|
63
|
+
|
64
|
+
// List of targets for the query.
|
65
|
+
repeated Target targets = 3;
|
66
|
+
}
|
67
|
+
|
68
|
+
// The content of the sample query.
|
69
|
+
oneof content {
|
70
|
+
// The query entry.
|
71
|
+
QueryEntry query_entry = 2;
|
72
|
+
}
|
73
|
+
|
74
|
+
// Identifier. The full resource name of the sample query, in the format of
|
75
|
+
// `projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}`.
|
76
|
+
//
|
77
|
+
// This field must be a UTF-8 encoded string with a length limit of 1024
|
78
|
+
// characters.
|
79
|
+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
|
80
|
+
|
81
|
+
// Output only. Timestamp the
|
82
|
+
// [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] was created
|
83
|
+
// at.
|
84
|
+
google.protobuf.Timestamp create_time = 3
|
85
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
86
|
+
}
|