Skip to content

List Evaluation Metrics

get/v2/gen-ai/evaluation_metrics

To list all evaluation metrics, send a GET request to /v2/gen-ai/evaluation_metrics.

ReturnsExpand Collapse
metrics: optional array of APIEvaluationMetric { category, description, inverted, 8 more }
category: optional "METRIC_CATEGORY_UNSPECIFIED" or "METRIC_CATEGORY_CORRECTNESS" or "METRIC_CATEGORY_USER_OUTCOMES" or 3 more
Accepts one of the following:
"METRIC_CATEGORY_UNSPECIFIED"
"METRIC_CATEGORY_CORRECTNESS"
"METRIC_CATEGORY_USER_OUTCOMES"
"METRIC_CATEGORY_SAFETY_AND_SECURITY"
"METRIC_CATEGORY_CONTEXT_QUALITY"
"METRIC_CATEGORY_MODEL_FIT"
description: optional string
inverted: optional boolean

If true, the metric is inverted, meaning that a lower value is better.

is_metric_goal: optional boolean
metric_name: optional string
metric_rank: optional number
formatint64
metric_type: optional "METRIC_TYPE_UNSPECIFIED" or "METRIC_TYPE_GENERAL_QUALITY" or "METRIC_TYPE_RAG_AND_TOOL"
Accepts one of the following:
"METRIC_TYPE_UNSPECIFIED"
"METRIC_TYPE_GENERAL_QUALITY"
"METRIC_TYPE_RAG_AND_TOOL"
metric_uuid: optional string
metric_value_type: optional "METRIC_VALUE_TYPE_UNSPECIFIED" or "METRIC_VALUE_TYPE_NUMBER" or "METRIC_VALUE_TYPE_STRING" or "METRIC_VALUE_TYPE_PERCENTAGE"
Accepts one of the following:
"METRIC_VALUE_TYPE_UNSPECIFIED"
"METRIC_VALUE_TYPE_NUMBER"
"METRIC_VALUE_TYPE_STRING"
"METRIC_VALUE_TYPE_PERCENTAGE"
range_max: optional number

The maximum value for the metric.

formatfloat
range_min: optional number

The minimum value for the metric.

formatfloat
List Evaluation Metrics
curl https://api.digitalocean.com/v2/gen-ai/evaluation_metrics \
    -H "Authorization: Bearer $DIGITALOCEAN_ACCESS_TOKEN"
{
  "metrics": [
    {
      "category": "METRIC_CATEGORY_UNSPECIFIED",
      "description": "example string",
      "inverted": true,
      "is_metric_goal": true,
      "metric_name": "example name",
      "metric_rank": 123,
      "metric_type": "METRIC_TYPE_UNSPECIFIED",
      "metric_uuid": "123e4567-e89b-12d3-a456-426614174000",
      "metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED",
      "range_max": 123,
      "range_min": 123
    }
  ]
}
Returns Examples
{
  "metrics": [
    {
      "category": "METRIC_CATEGORY_UNSPECIFIED",
      "description": "example string",
      "inverted": true,
      "is_metric_goal": true,
      "metric_name": "example name",
      "metric_rank": 123,
      "metric_type": "METRIC_TYPE_UNSPECIFIED",
      "metric_uuid": "123e4567-e89b-12d3-a456-426614174000",
      "metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED",
      "range_max": 123,
      "range_min": 123
    }
  ]
}