ES AI Assistant (Elastic AI Assistant) User Guide
Elasticsearch now includes an AI assistant feature that enables you to query information about your instance, such as monitoring data and operations and maintenance status. For example, you can ask for index details in your local cluster to enhance your Elasticsearch experience. The AI assistant retrieves and analyzes index and other information from your instance and cluster. If you have questions about your Elasticsearch instance or cluster during actual use, consult the AI assistant first.
Prerequisites
-
You have created an Alibaba Cloud ES instance that runs Elasticsearch version 8.15 or later. For detailed instructions, see Create an Alibaba Cloud Elasticsearch Instance.
-
Activate the Alibaba Cloud Search Open Platform and create an AI inference model. After you create an instance of version 8.15 or later, an AI model is automatically created in the Elasticsearch instance console. For more information, see AI Search Open Platform.
NoteTo activate the AI Search Open Platform and obtain its invocation URL and authentication information, see Activate the service, Obtain the service access URL, and Manage API keys.
-
Log on to the Kibana console for your Elasticsearch instance. For more information, see Log on to the Kibana console.
Background information
The Kibana configuration now includes a parameter key configuration module. To use the AI assistant, set two encryption keys:
-
xpack.security.encryptionKey: The encryption key for the X-Pack security module in Elasticsearch.
-
xpack.encryptedSavedObjects.encryptionKey: The encryption key for saved objects in Elasticsearch.
Usage instructions
-
Log on to the Alibaba Cloud Elasticsearch Management Console.
-
Click Elasticsearch Instances, then click your purchased instance.
-
Click .
-
Click Modify Configuration for Kibana. If you have not added your IP address to the whitelist for Kibana public network access, add it first. For more information, see Quick Start.
-
On the Kibana configuration page, click Modify Configuration in the upper-right corner. Set the xpack.security.encryptionKey and xpack.encryptedSavedObjects.encryptionKey parameters, then click OK.
NoteEach key must be 32 to 100 characters long and can contain uppercase letters, lowercase letters, and digits. For more information about security keys, see Configure security in Kibana.
-
Return to the Visualization Control page and click Public Network Access. Enter your username and password, then click Log On to access the Kibana page.
NoteIf you forget your password, see Reset the instance access password.
-
Click the icon in the upper-left corner to expand the navigation bar, then click .
-
Click AI Assistant, then click Set up GenAI connector.
-
On the Select Connector page, choose OpenAI.
NoteThe Large Language Model (LLM) API provided by the AI Search Development Platform includes an OpenAI-compatible interface definition: Content Generation Service.
-
On the OpenAI Edit Connector page, update the following fields.
OpenAI connector information
Content
Connector name
A custom name. This topic uses AI Search Platform as an example.
URL
http://default-v2x.platform-cn-shanghai.opensearch.aliyuncs.com/compatible-mode/v1/chat/completions.NoteTo configure the URL, go to the AI Search Open Platform, click API Keys, copy the string after Public Network API Domain, and paste it into the URL field. Then append
/compatible-mode/v1/chat/completions.Default model
For supported models, see Supported services. You can enter models such as qwen-turbo, qwen-plus, or qwen-max. Note that ops-qwen-turbo is currently not supported in the AI Assistant.
API key
Your API key.
In the instance console, click , copy the string after Model Invocation API Key, and paste it into the API key field.
-
After you fill in the fields, click Save.
-
Then click the icon in the upper-right corner , and then click Run. The operation is successful if Test Successful appears.
-
Click Close. Then click the icon in the upper-left corner to expand the navigation bar, click , and then click AI Assistant.
NoteYou have completed all steps, but you must enable Simulated functions to use the AI assistant properly. Follow these steps:
On the AI Assistant New conversation page, click , turn on the Simulate function calling toggle, and click save changes.
After you complete these steps, you can enter queries in the AI Assistant dialog box to interact with the AI assistant.
Use case examples
-
Import sample data
-
Go to the Kibana homepage and click Try sample data.
-
Click Other sample datasets and import the two sample datasets in the lower-left corner.
-
-
AI assistant experience
-
Click the icon in the upper-left corner to expand the navigation bar, click , and then click AI Assistant.
-
Enter question 1: List all indexes in the current cluster, excluding hidden or system indexes.
-
Enter question 2: Compare the kibana_sample_data_ecommerce and kibana_sample_data_flights indexes. What fields do they have in common?
-
For more AI assistant usage examples, see Build an AI-powered search and observability chatbot using Alibaba Cloud Elasticsearch Enterprise.