Skip to content

Retrieve Information About an Existing Evaluation Test Case

client.Agents.EvaluationTestCases.Get(ctx, testCaseUuid, query) (*AgentEvaluationTestCaseGetResponse, error)
get/v2/gen-ai/evaluation_test_cases/{test_case_uuid}

To retrive information about an existing evaluation test case, send a GET request to /v2/gen-ai/evaluation_test_case/{test_case_uuid}.

ParametersExpand Collapse
testCaseUuid string
query AgentEvaluationTestCaseGetParams
EvaluationTestCaseVersion param.Field[int64]optional

Version of the test case.

ReturnsExpand Collapse
type AgentEvaluationTestCaseGetResponse struct{…}
EvaluationTestCase APIEvaluationTestCaseoptional
ArchivedAt Timeoptional
formatdate-time
CreatedAt Timeoptional
formatdate-time
CreatedByUserEmail stringoptional
CreatedByUserID stringoptional
formatuint64
Dataset APIEvaluationTestCaseDatasetoptional
CreatedAt Timeoptional

Time created at.

formatdate-time
DatasetName stringoptional

Name of the dataset.

DatasetUuid stringoptional

UUID of the dataset.

FileSize stringoptional

The size of the dataset uploaded file in bytes.

formatuint64
HasGroundTruth booloptional

Does the dataset have a ground truth column?

RowCount int64optional

Number of rows in the dataset.

formatint64
DatasetName stringoptional
DatasetUuid stringoptional
Description stringoptional
LatestVersionNumberOfRuns int64optional
formatint32
Metrics []APIEvaluationMetricoptional
Category APIEvaluationMetricCategoryoptional
Accepts one of the following:
const APIEvaluationMetricCategoryMetricCategoryUnspecified APIEvaluationMetricCategory = "METRIC_CATEGORY_UNSPECIFIED"
const APIEvaluationMetricCategoryMetricCategoryCorrectness APIEvaluationMetricCategory = "METRIC_CATEGORY_CORRECTNESS"
const APIEvaluationMetricCategoryMetricCategoryUserOutcomes APIEvaluationMetricCategory = "METRIC_CATEGORY_USER_OUTCOMES"
const APIEvaluationMetricCategoryMetricCategorySafetyAndSecurity APIEvaluationMetricCategory = "METRIC_CATEGORY_SAFETY_AND_SECURITY"
const APIEvaluationMetricCategoryMetricCategoryContextQuality APIEvaluationMetricCategory = "METRIC_CATEGORY_CONTEXT_QUALITY"
const APIEvaluationMetricCategoryMetricCategoryModelFit APIEvaluationMetricCategory = "METRIC_CATEGORY_MODEL_FIT"
Description stringoptional
Inverted booloptional

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

IsMetricGoal booloptional
MetricName stringoptional
MetricRank int64optional
formatint64
MetricType APIEvaluationMetricMetricTypeoptional
Accepts one of the following:
const APIEvaluationMetricMetricTypeMetricTypeUnspecified APIEvaluationMetricMetricType = "METRIC_TYPE_UNSPECIFIED"
const APIEvaluationMetricMetricTypeMetricTypeGeneralQuality APIEvaluationMetricMetricType = "METRIC_TYPE_GENERAL_QUALITY"
const APIEvaluationMetricMetricTypeMetricTypeRagAndTool APIEvaluationMetricMetricType = "METRIC_TYPE_RAG_AND_TOOL"
MetricUuid stringoptional
MetricValueType APIEvaluationMetricMetricValueTypeoptional
Accepts one of the following:
const APIEvaluationMetricMetricValueTypeMetricValueTypeUnspecified APIEvaluationMetricMetricValueType = "METRIC_VALUE_TYPE_UNSPECIFIED"
const APIEvaluationMetricMetricValueTypeMetricValueTypeNumber APIEvaluationMetricMetricValueType = "METRIC_VALUE_TYPE_NUMBER"
const APIEvaluationMetricMetricValueTypeMetricValueTypeString APIEvaluationMetricMetricValueType = "METRIC_VALUE_TYPE_STRING"
const APIEvaluationMetricMetricValueTypeMetricValueTypePercentage APIEvaluationMetricMetricValueType = "METRIC_VALUE_TYPE_PERCENTAGE"
RangeMax float64optional

The maximum value for the metric.

formatfloat
RangeMin float64optional

The minimum value for the metric.

formatfloat
Name stringoptional
StarMetric APIStarMetricoptional
MetricUuid stringoptional
Name stringoptional
SuccessThreshold float64optional

The success threshold for the star metric. This is a value that the metric must reach to be considered successful.

formatfloat
SuccessThresholdPct int64optional

The success threshold for the star metric. This is a percentage value between 0 and 100.

formatint32
TestCaseUuid stringoptional
TotalRuns int64optional
formatint32
UpdatedAt Timeoptional
formatdate-time
UpdatedByUserEmail stringoptional
UpdatedByUserID stringoptional
formatuint64
Version int64optional
formatint64
Retrieve Information About an Existing Evaluation Test Case
package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/-go"
  "github.com/stainless-sdks/-go/option"
)

func main() {
  client := gradient.NewClient(
    option.WithAccessToken("My Access Token"),
  )
  evaluationTestCase, err := client.Agents.EvaluationTestCases.Get(
    context.TODO(),
    `"123e4567-e89b-12d3-a456-426614174000"`,
    gradient.AgentEvaluationTestCaseGetParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", evaluationTestCase.EvaluationTestCase)
}
{
  "evaluation_test_case": {
    "archived_at": "2023-01-01T00:00:00Z",
    "created_at": "2023-01-01T00:00:00Z",
    "created_by_user_email": "example@example.com",
    "created_by_user_id": "12345",
    "dataset": {
      "created_at": "2023-01-01T00:00:00Z",
      "dataset_name": "example name",
      "dataset_uuid": "123e4567-e89b-12d3-a456-426614174000",
      "file_size": "12345",
      "has_ground_truth": true,
      "row_count": 123
    },
    "dataset_name": "example name",
    "dataset_uuid": "123e4567-e89b-12d3-a456-426614174000",
    "description": "example string",
    "latest_version_number_of_runs": 123,
    "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
      }
    ],
    "name": "example name",
    "star_metric": {
      "metric_uuid": "123e4567-e89b-12d3-a456-426614174000",
      "name": "example name",
      "success_threshold": 123,
      "success_threshold_pct": 123
    },
    "test_case_uuid": "123e4567-e89b-12d3-a456-426614174000",
    "total_runs": 123,
    "updated_at": "2023-01-01T00:00:00Z",
    "updated_by_user_email": "example@example.com",
    "updated_by_user_id": "12345",
    "version": 123
  }
}
Returns Examples
{
  "evaluation_test_case": {
    "archived_at": "2023-01-01T00:00:00Z",
    "created_at": "2023-01-01T00:00:00Z",
    "created_by_user_email": "example@example.com",
    "created_by_user_id": "12345",
    "dataset": {
      "created_at": "2023-01-01T00:00:00Z",
      "dataset_name": "example name",
      "dataset_uuid": "123e4567-e89b-12d3-a456-426614174000",
      "file_size": "12345",
      "has_ground_truth": true,
      "row_count": 123
    },
    "dataset_name": "example name",
    "dataset_uuid": "123e4567-e89b-12d3-a456-426614174000",
    "description": "example string",
    "latest_version_number_of_runs": 123,
    "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
      }
    ],
    "name": "example name",
    "star_metric": {
      "metric_uuid": "123e4567-e89b-12d3-a456-426614174000",
      "name": "example name",
      "success_threshold": 123,
      "success_threshold_pct": 123
    },
    "test_case_uuid": "123e4567-e89b-12d3-a456-426614174000",
    "total_runs": 123,
    "updated_at": "2023-01-01T00:00:00Z",
    "updated_by_user_email": "example@example.com",
    "updated_by_user_id": "12345",
    "version": 123
  }
}