evaluation_metrics
Creates, updates, deletes, gets or lists an evaluation_metrics resource.
Overview
| Name | evaluation_metrics |
| Type | Resource |
| Id | google.aiplatform.evaluation_metrics |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The resource name of the EvaluationMetric. Format: projects/{project}/locations/{location}/evaluationMetrics/{evaluation_metric} |
createTime | string (google-datetime) | Output only. The time when the EvaluationMetric was created. |
description | string | Optional. A description of the EvaluationMetric. |
displayName | string | Required. The user-friendly display name for the EvaluationMetric. |
encryptionSpec | object | Optional. Customer-managed encryption key spec for this EvaluationMetric. If set, this EvaluationMetric will be secured by this key. (id: GoogleCloudAiplatformV1EncryptionSpec) |
gcsUri | string | Optional. The Google Cloud Storage URI that stores the metric specification.. |
labels | object | Optional. Labels for the evaluation metric. |
metric | object | Optional. The metric configuration. Only LLMMetric and CustomCodeExecutionMetric are supported. (id: GoogleCloudAiplatformV1Metric) |
updateTime | string (google-datetime) | Output only. The time when the EvaluationMetric was last updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The resource name of the EvaluationMetric. Format: projects/{project}/locations/{location}/evaluationMetrics/{evaluation_metric} |
createTime | string (google-datetime) | Output only. The time when the EvaluationMetric was created. |
description | string | Optional. A description of the EvaluationMetric. |
displayName | string | Required. The user-friendly display name for the EvaluationMetric. |
encryptionSpec | object | Optional. Customer-managed encryption key spec for this EvaluationMetric. If set, this EvaluationMetric will be secured by this key. (id: GoogleCloudAiplatformV1EncryptionSpec) |
gcsUri | string | Optional. The Google Cloud Storage URI that stores the metric specification.. |
labels | object | Optional. Labels for the evaluation metric. |
metric | object | Optional. The metric configuration. Only LLMMetric and CustomCodeExecutionMetric are supported. (id: GoogleCloudAiplatformV1Metric) |
updateTime | string (google-datetime) | Output only. The time when the EvaluationMetric was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, evaluationMetricsId | Gets an EvaluationMetric. | |
list | select | projectsId, locationsId | pageToken, orderBy, filter, pageSize | Lists EvaluationMetrics. |
create | insert | projectsId, locationsId | evaluationMetricId | Creates an EvaluationMetric. |
delete | delete | projectsId, locationsId, evaluationMetricsId | Deletes an EvaluationMetric. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
evaluationMetricsId | string | |
locationsId | string | |
projectsId | string | |
evaluationMetricId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT examples
- get
- list
Gets an EvaluationMetric.
SELECT
name,
createTime,
description,
displayName,
encryptionSpec,
gcsUri,
labels,
metric,
updateTime
FROM google.aiplatform.evaluation_metrics
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND evaluationMetricsId = '{{ evaluationMetricsId }}' -- required
;
Lists EvaluationMetrics.
SELECT
name,
createTime,
description,
displayName,
encryptionSpec,
gcsUri,
labels,
metric,
updateTime
FROM google.aiplatform.evaluation_metrics
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageToken = '{{ pageToken }}'
AND orderBy = '{{ orderBy }}'
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
;
INSERT examples
- create
- Manifest
Creates an EvaluationMetric.
INSERT INTO google.aiplatform.evaluation_metrics (
data__metric,
data__labels,
data__gcsUri,
data__name,
data__encryptionSpec,
data__description,
data__displayName,
projectsId,
locationsId,
evaluationMetricId
)
SELECT
'{{ metric }}',
'{{ labels }}',
'{{ gcsUri }}',
'{{ name }}',
'{{ encryptionSpec }}',
'{{ description }}',
'{{ displayName }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ evaluationMetricId }}'
RETURNING
name,
createTime,
description,
displayName,
encryptionSpec,
gcsUri,
labels,
metric,
updateTime
;
# Description fields are for documentation purposes
- name: evaluation_metrics
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the evaluation_metrics resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the evaluation_metrics resource.
- name: metric
description: |
Optional. The metric configuration. Only LLMMetric and CustomCodeExecutionMetric are supported.
value:
pointwiseMetricSpec:
metricPromptTemplate: "{{ metricPromptTemplate }}"
systemInstruction: "{{ systemInstruction }}"
customOutputFormatConfig:
returnRawOutput: {{ returnRawOutput }}
bleuSpec:
useEffectiveOrder: {{ useEffectiveOrder }}
rougeSpec:
useStemmer: {{ useStemmer }}
rougeType: "{{ rougeType }}"
splitSummaries: {{ splitSummaries }}
exactMatchSpec: "{{ exactMatchSpec }}"
computationBasedMetricSpec:
type: "{{ type }}"
parameters: "{{ parameters }}"
predefinedMetricSpec:
metricSpecName: "{{ metricSpecName }}"
metricSpecParameters: "{{ metricSpecParameters }}"
metadata:
otherMetadata: "{{ otherMetadata }}"
title: "{{ title }}"
scoreRange:
min: {{ min }}
step: {{ step }}
description: "{{ description }}"
max: {{ max }}
customCodeExecutionSpec:
evaluationFunction: "{{ evaluationFunction }}"
pairwiseMetricSpec:
systemInstruction: "{{ systemInstruction }}"
baselineResponseFieldName: "{{ baselineResponseFieldName }}"
candidateResponseFieldName: "{{ candidateResponseFieldName }}"
metricPromptTemplate: "{{ metricPromptTemplate }}"
customOutputFormatConfig:
returnRawOutput: {{ returnRawOutput }}
aggregationMetrics:
- "{{ aggregationMetrics }}"
llmBasedMetricSpec:
systemInstruction: "{{ systemInstruction }}"
judgeAutoraterConfig:
samplingCount: {{ samplingCount }}
flipEnabled: {{ flipEnabled }}
autoraterModel: "{{ autoraterModel }}"
generationConfig:
speechConfig:
languageCode: "{{ languageCode }}"
multiSpeakerVoiceConfig: "{{ multiSpeakerVoiceConfig }}"
voiceConfig: "{{ voiceConfig }}"
seed: {{ seed }}
imageConfig:
personGeneration: "{{ personGeneration }}"
aspectRatio: "{{ aspectRatio }}"
imageSize: "{{ imageSize }}"
prominentPeople: "{{ prominentPeople }}"
imageOutputOptions: "{{ imageOutputOptions }}"
audioTranscriptionConfig:
customVocabulary: "{{ customVocabulary }}"
languageHints: "{{ languageHints }}"
diarization: {{ diarization }}
adaptationPhrases: "{{ adaptationPhrases }}"
languageAuto: "{{ languageAuto }}"
wordTimestamp: {{ wordTimestamp }}
maxOutputTokens: {{ maxOutputTokens }}
responseModalities:
- "{{ responseModalities }}"
topP: {{ topP }}
responseJsonSchema: "{{ responseJsonSchema }}"
responseFormat:
- audio:
mimeType: "{{ mimeType }}"
bitRate: {{ bitRate }}
delivery: "{{ delivery }}"
sampleRate: {{ sampleRate }}
text:
mimeType: "{{ mimeType }}"
schema: "{{ schema }}"
image:
mimeType: "{{ mimeType }}"
delivery: "{{ delivery }}"
aspectRatio: "{{ aspectRatio }}"
imageSize: "{{ imageSize }}"
video:
delivery: "{{ delivery }}"
aspectRatio: "{{ aspectRatio }}"
gcsUri: "{{ gcsUri }}"
duration: "{{ duration }}"
thinkingConfig:
includeThoughts: {{ includeThoughts }}
thinkingLevel: "{{ thinkingLevel }}"
thinkingBudget: {{ thinkingBudget }}
enableAffectiveDialog: {{ enableAffectiveDialog }}
topK: {{ topK }}
logprobs: {{ logprobs }}
presencePenalty: {{ presencePenalty }}
candidateCount: {{ candidateCount }}
responseSchema:
ref: "{{ ref }}"
enum: "{{ enum }}"
minLength: "{{ minLength }}"
title: "{{ title }}"
minimum: {{ minimum }}
maxProperties: "{{ maxProperties }}"
properties: "{{ properties }}"
nullable: {{ nullable }}
example: "{{ example }}"
minProperties: "{{ minProperties }}"
type: "{{ type }}"
pattern: "{{ pattern }}"
additionalProperties: "{{ additionalProperties }}"
format: "{{ format }}"
propertyOrdering: "{{ propertyOrdering }}"
minItems: "{{ minItems }}"
maximum: {{ maximum }}
maxLength: "{{ maxLength }}"
items: "{{ items }}"
description: "{{ description }}"
required: "{{ required }}"
maxItems: "{{ maxItems }}"
defs: "{{ defs }}"
anyOf: "{{ anyOf }}"
default: "{{ default }}"
routingConfig:
manualMode: "{{ manualMode }}"
autoMode: "{{ autoMode }}"
audioTimestamp: {{ audioTimestamp }}
temperature: {{ temperature }}
stopSequences:
- "{{ stopSequences }}"
responseLogprobs: {{ responseLogprobs }}
responseMimeType: "{{ responseMimeType }}"
mediaResolution: "{{ mediaResolution }}"
frequencyPenalty: {{ frequencyPenalty }}
rubricGroupKey: "{{ rubricGroupKey }}"
resultParserConfig:
customCodeParserConfig:
parsingFunction: "{{ parsingFunction }}"
predefinedRubricGenerationSpec:
metricSpecName: "{{ metricSpecName }}"
metricSpecParameters: "{{ metricSpecParameters }}"
metricPromptTemplate: "{{ metricPromptTemplate }}"
rubricGenerationSpec:
promptTemplate: "{{ promptTemplate }}"
modelConfig:
samplingCount: {{ samplingCount }}
flipEnabled: {{ flipEnabled }}
autoraterModel: "{{ autoraterModel }}"
generationConfig:
speechConfig: "{{ speechConfig }}"
seed: {{ seed }}
imageConfig: "{{ imageConfig }}"
audioTranscriptionConfig: "{{ audioTranscriptionConfig }}"
maxOutputTokens: {{ maxOutputTokens }}
responseModalities: "{{ responseModalities }}"
topP: {{ topP }}
responseJsonSchema: "{{ responseJsonSchema }}"
responseFormat: "{{ responseFormat }}"
thinkingConfig: "{{ thinkingConfig }}"
enableAffectiveDialog: {{ enableAffectiveDialog }}
topK: {{ topK }}
logprobs: {{ logprobs }}
presencePenalty: {{ presencePenalty }}
candidateCount: {{ candidateCount }}
responseSchema: "{{ responseSchema }}"
routingConfig: "{{ routingConfig }}"
audioTimestamp: {{ audioTimestamp }}
temperature: {{ temperature }}
stopSequences: "{{ stopSequences }}"
responseLogprobs: {{ responseLogprobs }}
responseMimeType: "{{ responseMimeType }}"
mediaResolution: "{{ mediaResolution }}"
frequencyPenalty: {{ frequencyPenalty }}
rubricTypeOntology:
- "{{ rubricTypeOntology }}"
rubricContentType: "{{ rubricContentType }}"
additionalConfig: "{{ additionalConfig }}"
- name: labels
value: "{{ labels }}"
description: |
Optional. Labels for the evaluation metric.
- name: gcsUri
value: "{{ gcsUri }}"
description: |
Optional. The Google Cloud Storage URI that stores the metric specification..
- name: name
value: "{{ name }}"
description: |
Identifier. The resource name of the EvaluationMetric. Format: `projects/{project}/locations/{location}/evaluationMetrics/{evaluation_metric}`
- name: encryptionSpec
description: |
Optional. Customer-managed encryption key spec for this EvaluationMetric. If set, this EvaluationMetric will be secured by this key.
value:
kmsKeyName: "{{ kmsKeyName }}"
- name: description
value: "{{ description }}"
description: |
Optional. A description of the EvaluationMetric.
- name: displayName
value: "{{ displayName }}"
description: |
Required. The user-friendly display name for the EvaluationMetric.
- name: evaluationMetricId
value: "{{ evaluationMetricId }}"
DELETE examples
- delete
Deletes an EvaluationMetric.
DELETE FROM google.aiplatform.evaluation_metrics
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND evaluationMetricsId = '{{ evaluationMetricsId }}' --required
;