UpdateEvaluator

Updated at:

Updates 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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

agentloop:UpdateEvaluator

update

*Evaluator

acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluator/{#EvaluatorName}

None None

Request syntax

PUT /api/v1/evaluators/{agentSpace}/{name} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

agentSpace

string

Yes

The name of the AgentSpace.

prod-agentspace

name

string

Yes

The name of the evaluator.

trace_task_completion

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body. Updates the evaluator attributes when version is not specified, and creates a new evaluator version when version is specified.

{"displayName":"Pipeline Task Completion","version":"1.1.0","config":{"prompt":"Please evaluate the task completion more strictly"}}

displayName

string

No

The display name.

Pipeline Task Completion

description

string

No

The description of the evaluator.

Determines whether the agent has completed the user task

version

string

No

The new version number. A new version is created when this parameter is specified.

1.1.0

versionDescription

string

No

The version description.

Optimized scoring instructions

config

object

No

The configuration for the new version. This parameter is typically required when version is specified.

{"prompt":"Please evaluate the task completion more strictly"}

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"}

status

string

No

The status of the evaluator version to be written. Only DRAFT is supported when explicitly specified. To publish a draft, call UpdateEvaluatorVersionStatus.

DRAFT

createVersion

boolean

No

Specifies whether to create a new draft. A value of true creates a new draft, and a value of false updates a specified existing draft. When this parameter is specified, the version status defaults to DRAFT.

true

skills

array<object>

No

The complete list of business skills saved for the standard agent evaluator in this request. Pass an empty array to clear the business skills for this version.

[{"skillName":"fact-check","files":[{"name":"SKILL.md","content":"---\nname: fact-check\ndescription: Verify factual basis in responses\n---\nVerify the facts in the response item by item and list the basis."}]}]

array<object>

No

A business skill included in this version.

{"skillName":"fact-check","files":[{"name":"SKILL.md","content":"---\nname: fact-check\ndescription: Verify factual basis in responses\n---\nVerify the facts in the response item by item and list the basis."}]}

skillName

string

No

The name of the skill, which must be unique within the list of skills submitted in this request.

fact-check

displayName

string

No

The display name of the skill.

Fact checking

description

string

No

The description of the skill purpose.

Verify the factual basis in the response

enable

boolean

No

Specifies whether to enable the skill. Default value: true.

true

files

array<object>

No

The complete list of files for the skill, which must include SKILL.md in the root directory.

[{"name":"SKILL.md","content":"---\nname: fact-check\ndescription: Verify factual basis in responses\n---\nVerify the facts in the response item by item and list the basis."}]

object

No

A file in the skill.

{"name":"SKILL.md","content":"---\nname: fact-check\ndescription: Verify factual basis in responses\n---\nVerify the facts in the response item by item and list the basis."}

name

string

No

The path of the file relative to the root directory of the skill.

SKILL.md

content

string

No

The text content of the file.

--- name: fact-check description: Verify the factual basis in the response --- Verify the facts in the response item by item and list the basis

clientToken

string

No

The idempotency token. CloudSpec declares this query parameter, 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

Examples

Success response

JSON format

{
  "requestId": "3FE4CD1E-FF41-56BE-B590-7A021D9C1524"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.