UpdateExperimentPlan

Updated at:

Updates an experiment plan.

Operation description

Updates a specified experiment plan. Unspecified fields remain unchanged. Only plans created by the current account can be updated.

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:UpdateExperimentPlan

update

*Workspace

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

None None

Request syntax

PUT /api/v1/experiments/{agentSpace}/plans/{planId} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

agentSpace

string

No

The name of the AgentSpace.

al-playground-cn-hongkong

planId

string

No

The ID of the experiment plan.

exp-plan-e95bff54685a4ae29ff3a834c1008a71

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body. Unspecified fields remain unchanged.

{"planName": "rca_benchmark_eval_experiment", "description": "", "datasetId": "rca_benckmark_eval", "selectedItemIds": [], "querySql": "", "evaluators": [{"variableMapping": {"output": "experiment_output", "input": "experiment_input", "expected_output": "dataset.ground_truth_json"}, "evaluatorRef": "Builtin.agent_correctness", "name": "Builtin.agent_correctness", "filters": {"query": "", "sample": "100"}, "type": "AGENT", "config": {"variables": [], "prompt": ""}, "resultType": "score", "resultName": "Builtin.agent_correctness"}, {"variableMapping": {"output": "experiment_output", "input": "experiment_input", "question": "dataset.question", "expected_output": "dataset.ground_truth_json", "payload_json": "dataset.payload_json"}, "evaluatorRef": "rca-toxicity-safety-accuracy", "name": "rca-toxicity-safety-accuracy", "filters": {"query": "", "sample": "100"}, "type": "AGENT", "config": {"variables": [], "prompt": ""}, "resultType": "score", "resultName": "rca-toxicity-safety-accuracy"}]}

planName

string

No

The name of the experiment plan.

rca_benchmark_eval_experiment

experimentType

string

No

The type of the experiment.

Valid values:

  • OFFLINE :

    OFFLINE

  • ONLINE :

    ONLINE

OFFLINE

description

string

No

The description.

rca_benchmark_eval_experiment offline experiment

datasetId

string

No

The ID of the associated dataset.

rca_benckmark_eval

datasetProject

string

No

Optional.

agentspace-project

experiments

array

No

The list of experiment configurations. When passed, the entire list is replaced. The number of items must be between 1 and 5.

[{"label": "A", "name": "baseline", "modelName": "qwen-max"}]

ExperimentConfig

No

The configuration of a single experiment group.

{"label":"A","name":"baseline","modelName":"qwen-max"}

evaluators

array

No

The list of evaluators. If omitted, the list is not modified. If an empty array is passed, the list is cleared.

[{"evaluatorRef": "Builtin.agent_task_completion"}]

Evaluator

No

A single evaluator configuration object.

{"evaluatorRef":"Builtin.agent_task_completion"}

selectedItemIds

array

No

The list of selected data item IDs in partial dataset mode. If an empty array is passed, the list is cleared.

[]

string

No

The ID of a single data item in the dataset.

a1b2c3d4-e5f6-7890-abcd-ef1234567890

querySql

string

No

The custom query SQL clause in partial dataset mode.

level > 2

pipelineName

string

No

The name of the associated data processing pipeline. This parameter is optional. If this parameter is not specified, the pipeline is not updated. If an empty character string is specified, the association is dissociated. After the association, when an experiment under this plan executes and completes writing experiment results to the Logstore, the system filters by the traceId of the current experiment trace and invokes PreviewPipeline to write the results processed by the pipeline.

my-pipeline

input

object

No

Optional.

{"question": "How do I request a refund?"}

Request example (update the dataset and evaluators of an offline plan)

{
  "planName": "rca_benchmark_eval_experiment",
  "description": "",
  "datasetId": "rca_benckmark_eval",
  "selectedItemIds": [],
  "querySql": "",
  "evaluators": [
    {
      "variableMapping": {
        "output": "experiment_output",
        "input": "experiment_input",
        "expected_output": "dataset.ground_truth_json"
      },
      "evaluatorRef": "Builtin.agent_correctness",
      "name": "Builtin.agent_correctness",
      "filters": {
        "query": "",
        "sample": "100"
      },
      "type": "AGENT",
      "config": {
        "variables": [],
        "prompt": ""
      },
      "resultType": "score",
      "resultName": "Builtin.agent_correctness"
    },
    {
      "variableMapping": {
        "output": "experiment_output",
        "input": "experiment_input",
        "question": "dataset.question",
        "expected_output": "dataset.ground_truth_json",
        "payload_json": "dataset.payload_json"
      },
      "evaluatorRef": "rca-toxicity-safety-accuracy",
      "name": "rca-toxicity-safety-accuracy",
      "filters": {
        "query": "",
        "sample": "100"
      },
      "type": "AGENT",
      "config": {
        "variables": [],
        "prompt": ""
      },
      "resultType": "score",
      "resultName": "rca-toxicity-safety-accuracy"
    }
  ]
}

Response elements

Element

Type

Description

Example

object

The update experiment plan response.

{"requestId":"3FE4CD1E-FF41-56BE-B590-7A021D9C1524","planId":"exp-plan-e95bff54685a4ae29ff3a834c1008a71","status":"updated","message":"Experiment plan updated successfully"}

requestId

string

The request ID.

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

planId

string

The ID of the experiment plan.

exp-plan-e95bff54685a4ae29ff3a834c1008a71

status

string

The update result. A value of updated indicates success.

updated

message

string

The message.

Experiment plan updated successfully

To view the complete updated configuration, call GetExperimentPlan.

{
  "planId": "exp-plan-e95bff54685a4ae29ff3a834c1008a71",
  "status": "updated"
}

Examples

Success response

JSON format

{
  "requestId": "3FE4CD1E-FF41-56BE-B590-7A021D9C1524",
  "planId": "exp-plan-e95bff54685a4ae29ff3a834c1008a71",
  "status": "updated",
  "message": "Experiment plan updated successfully"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.