UpdateExperimentPlan - 更新实验计划

更新时间:
复制 MD 格式

更新实验计划。

接口说明

调用 UpdateExperimentPlan 更新指定实验计划。未传字段保持不变。仅可更新当前账号创建的计划。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

agentloop:UpdateExperimentPlan

update

*Workspace

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

请求语法

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

路径参数

名称

类型

必填

描述

示例值

agentSpace

string

AgentSpace 名称。

al-playground-cn-hongkong

planId

string

实验计划 ID。

exp-plan-e95bff54685a4ae29ff3a834c1008a71

请求参数

名称

类型

必填

描述

示例值

body

object

请求体。未传字段保持不变。

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

实验计划名称。

rca_benchmark_eval_experiment

experimentType

string

实验类型。

枚举值:

  • OFFLINE :

    OFFLINE

  • ONLINE :

    ONLINE

OFFLINE

description

string

描述信息。

rca_benchmark_eval_experiment 离线实验

datasetId

string

关联的数据集 ID。

rca_benckmark_eval

datasetProject

string

可选。

agentspace-project

experiments

array

实验配置列表。传入时整体替换,数量须为 1-5。

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

ExperimentConfig

单个实验分组配置。

evaluators

array

评估器列表。省略表示不修改;传空数组表示清空。

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

Evaluator

单个评估器配置对象。

selectedItemIds

array

部分数据集模式下选定的数据项 ID 列表。传空数组表示清空。

[]

string

数据集中的单条数据项 ID。

a1b2c3d4-e5f6-7890-abcd-ef1234567890

querySql

string

部分数据集模式下的自定义查询 SQL 子句。

level > 2

pipelineName

string

input

object

可选。

{"question": "如何退款?"}

请求示例(更新离线计划的数据集与评估器)\n\n```json\n{

"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" } ] }\n```

返回参数

名称

类型

描述

示例值

object

更新实验计划响应。

requestId

string

请求 ID。

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

planId

string

实验计划 ID。

exp-plan-e95bff54685a4ae29ff3a834c1008a71

status

string

更新结果。成功为 updated。

updated

message

string

提示信息。

实验计划更新成功

如需查看更新后的完整配置,请调用 GetExperimentPlan。\n\njson\n{ "planId": "exp-plan-e95bff54685a4ae29ff3a834c1008a71", "status": "updated" }\n

示例

正常返回示例

JSON格式

{
  "requestId": "3FE4CD1E-FF41-56BE-B590-7A021D9C1524",
  "planId": "exp-plan-e95bff54685a4ae29ff3a834c1008a71",
  "status": "updated",
  "message": "实验计划更新成功"
}

错误码

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情