GetExperimentPlan

Updated at:

Queries an experiment plan.

Operation description

Calls GetExperimentPlan to query the complete configuration of a specified experiment plan, including experiment groups, data sources, evaluators, and timestamps.

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

get

*Workspace

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

None None

Request syntax

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

Path Parameters

Parameter

Type

Required

Description

Example

agentSpace

string

No

The AgentSpace name.

al-playground-cn-hongkong

planId

string

No

The ID of the experiment plan.

exp-plan-0242d983f5d340fd8479cf2c19eb279e

Request parameters

Parameter

Type

Required

Description

Example

No parameters required.

Specify the target agentSpace and planId. You can only query plans created by the current account.

Response elements

Element

Type

Description

Example

object

The experiment plan details response.

requestId

string

The request ID.

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

planId

string

The ID of the experiment plan.

exp-plan-0242d983f5d340fd8479cf2c19eb279e

planName

string

The name of the experiment plan.

arms_agent_experiment

experimentType

string

The type of the experiment.

Valid values:

  • offline :

    offline

  • online :

    online

online

description

string

The description.

Compare the checkout agent baseline with the optimized version

status

string

The status of the plan.

Valid values:

  • running :

    running

  • stopped :

    stopped

  • pending :

    pending

stopped

datasetId

string

The ID of the associated dataset.

arms_customer_agent_level1

experiments

array

The list of experiment configurations.

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

ExperimentConfig

The configuration of a single experiment group.

selectedItemIds

array

The list of selected data item IDs in partial dataset mode.

["019ef4d5-a0f0-7114-832d-5542d771cd8c"]

string

The ID of a single data item in the dataset.

019ef4d5-a0f0-7114-832d-5542d771cd8c

querySql

string

The custom query SQL clause in partial dataset mode.

status='OK'

pipelineName

string

The name of the associated data processing pipeline. This field is empty if no pipeline is associated.

createdAt

integer

The creation time. The value is a UNIX timestamp in milliseconds.

1782816000000

updatedAt

integer

The update time. The value is a UNIX timestamp in milliseconds.

1782816600000

evaluators

array

The list of evaluators.

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

Evaluator

The configuration object of a single evaluator.

{"evaluatorRef":"Builtin.agent_task_completion"}

input

object

Optional.

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

An empty object may be returned if the plan does not exist or does not belong to the current account. Check whether the response contains planId to determine this. Timestamps are in milliseconds.

Examples

Success response

JSON format

{
  "requestId": "3FE4CD1E-FF41-56BE-B590-7A021D9C1524",
  "planId": "exp-plan-0242d983f5d340fd8479cf2c19eb279e",
  "planName": "arms_agent_experiment",
  "experimentType": "online",
  "description": "Compare checkout Agent baseline with optimized version",
  "status": "stopped",
  "datasetId": "arms_customer_agent_level1",
  "experiments": [
    {
      "endpointConnectorId": "",
      "label": "A",
      "modelName": "qwen-max",
      "modelParameters": {
        "temperature": 0.7,
        "maxTokens": 1024,
        "topP": 0.9,
        "topK": 50,
        "frequencyPenalty": 0.2,
        "presencePenalty": 0.1,
        "stopSequences": [
          "END"
        ],
        "responseFormat": {
          "type": "json_object",
          "jsonSchema": {
            "name": "answer",
            "strict": true,
            "schema": "{\"type\":\"object\",\"properties\":{\"answer\":{\"type\":\"string\"}},\"required\":[\"answer\"]}"
          }
        },
        "repetitionPenalty": 1.05,
        "seed": 1234,
        "enableThinking": true,
        "maxCompletionTokens": 4096,
        "thinkingBudget": 2048,
        "reasoningEffort": "low",
        "enableCacheControl": true,
        "extraBody": "{\"enable_search\":false}"
      },
      "modelProvider": "dashscope",
      "name": "baseline",
      "promptTemplate": [
        {
          "content": "Please answer: {{question}}",
          "role": "user"
        }
      ],
      "requestBodyTemplate": "{\"input\":\"{{question}}\"}",
      "requestHeaderTemplate": "{\"Content-Type: application/json\" }",
      "requestMethod": "POST"
    }
  ],
  "selectedItemIds": [
    "019ef4d5-a0f0-7114-832d-5542d771cd8c"
  ],
  "querySql": "status='OK'",
  "pipelineName": "",
  "createdAt": 1782816000000,
  "updatedAt": 1782816600000,
  "evaluators": [
    {
      "config": {
        "version": "1.0.0"
      },
      "evaluatorRef": "Builtin.agent_task_completion",
      "filters": {
        "query": "serviceName='checkout-service'"
      },
      "name": "agent_task_completion",
      "resultName": "agent_task_completion",
      "resultType": "score",
      "type": "AGENT",
      "variableExtractorMapping": {
        "key": {
          "expression": "$.order.expected",
          "originField": "trace.output",
          "type": "jsonpath"
        }
      },
      "variableMapping": {
        "key": "trace.input"
      }
    }
  ],
  "input": {
    "question": "How do I request a refund?"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.