diff --git a/explore-analyze/elastic-inference.md b/explore-analyze/elastic-inference.md index 9b19f2a4cd..6fbe1978c2 100644 --- a/explore-analyze/elastic-inference.md +++ b/explore-analyze/elastic-inference.md @@ -7,7 +7,18 @@ navigation_title: Elastic Inference # Elastic {{infer-cap}} -There are several ways to perform {{infer}} in the {{stack}}. This page provides a brief overview of the different methods: +## Overview -* [Using the {{infer}} API](elastic-inference/inference-api.md) -* [Trained models deployed in your cluster](machine-learning/nlp/ml-nlp-overview.md) +{{infer-cap}} is a process of using a {{ml}} trained model to make predictions or operations - such as text embedding, or reranking - on your data. +You can use {{infer}} during ingest time (for example, to create embeddings from textual data you ingest) or search time (to perform [semantic search](/solutions/search/semantic-search.md) based on the embeddings created previously). +There are several ways to perform {{infer}} in the {{stack}}, depending on the underlying {{infer}} infrastructure and the interface you use: + +- **{{infer-cap}} infrastructure:** + + - [Elastic {{infer-cap}} Service](elastic-inference/eis.md): a managed service that runs {infer} outside your cluster resources. + - [Trained models deployed in your cluster](machine-learning/nlp/ml-nlp-overview.md): models run on your own {{ml}} nodes + +- **Access methods:** + + - [The `semantic_text` workflow](/solutions/search/semantic-search/semantic-search-semantic-text.md): a simplified method that uses the {{infer}} API behind the scenes to enable semantic search. + - [The {{infer}} API](elastic-inference/inference-api.md): a general-purpose API that enables you to run {{infer}} using EIS, your own models, or third-party services. diff --git a/explore-analyze/elastic-inference/eis.md b/explore-analyze/elastic-inference/eis.md new file mode 100644 index 0000000000..96dc57cbc0 --- /dev/null +++ b/explore-analyze/elastic-inference/eis.md @@ -0,0 +1,63 @@ +--- +navigation_title: Elastic Inference Service (EIS) +applies_to: + stack: ga 9.0 + serverless: ga +--- + +# Elastic {{infer-cap}} Service [elastic-inference-service-eis] + +The Elastic {{infer-cap}} Service (EIS) enables you to leverage AI-powered search as a service without deploying a model in your cluster. +With EIS, you don't need to manage the infrastructure and resources required for {{ml}} {{infer}} by adding, configuring, and scaling {{ml}} nodes. +Instead, you can use {{ml}} models for ingest, search, and chat independently of your {{es}} infrastructure. + +## AI features powered by EIS [ai-features-powered-by-eis] + +* Your Elastic deployment or project comes with a default [`Elastic Managed LLM` connector](https://www.elastic.co/docs/reference/kibana/connectors-kibana/elastic-managed-llm). This connector is used in the AI Assistant, Attack Discovery, Automatic Import and Search Playground. + +* You can use [ELSER](/explore-analyze/machine-learning/nlp/ml-nlp-elser.md) to perform semantic search as a service (ELSER on EIS). {applies_to}`stack: preview 9.1` {applies_to}`serverless: preview` + +## Region and hosting [eis-regions] + +Requests through the `Elastic Managed LLM` are currently proxying to AWS Bedrock in AWS US regions, beginning with `us-east-1`. +The request routing does not restrict the location of your deployments. + +ELSER requests are managed by Elastic's own EIS infrastructure. + +## ELSER via Elastic {{infer-cap}} Service (ELSER on EIS) [elser-on-eis] + +```{applies_to} +stack: preview 9.1 +serverless: preview +``` + +ELSER on EIS enables you to use the ELSER model without using ML nodes in your infrastructure and with that, it simplifies the semantic search and hybrid search experience. + +### Private preview access + +Private preview access is available by submitting the form provided [here](https://docs.google.com/forms/d/e/1FAIpQLSfp2rLsayhw6pLVQYYp4KM6BFtaaljplWdYowJfflpOICgViA/viewform). + +### Limitations + +While we do encourage experimentation, we do not recommend implementing production use cases on top of this feature while it is in Technical Preview. + +#### Access + +This feature is being gradually rolled out to Serverless and Cloud Hosted customers. +It may not be available to all users at launch. + +#### Uptime + +There are no uptime guarantees during the Technical Preview. +While Elastic will address issues promptly, the feature may be unavailable for extended periods. + +#### Throughput and latency + +{{infer-cap}} throughput via this endpoint is expected to exceed that of {{infer}} operations on an ML node. +However, throughput and latency are not guaranteed. +Performance may vary during the Technical Preview. + +#### Batch size + +Batches are limited to a maximum of 16 documents. +This is particularly relevant when using the [_bulk API](https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-bulk) for data ingestion. diff --git a/explore-analyze/elastic-inference/inference-api.md b/explore-analyze/elastic-inference/inference-api.md index 0f8ba78092..0ae5bffa0b 100644 --- a/explore-analyze/elastic-inference/inference-api.md +++ b/explore-analyze/elastic-inference/inference-api.md @@ -9,18 +9,39 @@ products: - id: kibana --- -# Inference integrations +# {{infer-cap}} integrations -{{es}} provides a machine learning [inference API](https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-inference-get-1) to create and manage inference endpoints that integrate with services such as Elasticsearch (for built-in NLP models like [ELSER](/explore-analyze/machine-learning/nlp/ml-nlp-elser.md) and [E5](/explore-analyze/machine-learning/nlp/ml-nlp-e5.md)), as well as popular third-party services like Amazon Bedrock, Anthropic, Azure AI Studio, Cohere, Google AI, Mistral, OpenAI, Hugging Face, and more. +{{es}} provides a machine learning [{{infer}} API](https://www.elastic.co/docs/api/doc/elasticsearch/v9/group/endpoint-inference) to create and manage {{infer}} endpoints that integrate with services such as {{es}} (for built-in NLP models like [ELSER](/explore-analyze/machine-learning/nlp/ml-nlp-elser.md) and [E5](/explore-analyze/machine-learning/nlp/ml-nlp-e5.md)), as well as popular third-party services like Amazon Bedrock, Anthropic, Azure AI Studio, Cohere, Google AI, Mistral, OpenAI, Hugging Face, and more. -You can create a new inference endpoint: +You can use the default {{infer}} endpoints your deployment contains or create a new {{infer}} endpoint: -- using the [Create an inference endpoint API](https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-inference-put-1) +- using the [Create an inference endpoint API](https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-inference-put) - through the [Inference endpoints UI](#add-inference-endpoints). -## Inference endpoints UI [inference-endpoints] +## Default {{infer}} endpoints [default-enpoints] + +Your {{es}} deployment contains preconfigured {{infer}} endpoints, which makes them easier to use when defining `semantic_text` fields or using {{infer}} processors. These endpoints come in two forms: + +- **Elastic Inference Service (EIS) endpoints**, which provide {{infer}} as a managed service and do not consume resources from your own nodes. + +- **ML node-based endpoints**, which run on your dedicated {{ml}} nodes. + +The following section lists the default {{infer}} endpoints, identified by their `inference_id`, grouped by whether they are EIS- or ML node–based. + +### Default endpoints for Elastic {{infer-cap}} Service (EIS) + +- `.elser-2-elastic`: uses the [ELSER](/explore-analyze/machine-learning/nlp/ml-nlp-elser.md) trained model as an Elastic {{infer-cap}} Service for `sparse_embedding` tasks (recommended for English language text). The `model_id` is `.elser_model_2`. {applies_to}`stack: preview 9.1` {applies_to}`serverless: preview` + +### Default endpoints used on ML-nodes + +- `.elser-2-elasticsearch`: uses the [ELSER](/explore-analyze/machine-learning/nlp/ml-nlp-elser.md) built-in trained model for `sparse_embedding` tasks (recommended for English language text). The `model_id` is `.elser_model_2_linux-x86_64`. +- `.multilingual-e5-small-elasticsearch`: uses the [E5](../../explore-analyze/machine-learning/nlp/ml-nlp-e5.md) built-in trained model for `text_embedding` tasks (recommended for non-English language texts). The `model_id` is `.e5_model_2_linux-x86_64`. -The **Inference endpoints** page provides an interface for managing inference endpoints. +Use the `inference_id` of the endpoint in a [`semantic_text`](elasticsearch://reference/elasticsearch/mapping-reference/semantic-text.md) field definition or when creating an [{{infer}} processor](elasticsearch://reference/enrich-processor/inference-processor.md). The API call will automatically download and deploy the model which might take a couple of minutes. Default {{infer}} enpoints have adaptive allocations enabled. For these models, the minimum number of allocations is `0`. If there is no {{infer}} activity that uses the endpoint, the number of allocations will scale down to `0` automatically after 15 minutes. + +## {{infer-cap}} endpoints UI [inference-endpoints] + +The **{{infer-cap}} endpoints** page provides an interface for managing {{infer}} endpoints. :::{image} /explore-analyze/images/kibana-inference-endpoints-ui.png :alt: Inference endpoints UI @@ -29,31 +50,31 @@ The **Inference endpoints** page provides an interface for managing inference en Available actions: -* Add new endpoint -* View endpoint details -* Copy the inference endpoint ID -* Delete endpoints +- Add new endpoint +- View endpoint details +- Copy the inference endpoint ID +- Delete endpoints -## Add new inference endpoint [add-inference-endpoints] +## Add new {{infer}} endpoint [add-inference-endpoints] -To add a new interference endpoint using the UI: +To add a new {{infer}} endpoint using the UI: 1. Select the **Add endpoint** button. 1. Select a service from the drop down menu. 1. Provide the required configuration details. 1. Select **Save** to create the endpoint. -If your inference endpoint uses a model deployed in Elastic’s infrastructure, such as ELSER, E5, or a model uploaded through Eland, you can configure [adaptive allocations](#adaptive-allocations) to dynamically adjust resource usage based on the current demand. +If your {{infer}} endpoint uses a model deployed in Elastic’s infrastructure, such as ELSER, E5, or a model uploaded through Eland, you can configure [adaptive allocations](#adaptive-allocations) to dynamically adjust resource usage based on the current demand. ## Adaptive allocations [adaptive-allocations] -Adaptive allocations allow inference services to dynamically adjust the number of model allocations based on the current load. -This feature is only supported for models deployed in Elastic’s infrastructure, such as ELSER, E5, or models uploaded through Eland. It is not available for third-party services (for example, Alibaba Cloud, Cohere, or OpenAI), because those models are hosted externally and not deployed within your Elasticsearch cluster. +Adaptive allocations allow {{infer}} services to dynamically adjust the number of model allocations based on the current load. +This feature is only supported for models deployed in Elastic’s infrastructure, such as ELSER, E5, or models uploaded through Eland. It is not available for models used through the Elastic {{infer-cap}} Service (EIS) and third-party services (for example, Alibaba Cloud, Cohere, or OpenAI), because those models are not deployed within your Elasticsearch cluster. When adaptive allocations are enabled: -* The number of allocations scales up automatically when the load increases. -* Allocations scale down to a minimum of 0 when the load decreases, saving resources. +- The number of allocations scales up automatically when the load increases. +- Allocations scale down to a minimum of 0 when the load decreases, saving resources. ### Allocation scaling behavior @@ -71,15 +92,6 @@ However, setting the `min_number_of_allocations` to a value greater than `0` kee For more information about adaptive allocations and resources, refer to the [trained model autoscaling](/deploy-manage/autoscaling/trained-model-autoscaling.md) documentation. -## Default {{infer}} endpoints [default-enpoints] - -Your {{es}} deployment contains preconfigured {{infer}} endpoints which makes them easier to use when defining `semantic_text` fields or using {{infer}} processors. The following list contains the default {{infer}} endpoints listed by `inference_id`: - -* `.elser-2-elasticsearch`: uses the [ELSER](../../explore-analyze/machine-learning/nlp/ml-nlp-elser.md) built-in trained model for `sparse_embedding` tasks (recommended for English language tex). The `model_id` is `.elser_model_2_linux-x86_64`. -* `.multilingual-e5-small-elasticsearch`: uses the [E5](../../explore-analyze/machine-learning/nlp/ml-nlp-e5.md) built-in trained model for `text_embedding` tasks (recommended for non-English language texts). The `model_id` is `.e5_model_2_linux-x86_64`. - -Use the `inference_id` of the endpoint in a [`semantic_text`](elasticsearch://reference/elasticsearch/mapping-reference/semantic-text.md) field definition or when creating an [{{infer}} processor](elasticsearch://reference/enrich-processor/inference-processor.md). The API call will automatically download and deploy the model which might take a couple of minutes. Default {{infer}} enpoints have adaptive allocations enabled. For these models, the minimum number of allocations is `0`. If there is no {{infer}} activity that uses the endpoint, the number of allocations will scale down to `0` automatically after 15 minutes. - ## Configuring chunking [infer-chunking-config] {{infer-cap}} endpoints have a limit on the amount of text they can process at once, determined by the model's input capacity. Chunking is the process of splitting the input text into pieces that remain within these limits. diff --git a/explore-analyze/machine-learning/nlp/ml-nlp-elser.md b/explore-analyze/machine-learning/nlp/ml-nlp-elser.md index c4898ca846..c940762052 100644 --- a/explore-analyze/machine-learning/nlp/ml-nlp-elser.md +++ b/explore-analyze/machine-learning/nlp/ml-nlp-elser.md @@ -32,7 +32,10 @@ This approach provides a more understandable search experience compared to vecto To use ELSER, you must have the [appropriate subscription](https://www.elastic.co/subscriptions) level for semantic search or the trial period activated. ::::{note} -The minimum dedicated ML node size for deploying and using the ELSER model is 4 GB in {{ech}} if [deployment autoscaling](../../../deploy-manage/autoscaling.md) is turned off. Turning on autoscaling is recommended because it allows your deployment to dynamically adjust resources based on demand. Better performance can be achieved by using more allocations or more threads per allocation, which requires bigger ML nodes. Autoscaling provides bigger nodes when required. If autoscaling is turned off, you must provide suitably sized nodes yourself. + +- You can use the ELSER model through the [Elastic {{infer-cap}} Service (EIS)](/explore-analyze/elastic-inference/eis.md). If you use ELSER on EIS, you don't need to manage the infrastructure and resources required by the ELSER model as it doesn't use the resources of your nodes. + +- The minimum dedicated ML node size for deploying and using the ELSER model is 4 GB in {{ech}} if [deployment autoscaling](../../../deploy-manage/autoscaling.md) is turned off. Turning on autoscaling is recommended because it allows your deployment to dynamically adjust resources based on demand. Better performance can be achieved by using more allocations or more threads per allocation, which requires bigger ML nodes. Autoscaling provides bigger nodes when required. If autoscaling is turned off, you must provide suitably sized nodes yourself. :::: Enabling trained model autoscaling for your ELSER deployment is recommended. Refer to [*Trained model autoscaling*](../../../deploy-manage/autoscaling/trained-model-autoscaling.md) to learn more. diff --git a/explore-analyze/toc.yml b/explore-analyze/toc.yml index 0e0de372d3..87db28a021 100644 --- a/explore-analyze/toc.yml +++ b/explore-analyze/toc.yml @@ -122,6 +122,7 @@ toc: - file: transforms/transform-limitations.md - file: elastic-inference.md children: + - file: elastic-inference/eis.md - file: elastic-inference/inference-api.md - file: machine-learning.md children: