Files
3f7468b504 Add agent framework/throttling/hidden model/OS assistant and update conversational search documentation (#6354)
* Add agent framework documentation

Signed-off-by: Fanit Kolchina <[email protected]>

* Add hidden model and API updates

Signed-off-by: Fanit Kolchina <[email protected]>

* Vale error

Signed-off-by: Fanit Kolchina <[email protected]>

* Updated field names

Signed-off-by: Fanit Kolchina <[email protected]>

* Add updating credentials

Signed-off-by: Fanit Kolchina <[email protected]>

* Added tools table

Signed-off-by: Fanit Kolchina <[email protected]>

* Add OpenSearch forum thread for OS Assistant

Signed-off-by: Fanit Kolchina <[email protected]>

* Add tech review for conv search

Signed-off-by: Fanit Kolchina <[email protected]>

* Fix links

Signed-off-by: Fanit Kolchina <[email protected]>

* Add tools

Signed-off-by: Fanit Kolchina <[email protected]>

* Add links to tools

Signed-off-by: Fanit Kolchina <[email protected]>

* More info about tools

Signed-off-by: Fanit Kolchina <[email protected]>

* Tool parameters

Signed-off-by: Fanit Kolchina <[email protected]>

* Update cat-index-tool.md

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

* Parameter clarification

Signed-off-by: Fanit Kolchina <[email protected]>

* Tech review feedback

Signed-off-by: Fanit Kolchina <[email protected]>

* Typo fix

Signed-off-by: Fanit Kolchina <[email protected]>

* More tech review feedback: RAG tool

Signed-off-by: Fanit Kolchina <[email protected]>

* Tech review feedback: memory APis

Signed-off-by: Fanit Kolchina <[email protected]>

* Update _ml-commons-plugin/agents-tools/index.md

Co-authored-by: Melissa Vagi <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Update _ml-commons-plugin/agents-tools/tools/neural-sparse-tool.md

Co-authored-by: Melissa Vagi <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Update _ml-commons-plugin/agents-tools/tools/neural-sparse-tool.md

Co-authored-by: Melissa Vagi <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Update _ml-commons-plugin/agents-tools/tools/neural-sparse-tool.md

Co-authored-by: Melissa Vagi <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Update _ml-commons-plugin/opensearch-assistant.md

Co-authored-by: Melissa Vagi <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Update _ml-commons-plugin/agents-tools/tools/ppl-tool.md

Co-authored-by: Melissa Vagi <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Apply suggestions from code review

Co-authored-by: Melissa Vagi <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Separated search and get APIs and add conversational flow agent

Signed-off-by: Fanit Kolchina <[email protected]>

* More parameters for PPL tool

Signed-off-by: Fanit Kolchina <[email protected]>

* Added more parameters

Signed-off-by: Fanit Kolchina <[email protected]>

* Tech review feedback: PPL tool

Signed-off-by: Fanit Kolchina <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Rename to automating configurations

Signed-off-by: Fanit Kolchina <[email protected]>

* Editorial comments on the new text

Signed-off-by: Fanit Kolchina <[email protected]>

* Add parameter to PPl tool

Signed-off-by: Fanit Kolchina <[email protected]>

* Changed link to configurations

Signed-off-by: Fanit Kolchina <[email protected]>

* Rate limiter feedback and added warning

Signed-off-by: Fanit Kolchina <[email protected]>

---------

Signed-off-by: Fanit Kolchina <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
Co-authored-by: Melissa Vagi <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
2024-02-20 12:09:31 -05:00

3.1 KiB

layout, title, has_children, has_toc, nav_order, parent, grand_parent
layout title has_children has_toc nav_order parent grand_parent
default Visualization tool false false 120 Tools Agents and tools

Visualization tool

Introduced 2.12 {: .label .label-purple }

This is an experimental feature and is not recommended for use in a production environment. For updates on the progress of the feature or if you want to leave feedback, see the associated GitHub issue.
{: .warning}

Use the VisualizationTool to find visualizations relevant to a question.

Step 1: Register a flow agent that will run the VisualizationTool

A flow agent runs a sequence of tools in order and returns the last tool's output. To create a flow agent, send the following register agent request:

POST /_plugins/_ml/agents/_register
{
  "name": "Test_Agent_For_Visualization_tool",
  "type": "flow",
  "description": "this is a test agent for the VisuailizationTool",
  "tools": [
      {
      "type": "VisualizationTool",
      "name": "DemoVisualizationTool",
      "parameters": {
        "index": ".kibana",
        "input": "${parameters.question}",
        "size": 3
      }
    }
  ]
}

{% include copy-curl.html %}

For parameter descriptions, see Register parameters.

OpenSearch responds with an agent ID:

{
  "agent_id": "9X7xWI0Bpc3sThaJdY9i"
}

Step 2: Run the agent

Before you run the agent, make sure that you add the sample OpenSearch Dashboards Sample eCommerce orders dataset. To learn more, see Adding sample data.

Then, run the agent by sending the following request:

POST /_plugins/_ml/agents/9X7xWI0Bpc3sThaJdY9i/_execute
{
  "parameters": {
    "question": "what's the revenue for today?"
  }
}

{% include copy-curl.html %}

By default, OpenSearch returns the top three matching visualizations. You can use the size parameter to specify the number of results returned. The output is returned in CSV format. The output includes two columns: Title (the visualization title displayed in OpenSearch Dashboards) and Id (a unique ID for this visualization):

{
  "inference_results": [
    {
      "output": [
        {
          "name": "response",
          "result": """Title,Id
[eCommerce] Total Revenue,10f1a240-b891-11e8-a6d9-e546fe2bba5f
"""
        }
      ]
    }
  ]
}

Register parameters

The following table lists all tool parameters that are available when registering an agent.

Parameter Type Required/Optional Description
input String Required The user input used to match visualizations.
index String Optional The index to search. Default is .kibana (the system index for OpenSearch Dashboards data).
size Integer Optional The number of visualizations to return. Default is 3.

Execute parameters

The following table lists all tool parameters that are available when running the agent.

Parameter Type Required/Optional Description
question String Required The natural language question to send to the LLM.