NAME

Google::Cloud::Discoveryengine::V1alpha::Evaluation - Compiled Protocol Buffers messages for google/cloud/discoveryengine/v1alpha/evaluation.proto

SYNOPSIS

use Google::Cloud::Discoveryengine::V1alpha::Evaluation;

my $msg = Google::Cloud::Discoveryengine::V1alpha::Evaluation::Evaluation->new({
    name => $name,
    evaluation_spec => $evaluation_spec,
    quality_metrics => $quality_metrics,
    state => $state,
});

# Read or update a field
my $val = $msg->name();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Cloud::Discoveryengine::V1alpha::Evaluation::Evaluation->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/discoveryengine/v1alpha/evaluation.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Cloud::Discoveryengine::V1alpha::Evaluation::Evaluation

An evaluation is a single execution (or run) of an evaluation process. It encapsulates the state of the evaluation and the resulting data.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Identifier. The full resource name of the [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation], in the format of `projects/{project}/locations/{location}/evaluations/{evaluation}`.

    This field must be a UTF-8 encoded string with a length limit of 1024 characters.

  • $msg->evaluation_spec() / $msg->evaluation_spec($value)

    Type: Message (Google::Cloud::Discoveryengine::V1alpha::Evaluation::Evaluation::EvaluationSpec)

    Required. The specification of the evaluation.

  • $msg->quality_metrics() / $msg->quality_metrics($value)

    Type: Message (Google::Cloud::Discoveryengine::V1alpha::Evaluation::QualityMetrics)

    Output only. The metrics produced by the evaluation, averaged across all [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s in the [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet].

    Only populated when the evaluation's state is SUCCEEDED.

  • $msg->state() / $msg->state($value)

    Type: Enum (Google::Cloud::Discoveryengine::V1alpha::Evaluation::State)

    Output only. The state of the evaluation.

  • $msg->error() / $msg->error($value)

    Type: Message (Google::Rpc::Status::Status)

    Output only. The error that occurred during evaluation. Only populated when the evaluation's state is FAILED.

  • $msg->create_time() / $msg->create_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    Output only. Timestamp the [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation] was created at.

  • $msg->end_time() / $msg->end_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    Output only. Timestamp the [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation] was completed at.

  • $msg->error_samples() / $msg->error_samples($value)

    Type: Message (Google::Rpc::Status::Status)

    Output only. A sample of errors encountered while processing the request.

Enum: Evaluation::State

  • STATE_UNSPECIFIED => 0

  • PENDING => 1

  • RUNNING => 2

  • SUCCEEDED => 3

  • FAILED => 4

Google::Cloud::Discoveryengine::V1alpha::Evaluation::QualityMetrics

Describes the metrics produced by the evaluation.

Inherits from Protobuf::Message.

Accessors

  • $msg->doc_recall() / $msg->doc_recall($value)

    Type: Message (Google::Cloud::Discoveryengine::V1alpha::Evaluation::QualityMetrics::TopkMetrics)

    Recall per document, at various top-k cutoff levels.

    Recall is the fraction of relevant documents retrieved out of all relevant documents.

    Example (top-5): * For a single [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], If 3 out of 5 relevant documents are retrieved in the top-5, recall@5 = 3/5 = 0.6

  • $msg->doc_precision() / $msg->doc_precision($value)

    Type: Message (Google::Cloud::Discoveryengine::V1alpha::Evaluation::QualityMetrics::TopkMetrics)

    Precision per document, at various top-k cutoff levels.

    Precision is the fraction of retrieved documents that are relevant.

    Example (top-5): * For a single [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], If 4 out of 5 retrieved documents in the top-5 are relevant, precision@5 = 4/5 = 0.8

  • $msg->doc_ndcg() / $msg->doc_ndcg($value)

    Type: Message (Google::Cloud::Discoveryengine::V1alpha::Evaluation::QualityMetrics::TopkMetrics)

    Normalized discounted cumulative gain (NDCG) per document, at various top-k cutoff levels.

    NDCG measures the ranking quality, giving higher relevance to top results.

    Example (top-3): Suppose [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] with three retrieved documents (D1, D2, D3) and binary relevance judgements (1 for relevant, 0 for not relevant):

    Retrieved:  [D3 (0), D1 (1), D2 (1)]
    Ideal:      [D1 (1), D2 (1), D3 (0)]
    
    Calculate NDCG@3 for each
    [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]:
     * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13
     * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63
     * NDCG@3: 1.13/1.63 = 0.693
  • $msg->page_recall() / $msg->page_recall($value)

    Type: Message (Google::Cloud::Discoveryengine::V1alpha::Evaluation::QualityMetrics::TopkMetrics)

    Recall per page, at various top-k cutoff levels.

    Recall is the fraction of relevant pages retrieved out of all relevant pages.

    Example (top-5): * For a single [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], if 3 out of 5 relevant pages are retrieved in the top-5, recall@5 = 3/5 = 0.6

  • $msg->page_ndcg() / $msg->page_ndcg($value)

    Type: Message (Google::Cloud::Discoveryengine::V1alpha::Evaluation::QualityMetrics::TopkMetrics)

    Normalized discounted cumulative gain (NDCG) per page, at various top-k cutoff levels.

    NDCG measures the ranking quality, giving higher relevance to top results.

    Example (top-3): Suppose [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] with three retrieved pages (P1, P2, P3) and binary relevance judgements (1 for relevant, 0 for not relevant):

    Retrieved:  [P3 (0), P1 (1), P2 (1)]
    Ideal:      [P1 (1), P2 (1), P3 (0)]
    
    Calculate NDCG@3 for
    [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]:
     * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13
     * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63
     * NDCG@3: 1.13/1.63 = 0.693

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Discoveryengine::V1alpha::Evaluation::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.