* Add agent framework documentation Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add hidden model and API updates Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Vale error Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Updated field names Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add updating credentials Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Added tools table Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add OpenSearch forum thread for OS Assistant Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add tech review for conv search Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Fix links Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add tools Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add links to tools Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * More info about tools Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Tool parameters Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Update cat-index-tool.md Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Parameter clarification Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Tech review feedback Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Typo fix Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * More tech review feedback: RAG tool Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Tech review feedback: memory APis Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Update _ml-commons-plugin/agents-tools/index.md Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Update _ml-commons-plugin/agents-tools/tools/neural-sparse-tool.md Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Update _ml-commons-plugin/agents-tools/tools/neural-sparse-tool.md Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Update _ml-commons-plugin/agents-tools/tools/neural-sparse-tool.md Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Update _ml-commons-plugin/opensearch-assistant.md Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Update _ml-commons-plugin/agents-tools/tools/ppl-tool.md Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Separated search and get APIs and add conversational flow agent Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * More parameters for PPL tool Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Added more parameters Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Tech review feedback: PPL tool Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Apply suggestions from code review Co-authored-by: Nathan Bower <nbower@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Rename to automating configurations Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Editorial comments on the new text Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add parameter to PPl tool Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Changed link to configurations Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Rate limiter feedback and added warning Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> --------- Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Co-authored-by: Nathan Bower <nbower@amazon.com>
156 lines
3.7 KiB
Markdown
156 lines
3.7 KiB
Markdown
---
|
|
layout: default
|
|
title: Execute algorithm
|
|
parent: ML Commons APIs
|
|
nav_order: 30
|
|
---
|
|
|
|
# Execute algorithm
|
|
|
|
Some algorithms, such as [Localization]({{site.url}}{{site.baseurl}}/ml-commons-plugin/algorithms#localization), don't require trained models. You can run no-model-based algorithms using the `execute` API.
|
|
|
|
## Path and HTTP methods
|
|
|
|
```json
|
|
POST _plugins/_ml/_execute/<algorithm_name>
|
|
```
|
|
|
|
#### Example request: Execute localization
|
|
|
|
The following example uses the Localization algorithm to find subset-level information for aggregate data (for example, aggregated over time) that demonstrates the activity of interest, such as spikes, drops, changes, or anomalies.
|
|
|
|
```json
|
|
POST /_plugins/_ml/_execute/anomaly_localization
|
|
{
|
|
"index_name": "rca-index",
|
|
"attribute_field_names": [
|
|
"attribute"
|
|
],
|
|
"aggregations": [
|
|
{
|
|
"sum": {
|
|
"sum": {
|
|
"field": "value"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"time_field_name": "timestamp",
|
|
"start_time": 1620630000000,
|
|
"end_time": 1621234800000,
|
|
"min_time_interval": 86400000,
|
|
"num_outputs": 10
|
|
}
|
|
```
|
|
{% include copy-curl.html %}
|
|
|
|
#### Example response
|
|
|
|
```json
|
|
{
|
|
"results" : [
|
|
{
|
|
"name" : "sum",
|
|
"result" : {
|
|
"buckets" : [
|
|
{
|
|
"start_time" : 1620630000000,
|
|
"end_time" : 1620716400000,
|
|
"overall_aggregate_value" : 65.0
|
|
},
|
|
{
|
|
"start_time" : 1620716400000,
|
|
"end_time" : 1620802800000,
|
|
"overall_aggregate_value" : 75.0,
|
|
"entities" : [
|
|
{
|
|
"key" : [
|
|
"attr0"
|
|
],
|
|
"contribution_value" : 1.0,
|
|
"base_value" : 2.0,
|
|
"new_value" : 3.0
|
|
},
|
|
{
|
|
"key" : [
|
|
"attr1"
|
|
],
|
|
"contribution_value" : 1.0,
|
|
"base_value" : 3.0,
|
|
"new_value" : 4.0
|
|
},
|
|
{
|
|
"key" : [
|
|
"attr2"
|
|
],
|
|
"contribution_value" : 1.0,
|
|
"base_value" : 4.0,
|
|
"new_value" : 5.0
|
|
},
|
|
{
|
|
"key" : [
|
|
"attr3"
|
|
],
|
|
"contribution_value" : 1.0,
|
|
"base_value" : 5.0,
|
|
"new_value" : 6.0
|
|
},
|
|
{
|
|
"key" : [
|
|
"attr4"
|
|
],
|
|
"contribution_value" : 1.0,
|
|
"base_value" : 6.0,
|
|
"new_value" : 7.0
|
|
},
|
|
{
|
|
"key" : [
|
|
"attr5"
|
|
],
|
|
"contribution_value" : 1.0,
|
|
"base_value" : 7.0,
|
|
"new_value" : 8.0
|
|
},
|
|
{
|
|
"key" : [
|
|
"attr6"
|
|
],
|
|
"contribution_value" : 1.0,
|
|
"base_value" : 8.0,
|
|
"new_value" : 9.0
|
|
},
|
|
{
|
|
"key" : [
|
|
"attr7"
|
|
],
|
|
"contribution_value" : 1.0,
|
|
"base_value" : 9.0,
|
|
"new_value" : 10.0
|
|
},
|
|
{
|
|
"key" : [
|
|
"attr8"
|
|
],
|
|
"contribution_value" : 1.0,
|
|
"base_value" : 10.0,
|
|
"new_value" : 11.0
|
|
},
|
|
{
|
|
"key" : [
|
|
"attr9"
|
|
],
|
|
"contribution_value" : 1.0,
|
|
"base_value" : 11.0,
|
|
"new_value" : 12.0
|
|
}
|
|
]
|
|
},
|
|
...
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|