ES AI Assistant (Elastic AI Assistant) User Guide

Updated at:

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

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

  1. Log on to the Alibaba Cloud Elasticsearch Management Console.

  2. Click Elasticsearch Instances, then click your purchased instance.

  3. Click Configuration and Management > Visualization Control.

  4. 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.

  5. 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.

    Note

    Each 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.

  6. 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.

    Note

    If you forget your password, see Reset the instance access password.

  7. Click the icon in the upper-left corner to expand the navigation bar, then click Observability > Overview.

  8. Click AI Assistant, then click Set up GenAI connector.

  9. On the Select Connector page, choose OpenAI.

    Note

    The Large Language Model (LLM) API provided by the AI Search Development Platform includes an OpenAI-compatible interface definition: Content Generation Service.

  10. 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.

    Note

    To 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 AI Service Center > Model Management, copy the string after Model Invocation API Key, and paste it into the API key field.

  11. After you fill in the fields, click Save.

  12. Then click the icon in the upper-right corner Connector (AI Search Platform) > Manage Connectors > icon after AI Search Platform , and then click Run. The operation is successful if Test Successful appears.

  13. Click Close. Then click the icon in the upper-left corner to expand the navigation bar, click Observability > Overview, and then click AI Assistant.

    Note

    You 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 Icon in the upper-right corner > AI Assistant Settings > Simulate function calling, 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

  1. Import sample data

    1. Go to the Kibana homepage and click Try sample data.

    2. Click Other sample datasets and import the two sample datasets in the lower-left corner.

  2. AI assistant experience

    1. Click the icon in the upper-left corner to expand the navigation bar, click Observability > Overview, and then click AI Assistant.

    2. Enter question 1: List all indexes in the current cluster, excluding hidden or system indexes.

    3. Enter question 2: Compare the kibana_sample_data_ecommerce and kibana_sample_data_flights indexes. What fields do they have in common?

FAQ

Issue: I followed all steps, but I still cannot interact with the AI assistant. Why?

Answer: First, click Close to check for any errors, verify whether the test run succeeded, and confirm that the Impersonation Function was not invoked.

Issue: The error message shows: get_alerts_dataset_infoget_dataset_infoalerts. What does this mean?

This issue occurs when the model generates an invalid function name, as shown in the example (get_alerts_dataset_infoget_dataset_infoalerts). Models such as deepseek-r1 may return multiple function calls at once. To avoid this, add the following instruction to your query: Remember all responses going forward. Return only one function tool per response. That is, your response must contain only one <|tool_use_start|>. Example: What is the current cluster status? Remember all responses going forward. Return only one function tool per response. That is, your response must contain only one <|tool_use_start|>.

Issue: The error message shows: Failed to validate: Excess keys are not allowed: body.messages.message.data. What does this mean?

Failed to validate: Excess keys are not allowed: body.messages.message.data.

The session content may be too large. Start a new session.