Open ylwu-amzn opened 4 months ago
I'm working on implementing this tool, the main purpose of this tool is that we give some prompt to LLM and let it give the suggested required parameters for creating anomaly detector, then we pop up a input form filling with the suggested parameters in OSD, users can modify the parameters if they want, after they confirmed they can click the create
button to create an anomaly detector based on the suggestions.
So for this CreateAnomalyDetectorTool
, we only accept an index name or an index pattern as the input parameter, and we fetch the index mappings and then construct a prompt containing the index mappings and an example of the create anomaly detector API, finally, we let LLM to give a formatted result which contains some key information like:
{
"index": "",
"categoryField": "",
"aggregationField": "",
"aggregationMethod": "",
"dateFields": ""
}
A demo video about let LLM help to create an anomaly detector:
https://github.com/opensearch-project/skills/assets/15811131/a8cb6dc0-2a25-4b4a-9939-07349cbdacbf
We have get anomaly detector tool now. We can create some tool to create anomaly detector.