Skip to content

Commit

Permalink
Fix: Correct document for dashboards assistant (opensearch-project#8762)
Browse files Browse the repository at this point in the history
* correct api

Signed-off-by: yuye-aws <[email protected]>

* add system index warning

Signed-off-by: yuye-aws <[email protected]>

* Apply suggestions from code review

Signed-off-by: kolchfa-aws <[email protected]>

---------

Signed-off-by: yuye-aws <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
Co-authored-by: kolchfa-aws <[email protected]>
Signed-off-by: Eric Pugh <[email protected]>
  • Loading branch information
2 people authored and epugh committed Nov 23, 2024
1 parent 3496b3e commit f00fcec
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
3 changes: 3 additions & 0 deletions _dashboards/dashboards-assistant/alert-insight.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ POST /.plugins-ml-config/_doc/os_insight
The created `os_insight` agent provides alert insights related to OpenSearch cluster metrics. For insights about alerts unrelated to OpenSearch cluster metrics, you need to register an agent with [this template](https://github.com/opensearch-project/flow-framework/blob/2.x/sample-templates/create-knowledge-base-alert-agent.json) and change the agent name to `KB_For_Alert_Insight`.
{: .note}

This example demonstrates a system index. In security-enabled domains, only superadmins have permissions to execute this code. For information about making superadmin calls, see [System indexes]({{site.url}}{{site.baseurl}}/security/configuration/system-indices/). For access permissions, contact your system administrator.
{: .warning}

### Step 4: Test the agents

You can verify that the agents were created successfully by calling the agents with an example payload.
Expand Down
8 changes: 6 additions & 2 deletions _dashboards/dashboards-assistant/data-summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ queryEnhancements.queryAssist.summary.enabled: true
### Step 2: Create a data summary agent
To orchestrate data summarization, create a data summary [agent]({{site.url}}{{site.baseurl}}/ml-commons-plugin/agents-tools/index/#agents). To create an agent, send a `POST /_plugins/_ml/agents/_register` request and provide the agent template as a payload:
To orchestrate data summarization, create a data summary [agent]({{site.url}}{{site.baseurl}}/ml-commons-plugin/agents-tools/index/#agents). To create an agent, send a `POST /_plugins/_flow_framework/workflow?provision=true` request and provide the agent template as a payload:

<details markdown="block">
<summary>
Expand All @@ -45,7 +45,8 @@ To orchestrate data summarization, create a data summary [agent]({{site.url}}{{s
{: .text-delta}

```json
POST /_plugins/_ml/agents/_register
POST /_plugins/_flow_framework/workflow?provision=true
{
"name": "Query Assist Agent",
"description": "Create a Query Assist Agent using Claude on BedRock",
Expand Down Expand Up @@ -237,6 +238,9 @@ POST /.plugins-ml-config/_doc/os_data2summary
```
{% include copy-curl.html %}

This example demonstrates a system index. In security-enabled domains, only superadmins have permissions to execute this code. For information about making superadmin calls, see [System indexes]({{site.url}}{{site.baseurl}}/security/configuration/system-indices/). For access permissions, contact your system administrator.
{: .warning}

### Step 4: Test the agent

You can verify that the data summary agent was created successfully by calling the agent with an example payload:
Expand Down
5 changes: 4 additions & 1 deletion _dashboards/dashboards-assistant/suggest-anomaly-detector.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ assistant.smartAnomalyDetector.enabled: true
### Step 2: Create an anomaly detector suggestion agent
To orchestrate anomaly detector suggestions, create an anomaly detector suggestion [agent]({{site.url}}{{site.baseurl}}/ml-commons-plugin/agents-tools/index/#agents). To create an agent, send a `POST /_plugins/_ml/agents/_register` request and provide the agent template as a payload. For more information, see [Configuring OpenSearch Assistant]({{site.url}}{{site.baseurl}}/dashboards/dashboards-assistant/index/#configuring-opensearch-assistant).
To orchestrate anomaly detector suggestions, create an anomaly detector suggestion [agent]({{site.url}}{{site.baseurl}}/ml-commons-plugin/agents-tools/index/#agents). To create an agent, send a `POST /_plugins/_flow_framework/workflow?provision=true` request and provide the agent template as a payload. For more information, see [Configuring OpenSearch Assistant]({{site.url}}{{site.baseurl}}/dashboards/dashboards-assistant/index/#configuring-opensearch-assistant).

For sample agent templates, see [Flow Framework sample templates](https://github.com/opensearch-project/flow-framework/tree/2.x/sample-templates). Note the agent ID; you'll use it in the following step.

Expand All @@ -55,6 +55,9 @@ POST /.plugins-ml-config/_doc/os_suggest_ad
```
{% include copy-curl.html %}

This example demonstrates a system index. In security-enabled domains, only superadmins have permissions to execute this code. For information about making superadmin calls, see [System indexes]({{site.url}}{{site.baseurl}}/security/configuration/system-indices/). For access permissions, contact your system administrator.
{: .warning}

### Step 4: Test the agent

You can verify that the agent was created successfully by calling the agent with an example payload:
Expand Down
3 changes: 3 additions & 0 deletions _dashboards/dashboards-assistant/text-to-visualization.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ POST /.plugins-ml-config/_doc/os_text2vega_with_instructions
```
{% include copy-curl.html %}

This example demonstrates a system index. In security-enabled domains, only superadmins have permissions to execute this code. For information about making superadmin calls, see [System indexes]({{site.url}}{{site.baseurl}}/security/configuration/system-indices/). For access permissions, contact your system administrator.
{: .warning}

### Step 4: Test the agent

You can verify that the agent was created successfully by calling the agent with an example payload:
Expand Down

0 comments on commit f00fcec

Please sign in to comment.