更新实验计划。
接口说明
调用 UpdateExperimentPlan 更新指定实验计划。未传字段保持不变。仅可更新当前账号创建的计划。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
agentloop:UpdateExperimentPlan |
update |
*Workspace
|
无 | 无 |
请求语法
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 |
| 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": "实验计划更新成功"
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。