CreateEvaluator

Updated at:

Creates an evaluator.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /api/v1/evaluators/{agentSpace} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

agentSpace

string

Yes

The AgentSpace name.

prod-agentspace

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body.

{"name":"trace_task_completion","displayName":"链路任务完成度","type":"AGENT","metricName":"agent_task_completion","version":"1.0.0"}

name

string

Yes

The evaluator name. The name cannot start with a system-reserved prefix and can be up to 128 characters in length.

trace_task_completion

displayName

string

No

The display name. The name can be up to 128 characters in length.

链路任务完成度

type

string

Yes

The evaluator type. Valid values:

  • LLM: an inner join large language model evaluation evaluator.

  • AGENT: a StarOps digital human evaluator.

  • CODE: a code evaluator.

Valid values:

  • AGENT :

    AGENT

  • CODE :

    CODE

  • LLM :

    LLM

AGENT

description

string

No

The evaluator description. The description can be up to 256 characters in length.

判断 Agent 是否完成用户任务

metricName

string

Yes

The evaluation metric name.

agent_task_completion

version

string

Yes

The initial version number.

1.0.0

versionDescription

string

No

The version description.

初始版本

config

object

No

The evaluator configuration. For LLM/AGENT evaluators, this typically contains prompt, variables, and outputSchema. For CODE evaluators, this typically contains codeType, faasConfig, variables, and parameters.

{"prompt":"请评估任务完成度","variables":[{"name":"input"}]}

annotations

array

No

The list of annotation tags.

["__en"]

string

No

A single annotation tag.

__en

properties

object

No

The evaluator properties.

{"agentEvaluatorMode":"raw_prompt"}

clientToken

string

No

The idempotency token. A unique string generated by the client to ensure idempotent creation. This query parameter is declared in CloudSpec, but the backend does not currently perform idempotency checks.

a1b2c3d4-1234-5678-90ab-cdef12345678

Response elements

Element

Type

Description

Example

object

Schema of Response

requestId

string

The request ID.

3FE4CD1E-FF41-56BE-B590-7A021D9C1524

name

string

The evaluator name.

trace_task_completion

version

string

The version number that is created.

1.0.0

Examples

Success response

JSON format

{
  "requestId": "3FE4CD1E-FF41-56BE-B590-7A021D9C1524",
  "name": "trace_task_completion",
  "version": "1.0.0"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.