googleapis/google/cloud/documentai/v1beta3/evaluation.proto
Google APIs 39bd091b05 feat: A new field revisions is added to message .google.cloud.documentai.v1beta3.Evaluation
feat: A new field `document_type` is added to message `.google.cloud.documentai.v1beta3.ImportDocumentsRequest`
feat: A new field `document_prompt` is added to message `.google.cloud.documentai.v1beta3.DocumentSchema`
feat: A new field `enable_table_split` is added to message `.google.cloud.documentai.v1beta3.OcrConfig.LayoutParsingParams`
feat: Added new messages `Documents` and `RawDocuments` for inline document input
feat: The method `ReviewDocument` in `.google.cloud.documentai.v1beta3.DocumentProcessorService` is deprecated
feat: The field `skip_human_review` in messages `.google.cloud.documentai.v1beta3.ProcessRequest` and `.google.cloud.documentai.v1beta3.BatchProcessRequest` is deprecated
fix!: Removed the `SpannerIndexingConfig` message and the `spanner_indexing_config` field from `.google.cloud.documentai.v1beta3.Dataset`
BREAKING CHANGE: The `SpannerIndexingConfig` message and the `spanner_indexing_config` field within the `Dataset` message have been removed. Client code referencing these will need to stop referencing these in case of an error
docs: Updated comments for various fields and messages

PiperOrigin-RevId: 866382481
2026-02-06 03:34:56 -08:00

202 lines
7.1 KiB
Protocol Buffer

// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.cloud.documentai.v1beta3;
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/timestamp.proto";
option csharp_namespace = "Google.Cloud.DocumentAI.V1Beta3";
option go_package = "cloud.google.com/go/documentai/apiv1beta3/documentaipb;documentaipb";
option java_multiple_files = true;
option java_outer_classname = "DocumentAiEvaluation";
option java_package = "com.google.cloud.documentai.v1beta3";
option php_namespace = "Google\\Cloud\\DocumentAI\\V1beta3";
option ruby_package = "Google::Cloud::DocumentAI::V1beta3";
// Gives a short summary of an evaluation, and links to the evaluation itself.
message EvaluationReference {
// The resource name of the Long Running Operation for the evaluation.
string operation = 1;
// The resource name of the evaluation.
string evaluation = 2 [(google.api.resource_reference) = {
type: "documentai.googleapis.com/Evaluation"
}];
// An aggregate of the statistics for the evaluation with fuzzy matching on.
Evaluation.Metrics aggregate_metrics = 4;
// An aggregate of the statistics for the evaluation with fuzzy matching off.
Evaluation.Metrics aggregate_metrics_exact = 5;
}
// An evaluation of a ProcessorVersion's performance.
message Evaluation {
option (google.api.resource) = {
type: "documentai.googleapis.com/Evaluation"
pattern: "projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}"
};
// Evaluation counters for the documents that were used.
message Counters {
// How many documents were sent for evaluation.
int32 input_documents_count = 1;
// How many documents were not included in the evaluation as they didn't
// pass validation.
int32 invalid_documents_count = 2;
// How many documents were not included in the evaluation as Document AI
// failed to process them.
int32 failed_documents_count = 3;
// How many documents were used in the evaluation.
int32 evaluated_documents_count = 4;
}
// Evaluation metrics, either in aggregate or about a specific entity.
message Metrics {
// The calculated precision.
float precision = 1;
// The calculated recall.
float recall = 2;
// The calculated F1 score.
float f1_score = 3;
// The amount of occurrences in predicted documents.
int32 predicted_occurrences_count = 4;
// The amount of occurrences in ground truth documents.
int32 ground_truth_occurrences_count = 5;
// The amount of documents with a predicted occurrence.
int32 predicted_document_count = 10;
// The amount of documents with a ground truth occurrence.
int32 ground_truth_document_count = 11;
// The amount of true positives.
int32 true_positives_count = 6;
// The amount of false positives.
int32 false_positives_count = 7;
// The amount of false negatives.
int32 false_negatives_count = 8;
// The amount of documents that had an occurrence of this label.
int32 total_documents_count = 9;
}
// Evaluations metrics, at a specific confidence level.
message ConfidenceLevelMetrics {
// The confidence level.
float confidence_level = 1;
// The metrics at the specific confidence level.
Metrics metrics = 2;
}
// Metrics across multiple confidence levels.
message MultiConfidenceMetrics {
// A type that determines how metrics should be interpreted.
enum MetricsType {
// The metrics type is unspecified. By default, metrics without a
// particular specification are for leaf entity types (i.e., top-level
// entity types without child types, or child types which are not
// parent types themselves).
METRICS_TYPE_UNSPECIFIED = 0;
// Indicates whether metrics for this particular label type represent an
// aggregate of metrics for other types instead of being based on actual
// TP/FP/FN values for the label type. Metrics for parent (i.e., non-leaf)
// entity types are an aggregate of metrics for their children.
AGGREGATE = 1;
}
// Metrics across confidence levels with fuzzy matching enabled.
repeated ConfidenceLevelMetrics confidence_level_metrics = 1;
// Metrics across confidence levels with only exact matching.
repeated ConfidenceLevelMetrics confidence_level_metrics_exact = 4;
// The calculated area under the precision recall curve (AUPRC), computed by
// integrating over all confidence thresholds.
float auprc = 2;
// The Estimated Calibration Error (ECE) of the confidence of the predicted
// entities.
float estimated_calibration_error = 3;
// The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching
// only.
float auprc_exact = 5;
// The ECE for the predicted entities with fuzzy matching disabled, i.e.,
// exact matching only.
float estimated_calibration_error_exact = 6;
// The metrics type for the label.
MetricsType metrics_type = 7;
}
// A revision of the evaluation.
message EvaluationRevision {
// Output only. The revision ID of the evaluation.
string revision_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Counters for the documents used in the evaluation.
Counters document_counters = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Metrics for all the entities in aggregate.
MultiConfidenceMetrics all_entities_metrics = 3
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Metrics across confidence levels, for different entities.
map<string, MultiConfidenceMetrics> entity_metrics = 4
[(google.api.field_behavior) = OUTPUT_ONLY];
}
// The resource name of the evaluation.
// Format:
// `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}`
string name = 1;
// The time that the evaluation was created.
google.protobuf.Timestamp create_time = 2;
// Counters for the documents used in the evaluation.
Counters document_counters = 5;
// Metrics for all the entities in aggregate.
MultiConfidenceMetrics all_entities_metrics = 3;
// Metrics across confidence levels, for different entities.
map<string, MultiConfidenceMetrics> entity_metrics = 4;
// The KMS key name used for encryption.
string kms_key_name = 6;
// The KMS key version with which data is encrypted.
string kms_key_version_name = 7;
// Contains all revisions of the evaluation, excluding the latest one.
repeated EvaluationRevision revisions = 9;
}