google-cloud-ces-v1beta 0.a → 0.1.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.
Files changed (157) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +154 -8
  5. data/lib/google/cloud/ces/v1beta/agent_pb.rb +30 -0
  6. data/lib/google/cloud/ces/v1beta/agent_service/client.rb +5635 -0
  7. data/lib/google/cloud/ces/v1beta/agent_service/credentials.rb +48 -0
  8. data/lib/google/cloud/ces/v1beta/agent_service/operations.rb +841 -0
  9. data/lib/google/cloud/ces/v1beta/agent_service/paths.rb +481 -0
  10. data/lib/google/cloud/ces/v1beta/agent_service/rest/client.rb +5243 -0
  11. data/lib/google/cloud/ces/v1beta/agent_service/rest/operations.rb +925 -0
  12. data/lib/google/cloud/ces/v1beta/agent_service/rest/service_stub.rb +3213 -0
  13. data/lib/google/cloud/ces/v1beta/agent_service/rest.rb +55 -0
  14. data/lib/google/cloud/ces/v1beta/agent_service.rb +57 -0
  15. data/lib/google/cloud/ces/v1beta/agent_service_pb.rb +131 -0
  16. data/lib/google/cloud/ces/v1beta/agent_service_services_pb.rb +148 -0
  17. data/lib/google/cloud/ces/v1beta/agent_tool_pb.rb +24 -0
  18. data/lib/google/cloud/ces/v1beta/agent_transfers_pb.rb +29 -0
  19. data/lib/google/cloud/ces/v1beta/app_pb.rb +67 -0
  20. data/lib/google/cloud/ces/v1beta/app_version_pb.rb +32 -0
  21. data/lib/google/cloud/ces/v1beta/auth_pb.rb +34 -0
  22. data/lib/google/cloud/ces/v1beta/bigquery_export_pb.rb +23 -0
  23. data/lib/google/cloud/ces/v1beta/bindings_override.rb +75 -0
  24. data/lib/google/cloud/ces/v1beta/changelog_pb.rb +26 -0
  25. data/lib/google/cloud/ces/v1beta/client_function_pb.rb +24 -0
  26. data/lib/google/cloud/ces/v1beta/common_pb.rb +46 -0
  27. data/lib/google/cloud/ces/v1beta/connector_tool_pb.rb +27 -0
  28. data/lib/google/cloud/ces/v1beta/connector_toolset_pb.rb +25 -0
  29. data/lib/google/cloud/ces/v1beta/conversation_pb.rb +31 -0
  30. data/lib/google/cloud/ces/v1beta/data_store_pb.rb +27 -0
  31. data/lib/google/cloud/ces/v1beta/data_store_tool_pb.rb +40 -0
  32. data/lib/google/cloud/ces/v1beta/deployment_pb.rb +26 -0
  33. data/lib/google/cloud/ces/v1beta/evaluation_pb.rb +98 -0
  34. data/lib/google/cloud/ces/v1beta/evaluation_service/client.rb +3732 -0
  35. data/lib/google/cloud/ces/v1beta/evaluation_service/credentials.rb +48 -0
  36. data/lib/google/cloud/ces/v1beta/evaluation_service/operations.rb +841 -0
  37. data/lib/google/cloud/ces/v1beta/evaluation_service/paths.rb +306 -0
  38. data/lib/google/cloud/ces/v1beta/evaluation_service/rest/client.rb +3473 -0
  39. data/lib/google/cloud/ces/v1beta/evaluation_service/rest/operations.rb +925 -0
  40. data/lib/google/cloud/ces/v1beta/evaluation_service/rest/service_stub.rb +2047 -0
  41. data/lib/google/cloud/ces/v1beta/evaluation_service/rest.rb +54 -0
  42. data/lib/google/cloud/ces/v1beta/evaluation_service.rb +56 -0
  43. data/lib/google/cloud/ces/v1beta/evaluation_service_pb.rb +86 -0
  44. data/lib/google/cloud/ces/v1beta/evaluation_service_services_pb.rb +110 -0
  45. data/lib/google/cloud/ces/v1beta/example_pb.rb +34 -0
  46. data/lib/google/cloud/ces/v1beta/fakes_pb.rb +25 -0
  47. data/lib/google/cloud/ces/v1beta/file_context_pb.rb +24 -0
  48. data/lib/google/cloud/ces/v1beta/file_search_tool_pb.rb +24 -0
  49. data/lib/google/cloud/ces/v1beta/golden_run_pb.rb +21 -0
  50. data/lib/google/cloud/ces/v1beta/google_search_tool_pb.rb +24 -0
  51. data/lib/google/cloud/ces/v1beta/guardrail_pb.rb +37 -0
  52. data/lib/google/cloud/ces/v1beta/mcp_tool_pb.rb +26 -0
  53. data/lib/google/cloud/ces/v1beta/mcp_toolset_pb.rb +25 -0
  54. data/lib/google/cloud/ces/v1beta/mocks_pb.rb +26 -0
  55. data/lib/google/cloud/ces/v1beta/omnichannel_pb.rb +31 -0
  56. data/lib/google/cloud/ces/v1beta/omnichannel_service_pb.rb +27 -0
  57. data/lib/google/cloud/ces/v1beta/open_api_tool_pb.rb +25 -0
  58. data/lib/google/cloud/ces/v1beta/open_api_toolset_pb.rb +25 -0
  59. data/lib/google/cloud/ces/v1beta/python_function_pb.rb +23 -0
  60. data/lib/google/cloud/ces/v1beta/rest.rb +42 -0
  61. data/lib/google/cloud/ces/v1beta/schema_pb.rb +25 -0
  62. data/lib/google/cloud/ces/v1beta/search_suggestions_pb.rb +22 -0
  63. data/lib/google/cloud/ces/v1beta/security_settings_pb.rb +27 -0
  64. data/lib/google/cloud/ces/v1beta/session_service/client.rb +760 -0
  65. data/lib/google/cloud/ces/v1beta/session_service/credentials.rb +48 -0
  66. data/lib/google/cloud/ces/v1beta/session_service/paths.rb +117 -0
  67. data/lib/google/cloud/ces/v1beta/session_service/rest/client.rb +560 -0
  68. data/lib/google/cloud/ces/v1beta/session_service/rest/service_stub.rb +199 -0
  69. data/lib/google/cloud/ces/v1beta/session_service/rest.rb +53 -0
  70. data/lib/google/cloud/ces/v1beta/session_service.rb +55 -0
  71. data/lib/google/cloud/ces/v1beta/session_service_pb.rb +53 -0
  72. data/lib/google/cloud/ces/v1beta/session_service_services_pb.rb +120 -0
  73. data/lib/google/cloud/ces/v1beta/system_tool_pb.rb +23 -0
  74. data/lib/google/cloud/ces/v1beta/tool_pb.rb +38 -0
  75. data/lib/google/cloud/ces/v1beta/tool_service/client.rb +727 -0
  76. data/lib/google/cloud/ces/v1beta/tool_service/credentials.rb +48 -0
  77. data/lib/google/cloud/ces/v1beta/tool_service/paths.rb +94 -0
  78. data/lib/google/cloud/ces/v1beta/tool_service/rest/client.rb +671 -0
  79. data/lib/google/cloud/ces/v1beta/tool_service/rest/service_stub.rb +267 -0
  80. data/lib/google/cloud/ces/v1beta/tool_service/rest.rb +53 -0
  81. data/lib/google/cloud/ces/v1beta/tool_service.rb +55 -0
  82. data/lib/google/cloud/ces/v1beta/tool_service_pb.rb +36 -0
  83. data/lib/google/cloud/ces/v1beta/tool_service_services_pb.rb +50 -0
  84. data/lib/google/cloud/ces/v1beta/toolset_pb.rb +30 -0
  85. data/lib/google/cloud/ces/v1beta/toolset_tool_pb.rb +24 -0
  86. data/lib/google/cloud/ces/v1beta/version.rb +7 -2
  87. data/lib/google/cloud/ces/v1beta/widget_service/client.rb +501 -0
  88. data/lib/google/cloud/ces/v1beta/widget_service/credentials.rb +48 -0
  89. data/lib/google/cloud/ces/v1beta/widget_service/paths.rb +75 -0
  90. data/lib/google/cloud/ces/v1beta/widget_service/rest/client.rb +459 -0
  91. data/lib/google/cloud/ces/v1beta/widget_service/rest/service_stub.rb +143 -0
  92. data/lib/google/cloud/ces/v1beta/widget_service/rest.rb +53 -0
  93. data/lib/google/cloud/ces/v1beta/widget_service.rb +55 -0
  94. data/lib/google/cloud/ces/v1beta/widget_service_pb.rb +28 -0
  95. data/lib/google/cloud/ces/v1beta/widget_service_services_pb.rb +46 -0
  96. data/lib/google/cloud/ces/v1beta/widget_tool_pb.rb +29 -0
  97. data/lib/google/cloud/ces/v1beta.rb +49 -0
  98. data/lib/google-cloud-ces-v1beta.rb +21 -0
  99. data/proto_docs/README.md +4 -0
  100. data/proto_docs/google/api/client.rb +593 -0
  101. data/proto_docs/google/api/field_behavior.rb +85 -0
  102. data/proto_docs/google/api/launch_stage.rb +71 -0
  103. data/proto_docs/google/api/resource.rb +227 -0
  104. data/proto_docs/google/cloud/ces/v1beta/agent.rb +224 -0
  105. data/proto_docs/google/cloud/ces/v1beta/agent_service.rb +1661 -0
  106. data/proto_docs/google/cloud/ces/v1beta/agent_tool.rb +48 -0
  107. data/proto_docs/google/cloud/ces/v1beta/agent_transfers.rb +111 -0
  108. data/proto_docs/google/cloud/ces/v1beta/app.rb +836 -0
  109. data/proto_docs/google/cloud/ces/v1beta/app_version.rb +83 -0
  110. data/proto_docs/google/cloud/ces/v1beta/auth.rb +214 -0
  111. data/proto_docs/google/cloud/ces/v1beta/bigquery_export.rb +45 -0
  112. data/proto_docs/google/cloud/ces/v1beta/changelog.rb +73 -0
  113. data/proto_docs/google/cloud/ces/v1beta/client_function.rb +48 -0
  114. data/proto_docs/google/cloud/ces/v1beta/common.rb +375 -0
  115. data/proto_docs/google/cloud/ces/v1beta/connector_tool.rb +122 -0
  116. data/proto_docs/google/cloud/ces/v1beta/connector_toolset.rb +52 -0
  117. data/proto_docs/google/cloud/ces/v1beta/conversation.rb +156 -0
  118. data/proto_docs/google/cloud/ces/v1beta/data_store.rb +102 -0
  119. data/proto_docs/google/cloud/ces/v1beta/data_store_tool.rb +328 -0
  120. data/proto_docs/google/cloud/ces/v1beta/deployment.rb +62 -0
  121. data/proto_docs/google/cloud/ces/v1beta/evaluation.rb +1618 -0
  122. data/proto_docs/google/cloud/ces/v1beta/evaluation_service.rb +1009 -0
  123. data/proto_docs/google/cloud/ces/v1beta/example.rb +245 -0
  124. data/proto_docs/google/cloud/ces/v1beta/fakes.rb +67 -0
  125. data/proto_docs/google/cloud/ces/v1beta/file_context.rb +50 -0
  126. data/proto_docs/google/cloud/ces/v1beta/file_search_tool.rb +60 -0
  127. data/proto_docs/google/cloud/ces/v1beta/golden_run.rb +40 -0
  128. data/proto_docs/google/cloud/ces/v1beta/google_search_tool.rb +76 -0
  129. data/proto_docs/google/cloud/ces/v1beta/guardrail.rb +324 -0
  130. data/proto_docs/google/cloud/ces/v1beta/mcp_tool.rb +85 -0
  131. data/proto_docs/google/cloud/ces/v1beta/mcp_toolset.rb +71 -0
  132. data/proto_docs/google/cloud/ces/v1beta/mocks.rb +60 -0
  133. data/proto_docs/google/cloud/ces/v1beta/omnichannel.rb +163 -0
  134. data/proto_docs/google/cloud/ces/v1beta/omnichannel_service.rb +45 -0
  135. data/proto_docs/google/cloud/ces/v1beta/open_api_tool.rb +66 -0
  136. data/proto_docs/google/cloud/ces/v1beta/open_api_toolset.rb +57 -0
  137. data/proto_docs/google/cloud/ces/v1beta/python_function.rb +44 -0
  138. data/proto_docs/google/cloud/ces/v1beta/schema.rb +162 -0
  139. data/proto_docs/google/cloud/ces/v1beta/search_suggestions.rb +55 -0
  140. data/proto_docs/google/cloud/ces/v1beta/security_settings.rb +80 -0
  141. data/proto_docs/google/cloud/ces/v1beta/session_service.rb +490 -0
  142. data/proto_docs/google/cloud/ces/v1beta/system_tool.rb +38 -0
  143. data/proto_docs/google/cloud/ces/v1beta/tool.rb +126 -0
  144. data/proto_docs/google/cloud/ces/v1beta/tool_service.rb +173 -0
  145. data/proto_docs/google/cloud/ces/v1beta/toolset.rb +80 -0
  146. data/proto_docs/google/cloud/ces/v1beta/toolset_tool.rb +40 -0
  147. data/proto_docs/google/cloud/ces/v1beta/widget_service.rb +62 -0
  148. data/proto_docs/google/cloud/ces/v1beta/widget_tool.rb +146 -0
  149. data/proto_docs/google/longrunning/operations.rb +191 -0
  150. data/proto_docs/google/protobuf/any.rb +145 -0
  151. data/proto_docs/google/protobuf/duration.rb +98 -0
  152. data/proto_docs/google/protobuf/empty.rb +34 -0
  153. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  154. data/proto_docs/google/protobuf/struct.rb +108 -0
  155. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  156. data/proto_docs/google/rpc/status.rb +48 -0
  157. metadata +204 -9
@@ -0,0 +1,1618 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Ces
23
+ module V1beta
24
+ # Aggregated metrics for an evaluation or evaluation dataset.
25
+ # @!attribute [r] metrics_by_app_version
26
+ # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::MetricsByAppVersion>]
27
+ # Output only. Aggregated metrics, grouped by app version ID.
28
+ class AggregatedMetrics
29
+ include ::Google::Protobuf::MessageExts
30
+ extend ::Google::Protobuf::MessageExts::ClassMethods
31
+
32
+ # Metrics for a single tool.
33
+ # @!attribute [r] tool
34
+ # @return [::String]
35
+ # Output only. The name of the tool.
36
+ # @!attribute [r] pass_count
37
+ # @return [::Integer]
38
+ # Output only. The number of times the tool passed.
39
+ # @!attribute [r] fail_count
40
+ # @return [::Integer]
41
+ # Output only. The number of times the tool failed.
42
+ class ToolMetrics
43
+ include ::Google::Protobuf::MessageExts
44
+ extend ::Google::Protobuf::MessageExts::ClassMethods
45
+ end
46
+
47
+ # Metrics for turn latency.
48
+ # @!attribute [r] average_latency
49
+ # @return [::Google::Protobuf::Duration]
50
+ # Output only. The average latency of the turns.
51
+ class TurnLatencyMetrics
52
+ include ::Google::Protobuf::MessageExts
53
+ extend ::Google::Protobuf::MessageExts::ClassMethods
54
+ end
55
+
56
+ # Metrics for tool call latency.
57
+ # @!attribute [r] tool
58
+ # @return [::String]
59
+ # Output only. The name of the tool.
60
+ # @!attribute [r] average_latency
61
+ # @return [::Google::Protobuf::Duration]
62
+ # Output only. The average latency of the tool calls.
63
+ class ToolCallLatencyMetrics
64
+ include ::Google::Protobuf::MessageExts
65
+ extend ::Google::Protobuf::MessageExts::ClassMethods
66
+ end
67
+
68
+ # Metrics for semantic similarity results.
69
+ # @!attribute [r] score
70
+ # @return [::Float]
71
+ # Output only. The average semantic similarity score (0-4).
72
+ class SemanticSimilarityMetrics
73
+ include ::Google::Protobuf::MessageExts
74
+ extend ::Google::Protobuf::MessageExts::ClassMethods
75
+ end
76
+
77
+ # Metrics for hallucination results.
78
+ # @!attribute [r] score
79
+ # @return [::Float]
80
+ # Output only. The average hallucination score (0 to 1).
81
+ class HallucinationMetrics
82
+ include ::Google::Protobuf::MessageExts
83
+ extend ::Google::Protobuf::MessageExts::ClassMethods
84
+ end
85
+
86
+ # Metrics aggregated per app version.
87
+ # @!attribute [r] app_version_id
88
+ # @return [::String]
89
+ # Output only. The app version ID.
90
+ # @!attribute [r] tool_metrics
91
+ # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::ToolMetrics>]
92
+ # Output only. Metrics for each tool within this app version.
93
+ # @!attribute [r] semantic_similarity_metrics
94
+ # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::SemanticSimilarityMetrics>]
95
+ # Output only. Metrics for semantic similarity within this app version.
96
+ # @!attribute [r] hallucination_metrics
97
+ # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::HallucinationMetrics>]
98
+ # Output only. Metrics for hallucination within this app version.
99
+ # @!attribute [r] tool_call_latency_metrics
100
+ # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::ToolCallLatencyMetrics>]
101
+ # Output only. Metrics for tool call latency within this app version.
102
+ # @!attribute [r] turn_latency_metrics
103
+ # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::TurnLatencyMetrics>]
104
+ # Output only. Metrics for turn latency within this app version.
105
+ # @!attribute [r] pass_count
106
+ # @return [::Integer]
107
+ # Output only. The number of times the evaluation passed.
108
+ # @!attribute [r] fail_count
109
+ # @return [::Integer]
110
+ # Output only. The number of times the evaluation failed.
111
+ # @!attribute [r] metrics_by_turn
112
+ # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::MetricsByTurn>]
113
+ # Output only. Metrics aggregated per turn within this app version.
114
+ class MetricsByAppVersion
115
+ include ::Google::Protobuf::MessageExts
116
+ extend ::Google::Protobuf::MessageExts::ClassMethods
117
+ end
118
+
119
+ # Metrics aggregated per turn.
120
+ # @!attribute [r] turn_index
121
+ # @return [::Integer]
122
+ # Output only. The turn index (0-based).
123
+ # @!attribute [r] tool_metrics
124
+ # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::ToolMetrics>]
125
+ # Output only. Metrics for each tool within this turn.
126
+ # @!attribute [r] semantic_similarity_metrics
127
+ # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::SemanticSimilarityMetrics>]
128
+ # Output only. Metrics for semantic similarity within this turn.
129
+ # @!attribute [r] hallucination_metrics
130
+ # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::HallucinationMetrics>]
131
+ # Output only. Metrics for hallucination within this turn.
132
+ # @!attribute [r] tool_call_latency_metrics
133
+ # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::ToolCallLatencyMetrics>]
134
+ # Output only. Metrics for tool call latency within this turn.
135
+ # @!attribute [r] turn_latency_metrics
136
+ # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::TurnLatencyMetrics>]
137
+ # Output only. Metrics for turn latency within this turn.
138
+ class MetricsByTurn
139
+ include ::Google::Protobuf::MessageExts
140
+ extend ::Google::Protobuf::MessageExts::ClassMethods
141
+ end
142
+ end
143
+
144
+ # An evaluation represents all of the information needed to simulate and
145
+ # evaluate an agent.
146
+ # @!attribute [rw] golden
147
+ # @return [::Google::Cloud::Ces::V1beta::Evaluation::Golden]
148
+ # Optional. The golden steps to be evaluated.
149
+ #
150
+ # Note: The following fields are mutually exclusive: `golden`, `scenario`. If a field in that set is populated, all other fields in the set will automatically be cleared.
151
+ # @!attribute [rw] scenario
152
+ # @return [::Google::Cloud::Ces::V1beta::Evaluation::Scenario]
153
+ # Optional. The config for a scenario.
154
+ #
155
+ # Note: The following fields are mutually exclusive: `scenario`, `golden`. If a field in that set is populated, all other fields in the set will automatically be cleared.
156
+ # @!attribute [rw] name
157
+ # @return [::String]
158
+ # Identifier. The unique identifier of this evaluation.
159
+ # Format:
160
+ # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}`
161
+ # @!attribute [rw] display_name
162
+ # @return [::String]
163
+ # Required. User-defined display name of the evaluation. Unique within an
164
+ # App.
165
+ # @!attribute [rw] description
166
+ # @return [::String]
167
+ # Optional. User-defined description of the evaluation.
168
+ # @!attribute [rw] tags
169
+ # @return [::Array<::String>]
170
+ # Optional. User defined tags to categorize the evaluation.
171
+ # @!attribute [r] evaluation_datasets
172
+ # @return [::Array<::String>]
173
+ # Output only. List of evaluation datasets the evaluation belongs to.
174
+ # Format:
175
+ # `projects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluationDataset}`
176
+ # @!attribute [r] create_time
177
+ # @return [::Google::Protobuf::Timestamp]
178
+ # Output only. Timestamp when the evaluation was created.
179
+ # @!attribute [r] created_by
180
+ # @return [::String]
181
+ # Output only. The user who created the evaluation.
182
+ # @!attribute [r] update_time
183
+ # @return [::Google::Protobuf::Timestamp]
184
+ # Output only. Timestamp when the evaluation was last updated.
185
+ # @!attribute [r] last_updated_by
186
+ # @return [::String]
187
+ # Output only. The user who last updated the evaluation.
188
+ # @!attribute [r] evaluation_runs
189
+ # @return [::Array<::String>]
190
+ # Output only. The EvaluationRuns that this Evaluation is associated with.
191
+ # @!attribute [r] etag
192
+ # @return [::String]
193
+ # Output only. Etag used to ensure the object hasn't changed during a
194
+ # read-modify-write operation. If the etag is empty, the update will
195
+ # overwrite any concurrent changes.
196
+ # @!attribute [r] aggregated_metrics
197
+ # @return [::Google::Cloud::Ces::V1beta::AggregatedMetrics]
198
+ # Output only. The aggregated metrics for this evaluation across all runs.
199
+ # @!attribute [r] last_completed_result
200
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationResult]
201
+ # Output only. The latest evaluation result for this evaluation.
202
+ # @!attribute [r] invalid
203
+ # @return [::Boolean]
204
+ # Output only. Whether the evaluation is invalid. This can happen if an
205
+ # evaluation is referencing a tool, toolset, or agent that has since been
206
+ # deleted.
207
+ # @!attribute [r] last_ten_results
208
+ # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult>]
209
+ # Output only. The last 10 evaluation results for this evaluation. This is
210
+ # only populated if include_last_ten_results is set to true in the
211
+ # ListEvaluationsRequest or GetEvaluationRequest.
212
+ class Evaluation
213
+ include ::Google::Protobuf::MessageExts
214
+ extend ::Google::Protobuf::MessageExts::ClassMethods
215
+
216
+ # Represents a single, checkable requirement.
217
+ # @!attribute [rw] tool_call
218
+ # @return [::Google::Cloud::Ces::V1beta::ToolCall]
219
+ # Optional. Check that a specific tool was called with the parameters.
220
+ #
221
+ # Note: The following fields are mutually exclusive: `tool_call`, `tool_response`, `agent_response`, `agent_transfer`, `updated_variables`, `mock_tool_response`. If a field in that set is populated, all other fields in the set will automatically be cleared.
222
+ # @!attribute [rw] tool_response
223
+ # @return [::Google::Cloud::Ces::V1beta::ToolResponse]
224
+ # Optional. Check that a specific tool had the expected response.
225
+ #
226
+ # Note: The following fields are mutually exclusive: `tool_response`, `tool_call`, `agent_response`, `agent_transfer`, `updated_variables`, `mock_tool_response`. If a field in that set is populated, all other fields in the set will automatically be cleared.
227
+ # @!attribute [rw] agent_response
228
+ # @return [::Google::Cloud::Ces::V1beta::Message]
229
+ # Optional. Check that the agent responded with the correct response. The
230
+ # role "agent" is implied.
231
+ #
232
+ # Note: The following fields are mutually exclusive: `agent_response`, `tool_call`, `tool_response`, `agent_transfer`, `updated_variables`, `mock_tool_response`. If a field in that set is populated, all other fields in the set will automatically be cleared.
233
+ # @!attribute [rw] agent_transfer
234
+ # @return [::Google::Cloud::Ces::V1beta::AgentTransfer]
235
+ # Optional. Check that the agent transferred the conversation to a
236
+ # different agent.
237
+ #
238
+ # Note: The following fields are mutually exclusive: `agent_transfer`, `tool_call`, `tool_response`, `agent_response`, `updated_variables`, `mock_tool_response`. If a field in that set is populated, all other fields in the set will automatically be cleared.
239
+ # @!attribute [rw] updated_variables
240
+ # @return [::Google::Protobuf::Struct]
241
+ # Optional. Check that the agent updated the session variables to the
242
+ # expected values. Used to also capture agent variable updates for golden
243
+ # evals.
244
+ #
245
+ # Note: The following fields are mutually exclusive: `updated_variables`, `tool_call`, `tool_response`, `agent_response`, `agent_transfer`, `mock_tool_response`. If a field in that set is populated, all other fields in the set will automatically be cleared.
246
+ # @!attribute [rw] mock_tool_response
247
+ # @return [::Google::Cloud::Ces::V1beta::ToolResponse]
248
+ # Optional. The tool response to mock, with the parameters of interest
249
+ # specified. Any parameters not specified will be hallucinated by the
250
+ # LLM.
251
+ #
252
+ # Note: The following fields are mutually exclusive: `mock_tool_response`, `tool_call`, `tool_response`, `agent_response`, `agent_transfer`, `updated_variables`. If a field in that set is populated, all other fields in the set will automatically be cleared.
253
+ # @!attribute [rw] note
254
+ # @return [::String]
255
+ # Optional. A note for this requirement, useful in reporting when specific
256
+ # checks fail. E.g., "Check_Payment_Tool_Called".
257
+ class GoldenExpectation
258
+ include ::Google::Protobuf::MessageExts
259
+ extend ::Google::Protobuf::MessageExts::ClassMethods
260
+ end
261
+
262
+ # A step defines a singular action to happen during the evaluation.
263
+ # @!attribute [rw] user_input
264
+ # @return [::Google::Cloud::Ces::V1beta::SessionInput]
265
+ # Optional. User input for the conversation.
266
+ #
267
+ # Note: The following fields are mutually exclusive: `user_input`, `agent_transfer`, `expectation`. If a field in that set is populated, all other fields in the set will automatically be cleared.
268
+ # @!attribute [rw] agent_transfer
269
+ # @return [::Google::Cloud::Ces::V1beta::AgentTransfer]
270
+ # Optional. Transfer the conversation to a different agent.
271
+ #
272
+ # Note: The following fields are mutually exclusive: `agent_transfer`, `user_input`, `expectation`. If a field in that set is populated, all other fields in the set will automatically be cleared.
273
+ # @!attribute [rw] expectation
274
+ # @return [::Google::Cloud::Ces::V1beta::Evaluation::GoldenExpectation]
275
+ # Optional. Executes an expectation on the current turn.
276
+ #
277
+ # Note: The following fields are mutually exclusive: `expectation`, `user_input`, `agent_transfer`. If a field in that set is populated, all other fields in the set will automatically be cleared.
278
+ class Step
279
+ include ::Google::Protobuf::MessageExts
280
+ extend ::Google::Protobuf::MessageExts::ClassMethods
281
+ end
282
+
283
+ # A golden turn defines a single turn in a golden conversation.
284
+ # @!attribute [rw] steps
285
+ # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation::Step>]
286
+ # Required. The steps required to replay a golden conversation.
287
+ # @!attribute [rw] root_span
288
+ # @return [::Google::Cloud::Ces::V1beta::Span]
289
+ # Optional. The root span of the golden turn for processing and maintaining
290
+ # audio information.
291
+ class GoldenTurn
292
+ include ::Google::Protobuf::MessageExts
293
+ extend ::Google::Protobuf::MessageExts::ClassMethods
294
+ end
295
+
296
+ # The steps required to replay a golden conversation.
297
+ # @!attribute [rw] turns
298
+ # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation::GoldenTurn>]
299
+ # Required. The golden turns required to replay a golden conversation.
300
+ # @!attribute [rw] evaluation_expectations
301
+ # @return [::Array<::String>]
302
+ # Optional. The evaluation expectations to evaluate the replayed
303
+ # conversation against. Format:
304
+ # `projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluationExpectation}`
305
+ class Golden
306
+ include ::Google::Protobuf::MessageExts
307
+ extend ::Google::Protobuf::MessageExts::ClassMethods
308
+ end
309
+
310
+ # The expectation to evaluate the conversation produced by the simulation.
311
+ # @!attribute [rw] tool_expectation
312
+ # @return [::Google::Cloud::Ces::V1beta::Evaluation::ScenarioExpectation::ToolExpectation]
313
+ # Optional. The tool call and response pair to be evaluated.
314
+ #
315
+ # Note: The following fields are mutually exclusive: `tool_expectation`, `agent_response`. If a field in that set is populated, all other fields in the set will automatically be cleared.
316
+ # @!attribute [rw] agent_response
317
+ # @return [::Google::Cloud::Ces::V1beta::Message]
318
+ # Optional. The agent response to be evaluated.
319
+ #
320
+ # Note: The following fields are mutually exclusive: `agent_response`, `tool_expectation`. If a field in that set is populated, all other fields in the set will automatically be cleared.
321
+ class ScenarioExpectation
322
+ include ::Google::Protobuf::MessageExts
323
+ extend ::Google::Protobuf::MessageExts::ClassMethods
324
+
325
+ # The tool call and response pair to be evaluated.
326
+ # @!attribute [rw] expected_tool_call
327
+ # @return [::Google::Cloud::Ces::V1beta::ToolCall]
328
+ # Required. The expected tool call, with the parameters of interest
329
+ # specified. Any parameters not specified will be hallucinated by the
330
+ # LLM.
331
+ # @!attribute [rw] mock_tool_response
332
+ # @return [::Google::Cloud::Ces::V1beta::ToolResponse]
333
+ # Required. The tool response to mock, with the parameters of interest
334
+ # specified. Any parameters not specified will be hallucinated by the
335
+ # LLM.
336
+ class ToolExpectation
337
+ include ::Google::Protobuf::MessageExts
338
+ extend ::Google::Protobuf::MessageExts::ClassMethods
339
+ end
340
+ end
341
+
342
+ # The config for a scenario
343
+ # @!attribute [rw] task
344
+ # @return [::String]
345
+ # Required. The task to be targeted by the scenario.
346
+ # @!attribute [rw] user_facts
347
+ # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation::Scenario::UserFact>]
348
+ # Optional. The user facts to be used by the scenario.
349
+ # @!attribute [rw] max_turns
350
+ # @return [::Integer]
351
+ # Optional. The maximum number of turns to simulate. If not specified, the
352
+ # simulation will continue until the task is complete.
353
+ # @!attribute [rw] rubrics
354
+ # @return [::Array<::String>]
355
+ # Required. The rubrics to score the scenario against.
356
+ # @!attribute [rw] scenario_expectations
357
+ # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation::ScenarioExpectation>]
358
+ # Required. The ScenarioExpectations to evaluate the conversation produced
359
+ # by the user simulation.
360
+ # @!attribute [rw] variable_overrides
361
+ # @return [::Google::Protobuf::Struct]
362
+ # Optional. Variables / Session Parameters as context for the session,
363
+ # keyed by variable names. Members of this struct will override any default
364
+ # values set by the system.
365
+ #
366
+ # Note, these are different from user facts, which are facts known to the
367
+ # user. Variables are parameters known to the agent: i.e. MDN (phone
368
+ # number) passed by the telephony system.
369
+ # @!attribute [rw] task_completion_behavior
370
+ # @deprecated This field is deprecated and may be removed in the next major version update.
371
+ # @return [::Google::Cloud::Ces::V1beta::Evaluation::Scenario::TaskCompletionBehavior]
372
+ # Optional. Deprecated. Use user_goal_behavior instead.
373
+ # @!attribute [rw] user_goal_behavior
374
+ # @return [::Google::Cloud::Ces::V1beta::Evaluation::Scenario::UserGoalBehavior]
375
+ # Optional. The expected behavior of the user goal.
376
+ # @!attribute [rw] evaluation_expectations
377
+ # @return [::Array<::String>]
378
+ # Optional. The evaluation expectations to evaluate the conversation
379
+ # produced by the simulation against. Format:
380
+ # `projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluationExpectation}`
381
+ class Scenario
382
+ include ::Google::Protobuf::MessageExts
383
+ extend ::Google::Protobuf::MessageExts::ClassMethods
384
+
385
+ # Facts about the user as a key value pair.
386
+ # @!attribute [rw] name
387
+ # @return [::String]
388
+ # Required. The name of the user fact.
389
+ # @!attribute [rw] value
390
+ # @return [::String]
391
+ # Required. The value of the user fact.
392
+ class UserFact
393
+ include ::Google::Protobuf::MessageExts
394
+ extend ::Google::Protobuf::MessageExts::ClassMethods
395
+ end
396
+
397
+ # The expected behavior of the user task. This is used to determine whether
398
+ # the scenario is successful.
399
+ module TaskCompletionBehavior
400
+ # Behavior unspecified. Will default to TASK_SATISFIED.
401
+ TASK_COMPLETION_BEHAVIOR_UNSPECIFIED = 0
402
+
403
+ # The user task should be completed successfully.
404
+ TASK_SATISFIED = 1
405
+
406
+ # The user task should be rejected.
407
+ TASK_REJECTED = 2
408
+ end
409
+
410
+ # The expected behavior of the user goal. This is used to determine whether
411
+ # the scenario is successful.
412
+ module UserGoalBehavior
413
+ # Behavior unspecified. Will default to USER_GOAL_SATISFIED.
414
+ USER_GOAL_BEHAVIOR_UNSPECIFIED = 0
415
+
416
+ # The user goal should be completed successfully.
417
+ USER_GOAL_SATISFIED = 1
418
+
419
+ # The user goal should be rejected.
420
+ USER_GOAL_REJECTED = 2
421
+
422
+ # Ignore the user goal status.
423
+ USER_GOAL_IGNORED = 3
424
+ end
425
+ end
426
+ end
427
+
428
+ # An evaluation dataset represents a set of evaluations that are grouped
429
+ # together basaed on shared tags.
430
+ # @!attribute [rw] name
431
+ # @return [::String]
432
+ # Identifier. The unique identifier of this evaluation dataset.
433
+ # Format:
434
+ # `projects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluationDataset}`
435
+ # @!attribute [rw] display_name
436
+ # @return [::String]
437
+ # Required. User-defined display name of the evaluation dataset. Unique
438
+ # within an App.
439
+ # @!attribute [rw] evaluations
440
+ # @return [::Array<::String>]
441
+ # Optional. Evaluations that are included in this dataset.
442
+ # @!attribute [r] create_time
443
+ # @return [::Google::Protobuf::Timestamp]
444
+ # Output only. Timestamp when the evaluation dataset was created.
445
+ # @!attribute [r] update_time
446
+ # @return [::Google::Protobuf::Timestamp]
447
+ # Output only. Timestamp when the evaluation dataset was last updated.
448
+ # @!attribute [r] etag
449
+ # @return [::String]
450
+ # Output only. Etag used to ensure the object hasn't changed during a
451
+ # read-modify-write operation. If the etag is empty, the update will
452
+ # overwrite any concurrent changes.
453
+ # @!attribute [r] created_by
454
+ # @return [::String]
455
+ # Output only. The user who created the evaluation dataset.
456
+ # @!attribute [r] last_updated_by
457
+ # @return [::String]
458
+ # Output only. The user who last updated the evaluation dataset.
459
+ # @!attribute [r] aggregated_metrics
460
+ # @return [::Google::Cloud::Ces::V1beta::AggregatedMetrics]
461
+ # Output only. The aggregated metrics for this evaluation dataset across all
462
+ # runs.
463
+ class EvaluationDataset
464
+ include ::Google::Protobuf::MessageExts
465
+ extend ::Google::Protobuf::MessageExts::ClassMethods
466
+ end
467
+
468
+ # An evaluation result represents the output of running an Evaluation.
469
+ # @!attribute [r] golden_result
470
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::GoldenResult]
471
+ # Output only. The outcome of a golden evaluation.
472
+ #
473
+ # Note: The following fields are mutually exclusive: `golden_result`, `scenario_result`. If a field in that set is populated, all other fields in the set will automatically be cleared.
474
+ # @!attribute [r] scenario_result
475
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::ScenarioResult]
476
+ # Output only. The outcome of a scenario evaluation.
477
+ #
478
+ # Note: The following fields are mutually exclusive: `scenario_result`, `golden_result`. If a field in that set is populated, all other fields in the set will automatically be cleared.
479
+ # @!attribute [rw] name
480
+ # @return [::String]
481
+ # Identifier. The unique identifier of the evaluation result.
482
+ # Format:
483
+ # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{result}`
484
+ # @!attribute [rw] display_name
485
+ # @return [::String]
486
+ # Required. Display name of the Evaluation Result. Unique within an
487
+ # Evaluation. By default, it has the following format:
488
+ # "<evaluation-display-name> result
489
+ # - <timestamp>".
490
+ # @!attribute [r] create_time
491
+ # @return [::Google::Protobuf::Timestamp]
492
+ # Output only. Timestamp when the evaluation result was created.
493
+ # @!attribute [r] evaluation_status
494
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome]
495
+ # Output only. The outcome of the evaluation. Only populated if
496
+ # execution_state is COMPLETE.
497
+ # @!attribute [r] evaluation_run
498
+ # @return [::String]
499
+ # Output only. The evaluation run that produced this result.
500
+ # Format:
501
+ # `projects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluationRun}`
502
+ # @!attribute [r] persona
503
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationPersona]
504
+ # Output only. The persona used to generate the conversation for the
505
+ # evaluation result.
506
+ # @!attribute [r] error_info
507
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationErrorInfo]
508
+ # Output only. Error information for the evaluation result.
509
+ # @!attribute [r] error
510
+ # @deprecated This field is deprecated and may be removed in the next major version update.
511
+ # @return [::Google::Rpc::Status]
512
+ # Output only. Deprecated: Use `error_info` instead. Errors encountered
513
+ # during execution.
514
+ # @!attribute [r] initiated_by
515
+ # @return [::String]
516
+ # Output only. The user who initiated the evaluation run that resulted in
517
+ # this result.
518
+ # @!attribute [r] app_version
519
+ # @return [::String]
520
+ # Output only. The app version used to generate the conversation that
521
+ # resulted in this result. Format:
522
+ # `projects/{project}/locations/{location}/apps/{app}/versions/{version}`
523
+ # @!attribute [r] app_version_display_name
524
+ # @return [::String]
525
+ # Output only. The display name of the `app_version` that the evaluation ran
526
+ # against.
527
+ # @!attribute [r] changelog
528
+ # @return [::String]
529
+ # Output only. The changelog of the app version that the evaluation ran
530
+ # against. This is populated if user runs evaluation on latest/draft.
531
+ # @!attribute [r] changelog_create_time
532
+ # @return [::Google::Protobuf::Timestamp]
533
+ # Output only. The create time of the changelog of the app version that the
534
+ # evaluation ran against. This is populated if user runs evaluation on
535
+ # latest/draft.
536
+ # @!attribute [r] execution_state
537
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::ExecutionState]
538
+ # Output only. The state of the evaluation result execution.
539
+ # @!attribute [r] evaluation_metrics_thresholds
540
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds]
541
+ # Output only. The evaluation thresholds for the result.
542
+ # @!attribute [r] config
543
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationConfig]
544
+ # Output only. The configuration used in the evaluation run that resulted in
545
+ # this result.
546
+ # @!attribute [r] golden_run_method
547
+ # @return [::Google::Cloud::Ces::V1beta::GoldenRunMethod]
548
+ # Output only. The method used to run the golden evaluation.
549
+ class EvaluationResult
550
+ include ::Google::Protobuf::MessageExts
551
+ extend ::Google::Protobuf::MessageExts::ClassMethods
552
+
553
+ # Specifies the expectation and the result of that expectation.
554
+ # @!attribute [r] observed_tool_call
555
+ # @return [::Google::Cloud::Ces::V1beta::ToolCall]
556
+ # Output only. The result of the tool call expectation.
557
+ #
558
+ # Note: The following fields are mutually exclusive: `observed_tool_call`, `observed_tool_response`, `observed_agent_response`, `observed_agent_transfer`. If a field in that set is populated, all other fields in the set will automatically be cleared.
559
+ # @!attribute [r] observed_tool_response
560
+ # @return [::Google::Cloud::Ces::V1beta::ToolResponse]
561
+ # Output only. The result of the tool response expectation.
562
+ #
563
+ # Note: The following fields are mutually exclusive: `observed_tool_response`, `observed_tool_call`, `observed_agent_response`, `observed_agent_transfer`. If a field in that set is populated, all other fields in the set will automatically be cleared.
564
+ # @!attribute [r] observed_agent_response
565
+ # @return [::Google::Cloud::Ces::V1beta::Message]
566
+ # Output only. The result of the agent response expectation.
567
+ #
568
+ # Note: The following fields are mutually exclusive: `observed_agent_response`, `observed_tool_call`, `observed_tool_response`, `observed_agent_transfer`. If a field in that set is populated, all other fields in the set will automatically be cleared.
569
+ # @!attribute [r] observed_agent_transfer
570
+ # @return [::Google::Cloud::Ces::V1beta::AgentTransfer]
571
+ # Output only. The result of the agent transfer expectation.
572
+ #
573
+ # Note: The following fields are mutually exclusive: `observed_agent_transfer`, `observed_tool_call`, `observed_tool_response`, `observed_agent_response`. If a field in that set is populated, all other fields in the set will automatically be cleared.
574
+ # @!attribute [r] expectation
575
+ # @return [::Google::Cloud::Ces::V1beta::Evaluation::GoldenExpectation]
576
+ # Output only. The expectation that was evaluated.
577
+ # @!attribute [r] outcome
578
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome]
579
+ # Output only. The outcome of the expectation.
580
+ # @!attribute [r] semantic_similarity_result
581
+ # @deprecated This field is deprecated and may be removed in the next major version update.
582
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::SemanticSimilarityResult]
583
+ # Output only. The result of the semantic similarity check.
584
+ # @!attribute [r] tool_invocation_result
585
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::GoldenExpectationOutcome::ToolInvocationResult]
586
+ # Output only. The result of the tool invocation check.
587
+ class GoldenExpectationOutcome
588
+ include ::Google::Protobuf::MessageExts
589
+ extend ::Google::Protobuf::MessageExts::ClassMethods
590
+
591
+ # The result of the tool invocation check.
592
+ # @!attribute [r] parameter_correctness_score
593
+ # @return [::Float]
594
+ # Output only. The tool invocation parameter correctness score. This
595
+ # indicates the percent of parameters from the expected tool call that
596
+ # were also present in the actual tool call.
597
+ # @!attribute [r] outcome
598
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome]
599
+ # Output only. The outcome of the tool invocation check. This is
600
+ # determined by comparing the parameter_correctness_score to the
601
+ # threshold. If the score is equal to or above the threshold, the outcome
602
+ # will be PASS. Otherwise, the outcome will be FAIL.
603
+ # @!attribute [r] explanation
604
+ # @return [::String]
605
+ # Output only. A free text explanation for the tool invocation result.
606
+ class ToolInvocationResult
607
+ include ::Google::Protobuf::MessageExts
608
+ extend ::Google::Protobuf::MessageExts::ClassMethods
609
+ end
610
+ end
611
+
612
+ # The result of a single evaluation expectation.
613
+ # @!attribute [r] evaluation_expectation
614
+ # @return [::String]
615
+ # Output only. The evaluation expectation.
616
+ # Format:
617
+ # `projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluation_expectation}`
618
+ # @!attribute [r] prompt
619
+ # @return [::String]
620
+ # Output only. The prompt that was used for the evaluation.
621
+ # @!attribute [r] outcome
622
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome]
623
+ # Output only. The outcome of the evaluation expectation.
624
+ # @!attribute [r] explanation
625
+ # @return [::String]
626
+ # Output only. The explanation for the result.
627
+ class EvaluationExpectationResult
628
+ include ::Google::Protobuf::MessageExts
629
+ extend ::Google::Protobuf::MessageExts::ClassMethods
630
+ end
631
+
632
+ # The result of a golden evaluation.
633
+ # @!attribute [r] turn_replay_results
634
+ # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::GoldenResult::TurnReplayResult>]
635
+ # Output only. The result of running each turn of the golden conversation.
636
+ # @!attribute [r] evaluation_expectation_results
637
+ # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::EvaluationExpectationResult>]
638
+ # Output only. The results of the evaluation expectations.
639
+ class GoldenResult
640
+ include ::Google::Protobuf::MessageExts
641
+ extend ::Google::Protobuf::MessageExts::ClassMethods
642
+
643
+ # The result of running a single turn of the golden conversation.
644
+ # @!attribute [r] conversation
645
+ # @return [::String]
646
+ # Output only. The conversation that was generated for this turn.
647
+ # @!attribute [r] expectation_outcome
648
+ # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::GoldenExpectationOutcome>]
649
+ # Output only. The outcome of each expectation.
650
+ # @!attribute [r] hallucination_result
651
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::HallucinationResult]
652
+ # Output only. The result of the hallucination check.
653
+ # @!attribute [r] tool_invocation_score
654
+ # @deprecated This field is deprecated and may be removed in the next major version update.
655
+ # @return [::Float]
656
+ # Output only. Deprecated. Use OverallToolInvocationResult instead.
657
+ # @!attribute [r] tool_ordered_invocation_score
658
+ # @return [::Float]
659
+ # Output only. The overall tool ordered invocation score for this turn.
660
+ # This indicates the overall percent of tools from the expected turn that
661
+ # were actually invoked in the expected order.
662
+ # @!attribute [r] turn_latency
663
+ # @return [::Google::Protobuf::Duration]
664
+ # Output only. Duration of the turn.
665
+ # @!attribute [r] tool_call_latencies
666
+ # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::ToolCallLatency>]
667
+ # Output only. The latency of each tool call in the turn.
668
+ # @!attribute [r] semantic_similarity_result
669
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::SemanticSimilarityResult]
670
+ # Output only. The result of the semantic similarity check.
671
+ # @!attribute [r] overall_tool_invocation_result
672
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::OverallToolInvocationResult]
673
+ # Output only. The result of the overall tool invocation check.
674
+ # @!attribute [r] error_info
675
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationErrorInfo]
676
+ # Output only. Information about the error that occurred during this
677
+ # turn.
678
+ # @!attribute [r] span_latencies
679
+ # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::SpanLatency>]
680
+ # Output only. The latency of spans in the turn.
681
+ class TurnReplayResult
682
+ include ::Google::Protobuf::MessageExts
683
+ extend ::Google::Protobuf::MessageExts::ClassMethods
684
+ end
685
+ end
686
+
687
+ # The outcome of the evaluation against the rubric.
688
+ # @!attribute [r] rubric
689
+ # @return [::String]
690
+ # Output only. The rubric that was used to evaluate the conversation.
691
+ # @!attribute [r] score
692
+ # @return [::Float]
693
+ # Output only. The score of the conversation against the rubric.
694
+ # @!attribute [r] score_explanation
695
+ # @return [::String]
696
+ # Output only. The rater's response to the rubric.
697
+ class ScenarioRubricOutcome
698
+ include ::Google::Protobuf::MessageExts
699
+ extend ::Google::Protobuf::MessageExts::ClassMethods
700
+ end
701
+
702
+ # The outcome of a scenario expectation.
703
+ # @!attribute [r] observed_tool_call
704
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::ScenarioExpectationOutcome::ObservedToolCall]
705
+ # Output only. The observed tool call.
706
+ #
707
+ # Note: The following fields are mutually exclusive: `observed_tool_call`, `observed_agent_response`. If a field in that set is populated, all other fields in the set will automatically be cleared.
708
+ # @!attribute [r] observed_agent_response
709
+ # @return [::Google::Cloud::Ces::V1beta::Message]
710
+ # Output only. The observed agent response.
711
+ #
712
+ # Note: The following fields are mutually exclusive: `observed_agent_response`, `observed_tool_call`. If a field in that set is populated, all other fields in the set will automatically be cleared.
713
+ # @!attribute [r] expectation
714
+ # @return [::Google::Cloud::Ces::V1beta::Evaluation::ScenarioExpectation]
715
+ # Output only. The expectation that was evaluated.
716
+ # @!attribute [r] outcome
717
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome]
718
+ # Output only. The outcome of the ScenarioExpectation.
719
+ class ScenarioExpectationOutcome
720
+ include ::Google::Protobuf::MessageExts
721
+ extend ::Google::Protobuf::MessageExts::ClassMethods
722
+
723
+ # The observed tool call and response.
724
+ # @!attribute [r] tool_call
725
+ # @return [::Google::Cloud::Ces::V1beta::ToolCall]
726
+ # Output only. The observed tool call.
727
+ # @!attribute [r] tool_response
728
+ # @return [::Google::Cloud::Ces::V1beta::ToolResponse]
729
+ # Output only. The observed tool response.
730
+ class ObservedToolCall
731
+ include ::Google::Protobuf::MessageExts
732
+ extend ::Google::Protobuf::MessageExts::ClassMethods
733
+ end
734
+ end
735
+
736
+ # The outcome of a scenario evaluation.
737
+ # @!attribute [r] conversation
738
+ # @return [::String]
739
+ # Output only. The conversation that was generated in the scenario.
740
+ # @!attribute [r] task
741
+ # @return [::String]
742
+ # Output only. The task that was used when running the scenario for this
743
+ # result.
744
+ # @!attribute [r] user_facts
745
+ # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation::Scenario::UserFact>]
746
+ # Output only. The user facts that were used by the scenario for this
747
+ # result.
748
+ # @!attribute [r] expectation_outcomes
749
+ # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::ScenarioExpectationOutcome>]
750
+ # Output only. The outcome of each expectation.
751
+ # @!attribute [r] rubric_outcomes
752
+ # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::ScenarioRubricOutcome>]
753
+ # Output only. The outcome of the rubric.
754
+ # @!attribute [r] hallucination_result
755
+ # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::HallucinationResult>]
756
+ # Output only. The result of the hallucination check.
757
+ # There will be one hallucination result for each turn in the conversation.
758
+ # @!attribute [r] task_completion_result
759
+ # @deprecated This field is deprecated and may be removed in the next major version update.
760
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::TaskCompletionResult]
761
+ # Output only. The result of the task completion check.
762
+ # @!attribute [r] tool_call_latencies
763
+ # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::ToolCallLatency>]
764
+ # Output only. The latency of each tool call execution in the conversation.
765
+ # @!attribute [r] user_goal_satisfaction_result
766
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::UserGoalSatisfactionResult]
767
+ # Output only. The result of the user goal satisfaction check.
768
+ # @!attribute [r] all_expectations_satisfied
769
+ # @return [::Boolean]
770
+ # Output only. Whether all expectations were satisfied for this turn.
771
+ # @!attribute [r] task_completed
772
+ # @return [::Boolean]
773
+ # Output only. Whether the task was completed for this turn. This is a
774
+ # composite of all expectations satisfied, no hallucinations, and user goal
775
+ # satisfaction.
776
+ # @!attribute [r] span_latencies
777
+ # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::SpanLatency>]
778
+ # Output only. The latency of spans in the conversation.
779
+ # @!attribute [r] evaluation_expectation_results
780
+ # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::EvaluationExpectationResult>]
781
+ # Output only. The results of the evaluation expectations.
782
+ class ScenarioResult
783
+ include ::Google::Protobuf::MessageExts
784
+ extend ::Google::Protobuf::MessageExts::ClassMethods
785
+ end
786
+
787
+ # The latency of a span execution.
788
+ # @!attribute [r] resource
789
+ # @return [::String]
790
+ # Output only. The resource name of the guardrail or tool spans.
791
+ #
792
+ # Note: The following fields are mutually exclusive: `resource`, `toolset`, `model`, `callback`. If a field in that set is populated, all other fields in the set will automatically be cleared.
793
+ # @!attribute [r] toolset
794
+ # @return [::Google::Cloud::Ces::V1beta::ToolsetTool]
795
+ # Output only. The toolset tool identifier.
796
+ #
797
+ # Note: The following fields are mutually exclusive: `toolset`, `resource`, `model`, `callback`. If a field in that set is populated, all other fields in the set will automatically be cleared.
798
+ # @!attribute [r] model
799
+ # @return [::String]
800
+ # Output only. The name of the LLM span.
801
+ #
802
+ # Note: The following fields are mutually exclusive: `model`, `resource`, `toolset`, `callback`. If a field in that set is populated, all other fields in the set will automatically be cleared.
803
+ # @!attribute [r] callback
804
+ # @return [::String]
805
+ # Output only. The name of the user callback span.
806
+ #
807
+ # Note: The following fields are mutually exclusive: `callback`, `resource`, `toolset`, `model`. If a field in that set is populated, all other fields in the set will automatically be cleared.
808
+ # @!attribute [r] type
809
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::SpanLatency::Type]
810
+ # Output only. The type of span.
811
+ # @!attribute [r] display_name
812
+ # @return [::String]
813
+ # Output only. The display name of the span. Applicable to tool and
814
+ # guardrail spans.
815
+ # @!attribute [r] start_time
816
+ # @return [::Google::Protobuf::Timestamp]
817
+ # Output only. The start time of span.
818
+ # @!attribute [r] end_time
819
+ # @return [::Google::Protobuf::Timestamp]
820
+ # Output only. The end time of span.
821
+ # @!attribute [r] execution_latency
822
+ # @return [::Google::Protobuf::Duration]
823
+ # Output only. The latency of span.
824
+ class SpanLatency
825
+ include ::Google::Protobuf::MessageExts
826
+ extend ::Google::Protobuf::MessageExts::ClassMethods
827
+
828
+ # The type of span.
829
+ # Additional values may be added in the future.
830
+ module Type
831
+ # Default value. This value is unused.
832
+ TYPE_UNSPECIFIED = 0
833
+
834
+ # Tool call span.
835
+ TOOL = 1
836
+
837
+ # User callback span.
838
+ USER_CALLBACK = 2
839
+
840
+ # Guardrail span.
841
+ GUARDRAIL = 3
842
+
843
+ # LLM span.
844
+ LLM = 4
845
+ end
846
+ end
847
+
848
+ # The latency of a tool call execution.
849
+ # @!attribute [r] tool
850
+ # @return [::String]
851
+ # Output only. The name of the tool that got executed.
852
+ # Format:
853
+ # `projects/{project}/locations/{location}/apps/{app}/tools/{tool}`.
854
+ # @!attribute [r] display_name
855
+ # @return [::String]
856
+ # Output only. The display name of the tool.
857
+ # @!attribute [r] start_time
858
+ # @return [::Google::Protobuf::Timestamp]
859
+ # Output only. The start time of the tool call execution.
860
+ # @!attribute [r] end_time
861
+ # @return [::Google::Protobuf::Timestamp]
862
+ # Output only. The end time of the tool call execution.
863
+ # @!attribute [r] execution_latency
864
+ # @return [::Google::Protobuf::Duration]
865
+ # Output only. The latency of the tool call execution.
866
+ class ToolCallLatency
867
+ include ::Google::Protobuf::MessageExts
868
+ extend ::Google::Protobuf::MessageExts::ClassMethods
869
+ end
870
+
871
+ # The result of the hallucination check for a single turn.
872
+ # @!attribute [r] score
873
+ # @return [::Integer]
874
+ # Output only. The hallucination score. Can be -1, 0, 1.
875
+ # @!attribute [r] label
876
+ # @return [::String]
877
+ # Output only. The label associated with each score.
878
+ # Score 1: Justified
879
+ # Score 0: Not Justified
880
+ # Score -1: No Claim To Assess
881
+ # @!attribute [r] explanation
882
+ # @return [::String]
883
+ # Output only. The explanation for the hallucination score.
884
+ class HallucinationResult
885
+ include ::Google::Protobuf::MessageExts
886
+ extend ::Google::Protobuf::MessageExts::ClassMethods
887
+ end
888
+
889
+ # The result of a user goal satisfaction check for a conversation.
890
+ # @!attribute [r] score
891
+ # @return [::Integer]
892
+ # Output only. The user task satisfaction score. Can be -1, 0, 1.
893
+ # @!attribute [r] label
894
+ # @return [::String]
895
+ # Output only. The label associated with each score.
896
+ # Score 1: User Task Satisfied
897
+ # Score 0: User Task Not Satisfied
898
+ # Score -1: User Task Unspecified
899
+ # @!attribute [r] explanation
900
+ # @return [::String]
901
+ # Output only. The explanation for the user task satisfaction score.
902
+ class UserGoalSatisfactionResult
903
+ include ::Google::Protobuf::MessageExts
904
+ extend ::Google::Protobuf::MessageExts::ClassMethods
905
+ end
906
+
907
+ # The result of the semantic similarity check.
908
+ # @!attribute [r] score
909
+ # @return [::Integer]
910
+ # Output only. The semantic similarity score. Can be 0, 1, 2, 3, or 4.
911
+ # @!attribute [r] label
912
+ # @return [::String]
913
+ # Output only. The label associated with each score.
914
+ # Score 4: Fully Consistent
915
+ # Score 3: Mostly Consistent
916
+ # Score 2: Partially Consistent (Minor Omissions)
917
+ # Score 1: Largely Inconsistent (Major Omissions)
918
+ # Score 0: Completely Inconsistent / Contradictory
919
+ # @!attribute [r] explanation
920
+ # @return [::String]
921
+ # Output only. The explanation for the semantic similarity score.
922
+ # @!attribute [r] outcome
923
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome]
924
+ # Output only. The outcome of the semantic similarity check. This is
925
+ # determined by comparing the score to the
926
+ # semantic_similarity_success_threshold. If the score is equal to or above
927
+ # the threshold, the outcome will be PASS. Otherwise, the outcome will be
928
+ # FAIL.
929
+ class SemanticSimilarityResult
930
+ include ::Google::Protobuf::MessageExts
931
+ extend ::Google::Protobuf::MessageExts::ClassMethods
932
+ end
933
+
934
+ # The result of the overall tool invocation check.
935
+ # @!attribute [rw] tool_invocation_score
936
+ # @return [::Float]
937
+ # The overall tool invocation score for this turn. This indicates the
938
+ # overall percent of tools from the expected turn that were actually
939
+ # invoked.
940
+ # @!attribute [r] outcome
941
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome]
942
+ # Output only. The outcome of the tool invocation check. This is determined
943
+ # by comparing the tool_invocation_score to the
944
+ # overall_tool_invocation_correctness_threshold. If the
945
+ # score is equal to or above the threshold, the outcome will be PASS.
946
+ # Otherwise, the outcome will be FAIL.
947
+ class OverallToolInvocationResult
948
+ include ::Google::Protobuf::MessageExts
949
+ extend ::Google::Protobuf::MessageExts::ClassMethods
950
+ end
951
+
952
+ # The result of the task completion check for the conversation.
953
+ # @!attribute [r] score
954
+ # @return [::Integer]
955
+ # Output only. The task completion score. Can be -1, 0, 1
956
+ # @!attribute [r] label
957
+ # @return [::String]
958
+ # Output only. The label associated with each score.
959
+ # Score 1: Task Completed
960
+ # Score 0: Task Not Completed
961
+ # Score -1: User Goal Undefined
962
+ # @!attribute [r] explanation
963
+ # @return [::String]
964
+ # Output only. The explanation for the task completion score.
965
+ class TaskCompletionResult
966
+ include ::Google::Protobuf::MessageExts
967
+ extend ::Google::Protobuf::MessageExts::ClassMethods
968
+ end
969
+
970
+ # The outcome of the evaluation or expectation.
971
+ module Outcome
972
+ # Evaluation outcome is not specified.
973
+ OUTCOME_UNSPECIFIED = 0
974
+
975
+ # Evaluation/Expectation passed. In the case of an evaluation, this means
976
+ # that all expectations were met.
977
+ PASS = 1
978
+
979
+ # Evaluation/Expectation failed. In the case of an evaluation, this means
980
+ # that at least one expectation was not met.
981
+ FAIL = 2
982
+
983
+ # Evaluation/Expectation was skipped.
984
+ SKIPPED = 3
985
+ end
986
+
987
+ # The state of the evaluation result execution.
988
+ module ExecutionState
989
+ # Evaluation result execution state is not specified.
990
+ EXECUTION_STATE_UNSPECIFIED = 0
991
+
992
+ # Evaluation result execution is running.
993
+ RUNNING = 1
994
+
995
+ # Evaluation result execution has completed.
996
+ COMPLETED = 2
997
+
998
+ # Evaluation result execution failed due to an internal error.
999
+ ERROR = 3
1000
+ end
1001
+ end
1002
+
1003
+ # An evaluation run represents an all the evaluation results from an
1004
+ # evaluation execution.
1005
+ # @!attribute [rw] name
1006
+ # @return [::String]
1007
+ # Identifier. The unique identifier of the evaluation run.
1008
+ # Format:
1009
+ # `projects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluationRun}`
1010
+ # @!attribute [rw] display_name
1011
+ # @return [::String]
1012
+ # Optional. User-defined display name of the evaluation run.
1013
+ # default: "<evaluation-dataset-display-name> run - <timestamp>".
1014
+ # @!attribute [r] evaluation_results
1015
+ # @return [::Array<::String>]
1016
+ # Output only. The evaluation results that are part of this run.
1017
+ # Format:
1018
+ # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{result}`
1019
+ # @!attribute [r] create_time
1020
+ # @return [::Google::Protobuf::Timestamp]
1021
+ # Output only. Timestamp when the evaluation run was created.
1022
+ # @!attribute [r] initiated_by
1023
+ # @return [::String]
1024
+ # Output only. The user who initiated the evaluation run.
1025
+ # @!attribute [r] app_version
1026
+ # @return [::String]
1027
+ # Output only. The app version to evaluate.
1028
+ # Format:
1029
+ # `projects/{project}/locations/{location}/apps/{app}/versions/{version}`
1030
+ # @!attribute [r] app_version_display_name
1031
+ # @return [::String]
1032
+ # Output only. The display name of the `app_version` that the evaluation ran
1033
+ # against.
1034
+ # @!attribute [r] changelog
1035
+ # @return [::String]
1036
+ # Output only. The changelog of the app version that the evaluation ran
1037
+ # against. This is populated if user runs evaluation on latest/draft.
1038
+ # @!attribute [r] changelog_create_time
1039
+ # @return [::Google::Protobuf::Timestamp]
1040
+ # Output only. The create time of the changelog of the app version that the
1041
+ # evaluation ran against. This is populated if user runs evaluation on
1042
+ # latest/draft.
1043
+ # @!attribute [r] evaluations
1044
+ # @return [::Array<::String>]
1045
+ # Output only. The evaluations that are part of this run. The list may
1046
+ # contain evaluations of either type. This field is mutually exclusive with
1047
+ # `evaluation_dataset`.
1048
+ # Format:
1049
+ # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}`
1050
+ # @!attribute [r] evaluation_dataset
1051
+ # @return [::String]
1052
+ # Output only. The evaluation dataset that this run is associated with. This
1053
+ # field is mutually exclusive with `evaluations`. Format:
1054
+ # `projects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluationDataset}`
1055
+ # @!attribute [r] evaluation_type
1056
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationRun::EvaluationType]
1057
+ # Output only. The type of the evaluations in this run.
1058
+ # @!attribute [r] state
1059
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationRun::EvaluationRunState]
1060
+ # Output only. The state of the evaluation run.
1061
+ # @!attribute [r] progress
1062
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationRun::Progress]
1063
+ # Output only. The progress of the evaluation run.
1064
+ # @!attribute [r] config
1065
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationConfig]
1066
+ # Output only. The configuration used in the run.
1067
+ # @!attribute [r] error
1068
+ # @deprecated This field is deprecated and may be removed in the next major version update.
1069
+ # @return [::Google::Rpc::Status]
1070
+ # Output only. Deprecated: Use error_info instead. Errors encountered during
1071
+ # execution.
1072
+ # @!attribute [r] error_info
1073
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationErrorInfo]
1074
+ # Output only. Error information for the evaluation run.
1075
+ # @!attribute [r] evaluation_run_summaries
1076
+ # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Ces::V1beta::EvaluationRun::EvaluationRunSummary}]
1077
+ # Output only. Map of evaluation name to EvaluationRunSummary.
1078
+ # @!attribute [r] latency_report
1079
+ # @return [::Google::Cloud::Ces::V1beta::LatencyReport]
1080
+ # Output only. Latency report for the evaluation run.
1081
+ # @!attribute [r] run_count
1082
+ # @return [::Integer]
1083
+ # Output only. The number of times the evaluations inside the run were run.
1084
+ # @!attribute [r] persona_run_configs
1085
+ # @return [::Array<::Google::Cloud::Ces::V1beta::PersonaRunConfig>]
1086
+ # Output only. The configuration to use for the run per persona.
1087
+ # @!attribute [rw] optimization_config
1088
+ # @return [::Google::Cloud::Ces::V1beta::OptimizationConfig]
1089
+ # Optional. Configuration for running the optimization step after the
1090
+ # evaluation run. If not set, the optimization step will not be run.
1091
+ # @!attribute [r] scheduled_evaluation_run
1092
+ # @return [::String]
1093
+ # Output only. The scheduled evaluation run resource name that created this
1094
+ # evaluation run. This field is only set if the evaluation run was created
1095
+ # by a scheduled evaluation run.
1096
+ # Format:
1097
+ # `projects/{project}/locations/{location}/apps/{app}/scheduledEvaluationRuns/{scheduled_evaluation_run}`
1098
+ # @!attribute [r] golden_run_method
1099
+ # @return [::Google::Cloud::Ces::V1beta::GoldenRunMethod]
1100
+ # Output only. The method used to run the evaluation.
1101
+ class EvaluationRun
1102
+ include ::Google::Protobuf::MessageExts
1103
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1104
+
1105
+ # The progress of the evaluation run.
1106
+ # @!attribute [r] total_count
1107
+ # @return [::Integer]
1108
+ # Output only. Total number of evaluation results in this run.
1109
+ # @!attribute [r] failed_count
1110
+ # @return [::Integer]
1111
+ # Output only. Number of completed evaluation results with an outcome of
1112
+ # FAIL. (EvaluationResult.execution_state is COMPLETED and
1113
+ # EvaluationResult.evaluation_status is FAIL).
1114
+ # @!attribute [r] error_count
1115
+ # @return [::Integer]
1116
+ # Output only. Number of evaluation results that failed to execute.
1117
+ # (EvaluationResult.execution_state is ERROR).
1118
+ # @!attribute [r] completed_count
1119
+ # @return [::Integer]
1120
+ # Output only. Number of evaluation results that finished successfully.
1121
+ # (EvaluationResult.execution_state is COMPLETED).
1122
+ # @!attribute [r] passed_count
1123
+ # @return [::Integer]
1124
+ # Output only. Number of completed evaluation results with an outcome of
1125
+ # PASS. (EvaluationResult.execution_state is COMPLETED and
1126
+ # EvaluationResult.evaluation_status is PASS).
1127
+ class Progress
1128
+ include ::Google::Protobuf::MessageExts
1129
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1130
+ end
1131
+
1132
+ # Contains the summary of passed and failed result counts for a specific
1133
+ # evaluation in an evaluation run.
1134
+ # @!attribute [r] passed_count
1135
+ # @return [::Integer]
1136
+ # Output only. Number of passed results for the associated Evaluation in
1137
+ # this run.
1138
+ # @!attribute [r] failed_count
1139
+ # @return [::Integer]
1140
+ # Output only. Number of failed results for the associated Evaluation in
1141
+ # this run.
1142
+ # @!attribute [r] error_count
1143
+ # @return [::Integer]
1144
+ # Output only. Number of error results for the associated Evaluation in
1145
+ # this run.
1146
+ class EvaluationRunSummary
1147
+ include ::Google::Protobuf::MessageExts
1148
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1149
+ end
1150
+
1151
+ # @!attribute [rw] key
1152
+ # @return [::String]
1153
+ # @!attribute [rw] value
1154
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationRun::EvaluationRunSummary]
1155
+ class EvaluationRunSummariesEntry
1156
+ include ::Google::Protobuf::MessageExts
1157
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1158
+ end
1159
+
1160
+ # The type of the evaluations in this run.
1161
+ # Additional values may be added in the future.
1162
+ module EvaluationType
1163
+ # Evaluation type is not specified.
1164
+ EVALUATION_TYPE_UNSPECIFIED = 0
1165
+
1166
+ # Golden evaluation.
1167
+ GOLDEN = 1
1168
+
1169
+ # Scenario evaluation.
1170
+ SCENARIO = 2
1171
+
1172
+ # Indicates the run includes a mix of golden and scenario evaluations.
1173
+ MIXED = 3
1174
+ end
1175
+
1176
+ # The state of the evaluation run.
1177
+ module EvaluationRunState
1178
+ # Evaluation run state is not specified.
1179
+ EVALUATION_RUN_STATE_UNSPECIFIED = 0
1180
+
1181
+ # Evaluation run is running.
1182
+ RUNNING = 1
1183
+
1184
+ # Evaluation run has completed.
1185
+ COMPLETED = 2
1186
+
1187
+ # The evaluation run has an error.
1188
+ ERROR = 3
1189
+ end
1190
+ end
1191
+
1192
+ # Latency report for the evaluation run.
1193
+ # @!attribute [r] tool_latencies
1194
+ # @return [::Array<::Google::Cloud::Ces::V1beta::LatencyReport::ToolLatency>]
1195
+ # Output only. Unordered list. Latency metrics for each tool.
1196
+ # @!attribute [r] callback_latencies
1197
+ # @return [::Array<::Google::Cloud::Ces::V1beta::LatencyReport::CallbackLatency>]
1198
+ # Output only. Unordered list. Latency metrics for each callback.
1199
+ # @!attribute [r] guardrail_latencies
1200
+ # @return [::Array<::Google::Cloud::Ces::V1beta::LatencyReport::GuardrailLatency>]
1201
+ # Output only. Unordered list. Latency metrics for each guardrail.
1202
+ # @!attribute [r] llm_call_latencies
1203
+ # @return [::Array<::Google::Cloud::Ces::V1beta::LatencyReport::LlmCallLatency>]
1204
+ # Output only. Unordered list. Latency metrics for each LLM call.
1205
+ # @!attribute [r] session_count
1206
+ # @return [::Integer]
1207
+ # Output only. The total number of sessions considered in the latency report.
1208
+ class LatencyReport
1209
+ include ::Google::Protobuf::MessageExts
1210
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1211
+
1212
+ # Latency metrics for a component.
1213
+ # @!attribute [r] p50_latency
1214
+ # @return [::Google::Protobuf::Duration]
1215
+ # Output only. The 50th percentile latency.
1216
+ # @!attribute [r] p90_latency
1217
+ # @return [::Google::Protobuf::Duration]
1218
+ # Output only. The 90th percentile latency.
1219
+ # @!attribute [r] p99_latency
1220
+ # @return [::Google::Protobuf::Duration]
1221
+ # Output only. The 99th percentile latency.
1222
+ # @!attribute [r] call_count
1223
+ # @return [::Integer]
1224
+ # Output only. The number of times the resource was called.
1225
+ class LatencyMetrics
1226
+ include ::Google::Protobuf::MessageExts
1227
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1228
+ end
1229
+
1230
+ # Latency metrics for a single tool.
1231
+ # @!attribute [r] tool
1232
+ # @return [::String]
1233
+ # Output only. Format:
1234
+ # `projects/{project}/locations/{location}/apps/{app}/tools/{tool}`.
1235
+ #
1236
+ # Note: The following fields are mutually exclusive: `tool`, `toolset_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared.
1237
+ # @!attribute [r] toolset_tool
1238
+ # @return [::Google::Cloud::Ces::V1beta::ToolsetTool]
1239
+ # Output only. The toolset tool identifier.
1240
+ #
1241
+ # Note: The following fields are mutually exclusive: `toolset_tool`, `tool`. If a field in that set is populated, all other fields in the set will automatically be cleared.
1242
+ # @!attribute [r] tool_display_name
1243
+ # @return [::String]
1244
+ # Output only. The display name of the tool.
1245
+ # @!attribute [r] latency_metrics
1246
+ # @return [::Google::Cloud::Ces::V1beta::LatencyReport::LatencyMetrics]
1247
+ # Output only. The latency metrics for the tool.
1248
+ class ToolLatency
1249
+ include ::Google::Protobuf::MessageExts
1250
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1251
+ end
1252
+
1253
+ # Latency metrics for a single callback.
1254
+ # @!attribute [r] stage
1255
+ # @return [::String]
1256
+ # Output only. The stage of the callback.
1257
+ # @!attribute [r] latency_metrics
1258
+ # @return [::Google::Cloud::Ces::V1beta::LatencyReport::LatencyMetrics]
1259
+ # Output only. The latency metrics for the callback.
1260
+ class CallbackLatency
1261
+ include ::Google::Protobuf::MessageExts
1262
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1263
+ end
1264
+
1265
+ # Latency metrics for a single guardrail.
1266
+ # @!attribute [r] guardrail
1267
+ # @return [::String]
1268
+ # Output only. The name of the guardrail.
1269
+ # Format:
1270
+ # `projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}`.
1271
+ # @!attribute [r] guardrail_display_name
1272
+ # @return [::String]
1273
+ # Output only. The display name of the guardrail.
1274
+ # @!attribute [r] latency_metrics
1275
+ # @return [::Google::Cloud::Ces::V1beta::LatencyReport::LatencyMetrics]
1276
+ # Output only. The latency metrics for the guardrail.
1277
+ class GuardrailLatency
1278
+ include ::Google::Protobuf::MessageExts
1279
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1280
+ end
1281
+
1282
+ # Latency metrics for a single LLM call.
1283
+ # @!attribute [r] model
1284
+ # @return [::String]
1285
+ # Output only. The name of the model.
1286
+ # @!attribute [r] latency_metrics
1287
+ # @return [::Google::Cloud::Ces::V1beta::LatencyReport::LatencyMetrics]
1288
+ # Output only. The latency metrics for the LLM call.
1289
+ class LlmCallLatency
1290
+ include ::Google::Protobuf::MessageExts
1291
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1292
+ end
1293
+ end
1294
+
1295
+ # An evaluation expectation represents a specific criteria to evaluate against.
1296
+ # @!attribute [rw] llm_criteria
1297
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation::LlmCriteria]
1298
+ # Optional. Evaluation criteria based on an LLM prompt.
1299
+ # @!attribute [rw] name
1300
+ # @return [::String]
1301
+ # Identifier. The unique identifier of this evaluation expectation.
1302
+ # Format:
1303
+ # `projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluation_expectation}`
1304
+ # @!attribute [rw] display_name
1305
+ # @return [::String]
1306
+ # Required. User-defined display name. Must be unique within the app.
1307
+ # @!attribute [rw] tags
1308
+ # @return [::Array<::String>]
1309
+ # Optional. User-defined tags for expectations. Can be used to filter
1310
+ # expectations.
1311
+ # @!attribute [r] create_time
1312
+ # @return [::Google::Protobuf::Timestamp]
1313
+ # Output only. Timestamp when the evaluation expectation was created.
1314
+ # @!attribute [r] update_time
1315
+ # @return [::Google::Protobuf::Timestamp]
1316
+ # Output only. Timestamp when the evaluation expectation was last updated.
1317
+ # @!attribute [r] etag
1318
+ # @return [::String]
1319
+ # Output only. Etag used to ensure the object hasn't changed during a
1320
+ # read-modify-write operation. If the etag is empty, the update will
1321
+ # overwrite any concurrent changes.
1322
+ class EvaluationExpectation
1323
+ include ::Google::Protobuf::MessageExts
1324
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1325
+
1326
+ # Configuration for LLM-based evaluation criteria.
1327
+ # @!attribute [rw] prompt
1328
+ # @return [::String]
1329
+ # Required. The prompt/instructions provided to the LLM judge.
1330
+ class LlmCriteria
1331
+ include ::Google::Protobuf::MessageExts
1332
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1333
+ end
1334
+ end
1335
+
1336
+ # EvaluationConfig configures settings for running the evaluation.
1337
+ # @!attribute [rw] input_audio_config
1338
+ # @deprecated This field is deprecated and may be removed in the next major version update.
1339
+ # @return [::Google::Cloud::Ces::V1beta::InputAudioConfig]
1340
+ # Optional. Configuration for processing the input audio.
1341
+ # @!attribute [rw] output_audio_config
1342
+ # @deprecated This field is deprecated and may be removed in the next major version update.
1343
+ # @return [::Google::Cloud::Ces::V1beta::OutputAudioConfig]
1344
+ # Optional. Configuration for generating the output audio.
1345
+ # @!attribute [rw] evaluation_channel
1346
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationConfig::EvaluationChannel]
1347
+ # Optional. The channel to evaluate.
1348
+ # @!attribute [rw] tool_call_behaviour
1349
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationToolCallBehaviour]
1350
+ # Optional. Specifies whether the evaluation should use real tool calls or
1351
+ # fake tools.
1352
+ class EvaluationConfig
1353
+ include ::Google::Protobuf::MessageExts
1354
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1355
+
1356
+ # The channel to evaluate.
1357
+ module EvaluationChannel
1358
+ # Unspecified evaluation channel.
1359
+ EVALUATION_CHANNEL_UNSPECIFIED = 0
1360
+
1361
+ # Text-only evaluation channel.
1362
+ TEXT = 1
1363
+
1364
+ # Audio evaluation channel.
1365
+ AUDIO = 2
1366
+ end
1367
+ end
1368
+
1369
+ # Information about an error encountered during an evaluation execution.
1370
+ # @!attribute [r] error_type
1371
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationErrorInfo::ErrorType]
1372
+ # Output only. The type of error.
1373
+ # @!attribute [r] error_message
1374
+ # @return [::String]
1375
+ # Output only. The error message.
1376
+ # @!attribute [r] session_id
1377
+ # @return [::String]
1378
+ # Output only. The session ID for the conversation that caused the error.
1379
+ class EvaluationErrorInfo
1380
+ include ::Google::Protobuf::MessageExts
1381
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1382
+
1383
+ # The type of error
1384
+ module ErrorType
1385
+ # Unspecified error type.
1386
+ ERROR_TYPE_UNSPECIFIED = 0
1387
+
1388
+ # Failure during runtime execution.
1389
+ RUNTIME_FAILURE = 1
1390
+
1391
+ # Failure to retrieve conversation from CES Runtime.
1392
+ CONVERSATION_RETRIEVAL_FAILURE = 2
1393
+
1394
+ # Failure to calculate a metric / outcome.
1395
+ METRIC_CALCULATION_FAILURE = 3
1396
+
1397
+ # Failure to update the evaluation.
1398
+ EVALUATION_UPDATE_FAILURE = 4
1399
+
1400
+ # Ran out of quota.
1401
+ QUOTA_EXHAUSTED = 5
1402
+
1403
+ # Failure during user simulation.
1404
+ USER_SIMULATION_FAILURE = 6
1405
+ end
1406
+ end
1407
+
1408
+ # Request message for
1409
+ # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation EvaluationService.RunEvaluation}.
1410
+ # @!attribute [rw] app
1411
+ # @return [::String]
1412
+ # Required. The app to evaluate.
1413
+ # Format:
1414
+ # `projects/{project}/locations/{location}/apps/{app}`
1415
+ # @!attribute [rw] evaluations
1416
+ # @return [::Array<::String>]
1417
+ # Optional. List of evaluations to run.
1418
+ # Format:
1419
+ # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}`
1420
+ # @!attribute [rw] evaluation_dataset
1421
+ # @return [::String]
1422
+ # Optional. An evaluation dataset to run.
1423
+ # Format:
1424
+ # `projects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluationDataset}`
1425
+ # @!attribute [rw] display_name
1426
+ # @return [::String]
1427
+ # Optional. The display name of the evaluation run.
1428
+ # @!attribute [rw] app_version
1429
+ # @return [::String]
1430
+ # Optional. The app version to evaluate.
1431
+ # Format:
1432
+ # `projects/{project}/locations/{location}/apps/{app}/versions/{version}`
1433
+ # @!attribute [rw] config
1434
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationConfig]
1435
+ # Optional. The configuration to use for the run.
1436
+ # @!attribute [rw] run_count
1437
+ # @return [::Integer]
1438
+ # Optional. The number of times to run the evaluation. If not set, the
1439
+ # default value is 1 per golden, and 5 per scenario.
1440
+ # @!attribute [rw] persona_run_configs
1441
+ # @return [::Array<::Google::Cloud::Ces::V1beta::PersonaRunConfig>]
1442
+ # Optional. The configuration to use for the run per persona.
1443
+ # @!attribute [rw] optimization_config
1444
+ # @return [::Google::Cloud::Ces::V1beta::OptimizationConfig]
1445
+ # Optional. Configuration for running the optimization step after the
1446
+ # evaluation run. If not set, the optimization step will not be run.
1447
+ # @!attribute [rw] scheduled_evaluation_run
1448
+ # @return [::String]
1449
+ # Optional. The resource name of the `ScheduledEvaluationRun` that is
1450
+ # triggering this evaluation run.
1451
+ #
1452
+ # If this field is set, the `scheduled_evaluation_run` field on the created
1453
+ # `EvaluationRun` resource will be populated from this value.
1454
+ # Format:
1455
+ # `projects/{project}/locations/{location}/apps/{app}/scheduledEvaluationRuns/{scheduled_evaluation_run}`
1456
+ # @!attribute [rw] golden_run_method
1457
+ # @return [::Google::Cloud::Ces::V1beta::GoldenRunMethod]
1458
+ # Optional. The method to run the evaluation if it is a golden evaluation. If
1459
+ # not set, default to STABLE.
1460
+ # @!attribute [rw] generate_latency_report
1461
+ # @return [::Boolean]
1462
+ # Optional. Whether to generate a latency report for the evaluation run.
1463
+ class RunEvaluationRequest
1464
+ include ::Google::Protobuf::MessageExts
1465
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1466
+ end
1467
+
1468
+ # Represents a scheduled evaluation run configuration.
1469
+ # @!attribute [rw] name
1470
+ # @return [::String]
1471
+ # Identifier. The unique identifier of the scheduled evaluation run config.
1472
+ # Format:
1473
+ # projects/\\{projectId}/locations/\\{locationId}/apps/\\{appId}/scheduledEvaluationRuns/\\{scheduledEvaluationRunId}
1474
+ # @!attribute [rw] display_name
1475
+ # @return [::String]
1476
+ # Required. User-defined display name of the scheduled evaluation run config.
1477
+ # @!attribute [rw] request
1478
+ # @return [::Google::Cloud::Ces::V1beta::RunEvaluationRequest]
1479
+ # Required. The RunEvaluationRequest to schedule
1480
+ # @!attribute [rw] description
1481
+ # @return [::String]
1482
+ # Optional. User-defined description of the scheduled evaluation run.
1483
+ # @!attribute [rw] scheduling_config
1484
+ # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun::SchedulingConfig]
1485
+ # Required. Configuration for the timing and frequency with which to execute
1486
+ # the evaluations.
1487
+ # @!attribute [rw] active
1488
+ # @return [::Boolean]
1489
+ # Optional. Whether this config is active
1490
+ # @!attribute [r] last_completed_run
1491
+ # @return [::String]
1492
+ # Output only. The last successful EvaluationRun of this scheduled execution.
1493
+ # Format:
1494
+ # `projects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluationRun}`
1495
+ # @!attribute [r] total_executions
1496
+ # @return [::Integer]
1497
+ # Output only. The total number of times this run has been executed
1498
+ # @!attribute [r] next_scheduled_execution_time
1499
+ # @return [::Google::Protobuf::Timestamp]
1500
+ # Output only. The next time this is scheduled to execute
1501
+ # @!attribute [r] create_time
1502
+ # @return [::Google::Protobuf::Timestamp]
1503
+ # Output only. Timestamp when the scheduled evaluation run was created.
1504
+ # @!attribute [r] created_by
1505
+ # @return [::String]
1506
+ # Output only. The user who created the scheduled evaluation run.
1507
+ # @!attribute [r] update_time
1508
+ # @return [::Google::Protobuf::Timestamp]
1509
+ # Output only. Timestamp when the evaluation was last updated.
1510
+ # @!attribute [r] last_updated_by
1511
+ # @return [::String]
1512
+ # Output only. The user who last updated the evaluation.
1513
+ # @!attribute [r] etag
1514
+ # @return [::String]
1515
+ # Output only. Etag used to ensure the object hasn't changed during a
1516
+ # read-modify-write operation. If the etag is empty, the update will
1517
+ # overwrite any concurrent changes.
1518
+ class ScheduledEvaluationRun
1519
+ include ::Google::Protobuf::MessageExts
1520
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1521
+
1522
+ # Eval scheduling configuration details
1523
+ # @!attribute [rw] frequency
1524
+ # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun::SchedulingConfig::Frequency]
1525
+ # Required. The frequency with which to run the eval
1526
+ # @!attribute [rw] start_time
1527
+ # @return [::Google::Protobuf::Timestamp]
1528
+ # Required. Timestamp when the eval should start.
1529
+ # @!attribute [rw] days_of_week
1530
+ # @return [::Array<::Integer>]
1531
+ # Optional. The days of the week to run the eval. Applicable only for
1532
+ # Weekly and Biweekly frequencies. 1 is Monday, 2 is Tuesday, ..., 7 is
1533
+ # Sunday.
1534
+ class SchedulingConfig
1535
+ include ::Google::Protobuf::MessageExts
1536
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1537
+
1538
+ # The frequencies evals can be run at
1539
+ module Frequency
1540
+ # The frequency is unspecified.
1541
+ FREQUENCY_UNSPECIFIED = 0
1542
+
1543
+ # Indicates a one-time scheduled run that should not repeat
1544
+ NONE = 1
1545
+
1546
+ # Run the evaluation daily.
1547
+ DAILY = 2
1548
+
1549
+ # Run the evaluation weekly.
1550
+ WEEKLY = 3
1551
+
1552
+ # Run the evaluation biweekly.
1553
+ BIWEEKLY = 4
1554
+ end
1555
+ end
1556
+ end
1557
+
1558
+ # Configuration for running an evaluation for a specific persona.
1559
+ # @!attribute [rw] persona
1560
+ # @return [::String]
1561
+ # Optional. The persona to use for the evaluation.
1562
+ # Format:
1563
+ # `projects/{project}/locations/{location}/apps/{app}/evaluationPersonas/{evaluationPersona}`
1564
+ # @!attribute [rw] task_count
1565
+ # @return [::Integer]
1566
+ # Optional. The number of tasks to run for the persona.
1567
+ class PersonaRunConfig
1568
+ include ::Google::Protobuf::MessageExts
1569
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1570
+ end
1571
+
1572
+ # Configuration for running the optimization step after the evaluation run.
1573
+ # @!attribute [rw] generate_loss_report
1574
+ # @return [::Boolean]
1575
+ # Optional. Whether to generate a loss report.
1576
+ # @!attribute [r] assistant_session
1577
+ # @return [::String]
1578
+ # Output only. The assistant session to use for the optimization based on
1579
+ # this evaluation run. Format:
1580
+ # `projects/{project}/locations/{location}/apps/{app}/assistantSessions/{assistantSession}`
1581
+ # @!attribute [r] report_summary
1582
+ # @return [::String]
1583
+ # Output only. The summary of the loss report.
1584
+ # @!attribute [r] should_suggest_fix
1585
+ # @return [::Boolean]
1586
+ # Output only. Whether to suggest a fix for the losses.
1587
+ # @!attribute [r] status
1588
+ # @return [::Google::Cloud::Ces::V1beta::OptimizationConfig::OptimizationStatus]
1589
+ # Output only. The status of the optimization run.
1590
+ # @!attribute [r] error_message
1591
+ # @return [::String]
1592
+ # Output only. The error message if the optimization run failed.
1593
+ # @!attribute [r] loss_report
1594
+ # @return [::Google::Protobuf::Struct]
1595
+ # Output only. The generated loss report.
1596
+ class OptimizationConfig
1597
+ include ::Google::Protobuf::MessageExts
1598
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1599
+
1600
+ # The status of the optimization run.
1601
+ module OptimizationStatus
1602
+ # Optimization status is not specified.
1603
+ OPTIMIZATION_STATUS_UNSPECIFIED = 0
1604
+
1605
+ # Optimization is running.
1606
+ RUNNING = 1
1607
+
1608
+ # Optimization has completed.
1609
+ COMPLETED = 2
1610
+
1611
+ # Optimization failed due to an internal error.
1612
+ ERROR = 3
1613
+ end
1614
+ end
1615
+ end
1616
+ end
1617
+ end
1618
+ end