Skip to content

Create Evaluation Test Case.

client.Agents.EvaluationTestCases.New(ctx, body) (*AgentEvaluationTestCaseNewResponse, error)
post/v2/gen-ai/evaluation_test_cases

To create an evaluation test-case send a POST request to /v2/gen-ai/evaluation_test_cases.

ParametersExpand Collapse
body AgentEvaluationTestCaseNewParams
AgentWorkspaceName param.Field[string]optional
DatasetUuid param.Field[string]optional

Dataset against which the test‑case is executed.

Description param.Field[string]optional

Description of the test case.

Metrics param.Field[[]string]optional

Full metric list to use for evaluation test case.

Name param.Field[string]optional

Name of the test case.

StarMetric param.Field[APIStarMetric]optional
WorkspaceUuid param.Field[string]optional

The workspace uuid.

ReturnsExpand Collapse
type AgentEvaluationTestCaseNewResponse struct{…}
TestCaseUuid stringoptional

Test‑case UUID.

Create 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.New(context.TODO(), gradient.AgentEvaluationTestCaseNewParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", evaluationTestCase.TestCaseUuid)
}
{
  "test_case_uuid": "123e4567-e89b-12d3-a456-426614174000"
}
Returns Examples
{
  "test_case_uuid": "123e4567-e89b-12d3-a456-426614174000"
}