After obtaining the basic query result, you need to use this API to first determine which intelligent analysis capabilities (Insight Ability) are available for the current data query result.
The Intelligent Analysis Agent provides you with an OpenAPI interface for advanced data analysis. You can call this API to perform advanced analyses such as attribution analysis and anomaly analysis on data query results.
historyId and sessionId of the data query result. When using the advanced data analysis API, you must specify the data query result to be analyzed by providing either the historyId or sessionId in the request parameters.sessionId for the session. For details, see Create a Session.type=result and status=success, the result field in the event contains the historyId of the query result. For details, see Session Completion.{domain}/dataAgent/llm/openApi/v2/agent/insightAbilitiesParameter | Type | Required | Example value | Description |
|---|---|---|---|---|
historyId | int | Yes | 12886163 | The session result ID for this instance. For example, when a vague question is broken down into multiple sub-questions for querying, each sub-question result will have a session result ID. |
The API returns an insightAbilities list, where each object represents an available analysis capability. You need to pay attention to the ability_code (capability code) and enable (whether available) fields.
Parameter | Type | Example value | Description |
|---|---|---|---|
insightAbilities | list | For details, see the response example below | Each object in the |
insightAbilities.ability_code | string | attribution | Unique code identifying the analytical capability, mainly including:
|
insightAbilities.enable | boolean | true | Indicates whether this capability is available in the context of the current data query result. |
insightAbilities.cause | string | For details, see the return example below | If the corresponding analytical capability is not supported in the context of the current data query result, the cause field provides a description of the reason why it is not supported. |
insightAbilities.ability_params | list | For details, see the return example below | Specific parameters for the corresponding analytical capability. The parameters included in each analytical capability differ and are similar to the operation in the interface. |
The following is a response example showing multiple analysis capabilities and their statuses.
{ "code": "llm/ok", "data": { "insightAbilities": [ { "ability_code": "attribution", "ability_name": "归因", "enable": false, "cause": "没有时间字段", "ability_params": [ // ... Specific parameters omitted ] }, { "ability_code": "anomaly", "ability_name": "异常检测", "enable": false, "cause": "没有时间字段", "ability_params": [ // ... Specific parameters omitted ] }, { "ability_code": "interpret", "ability_name": "解读", "enable": true, "cause": "", "ability_params": [ // ... Specific parameters omitted ] } ] } }