Skip to content

Commit 5b4ef3e

Browse files
[DOCS] Consolidates ELSER deployment guide with ES deployment tutorial content (#2560) (#2561)
Co-authored-by: István Zoltán Szabó <[email protected]>
1 parent 54c6b5b commit 5b4ef3e

File tree

5 files changed

+76
-15
lines changed

5 files changed

+76
-15
lines changed
Loading
Loading
Loading

docs/en/stack/ml/nlp/ml-nlp-elser.asciidoc

Lines changed: 70 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ are learned to co-occur frequently within a diverse set of training data. The
2525
terms that the text is expanded into by the model _are not_ synonyms for the
2626
search terms; they are learned associations. These expanded terms are weighted
2727
as some of them are more significant than others. Then the {es}
28-
{ref}/rank-features.html[sparse vector (or rank features) field type] is used to
29-
store the terms and weights at index time, and to search against later.
28+
{ref}/sparse-vector.html[sparse vector]
29+
(or {ref}/rank-features.html[rank features]) field type is used to store the
30+
terms and weights at index time, and to search against later.
3031

3132

3233
[discrete]
@@ -82,7 +83,7 @@ how to reindex your data through the pipeline.
8283
== Download and deploy ELSER
8384

8485
You can download and deploy ELSER either from **{ml-app}** > **Trained Models**,
85-
from **{ents}** > **Indices**, or by using the Dev Console.
86+
from **Search** > **Indices**, or by using the Dev Console.
8687

8788
[discrete]
8889
[[trained-model]]
@@ -113,22 +114,65 @@ image::images/ml-nlp-deployment-id-elser-v2.png[alt="Deploying ELSER",align="cen
113114

114115

115116
[discrete]
116-
[[enterprise-search]]
117-
=== Using the Indices page in {ents}
117+
[[elasticsearch]]
118+
=== Using the search indices UI
118119

119-
You can also download and deploy ELSER to an {infer} pipeline directly from the
120-
{ents} app.
120+
Alternatively, you can download and deploy ELSER to an {infer} pipeline using
121+
the search indices UI.
121122

122-
1. In {kib}, navigate to **{ents}** > **Indices**.
123+
1. In {kib}, navigate to **Search** > **Indices**.
123124
2. Select the index from the list that has an {infer} pipeline in which you want
124125
to use ELSER.
125126
3. Navigate to the **Pipelines** tab.
126127
4. Under **{ml-app} {infer-cap} Pipelines**, click the **Deploy** button to
127128
begin downloading the ELSER model. This may take a few minutes depending on your
128-
network. Once it's downloaded, click the **Start single-threaded** button to
129+
network.
130+
+
131+
--
132+
[role="screenshot"]
133+
image::images/ml-nlp-deploy-elser-v2-es.png[alt="Deploying ELSER in Elasticsearch",align="center"]
134+
--
135+
5. Once the model is downloaded, click the **Start single-threaded** button to
129136
start the model with basic configuration or select the **Fine-tune performance**
130137
option to navigate to the **Trained Models** page where you can configure the
131138
model deployment.
139+
+
140+
--
141+
[role="screenshot"]
142+
image::images/ml-nlp-start-elser-v2-es.png[alt="Start ELSER in Elasticsearch",align="center"]
143+
--
144+
145+
When your ELSER model is deployed and started, it is ready to be used in a
146+
pipeline.
147+
148+
149+
[discrete]
150+
[[elasticsearch-ingest-pipeline]]
151+
==== Adding ELSER to an ingest pipeline
152+
153+
To add ELSER to an ingest pipeline, you need to copy the default ingest
154+
pipeline and then customize it according to your needs.
155+
156+
1. Click **Copy and customize** under the **Unlock your custom pipelines** block
157+
at the top of the page. This enables the **Add inference pipeline** button.
158+
+
159+
--
160+
[role="screenshot"]
161+
image::images/ml-nlp-pipeline-copy-customize.png[alt="Start ELSER in Elasticsearch",align="center"]
162+
--
163+
2. Under **{ml-app} {infer-cap} Pipelines**, click **Add inference pipeline**.
164+
3. Give a name to the pipeline, select ELSER from the list of trained ML models,
165+
and click **Continue**.
166+
4. Select the source text field, define the target field, and click **Add** then
167+
**Continue**.
168+
5. Review the index mappings updates. Click **Back** if you want to change the
169+
mappings. Click **Continue** if you are satisfied with the updated index
170+
mappings.
171+
6. You can optionally test your pipeline. Click **Continue**.
172+
7. **Create pipeline**.
173+
174+
Once your pipeline is created, you are ready to ingest documents and utilize
175+
ELSER for text expansions in your search queries.
132176

133177

134178
[discrete]
@@ -295,6 +339,23 @@ clicking **Reload examples**.
295339
image::images/ml-nlp-elser-v2-test.png[alt="Testing ELSER",align="center"]
296340

297341

342+
[discrete]
343+
[[performance]]
344+
== Performance considerations
345+
346+
* ELSER works best on small-to-medium sized fields that contain natural
347+
language. For connector or web crawler use cases, this aligns best with fields
348+
like _title_, _description_, _summary_, or _abstract_. As ELSER encodes the
349+
first 512 tokens of a field, it may not be as good a match for `body_content` on
350+
web crawler documents, or body fields resulting from extracting text from office
351+
documents with connectors.
352+
* Larger documents take longer at ingestion time, and {infer} time per
353+
document also increases the more fields in a document that need to be processed.
354+
* The more fields your pipeline has to perform inference on, the longer it takes
355+
per document to ingest.
356+
357+
To learn more about ELSER performance, refer to the <<elser-benchmarks>>.
358+
298359
[discrete]
299360
[[further-readings]]
300361
== Further reading

docs/en/stack/ml/nlp/ml-nlp-limitations.asciidoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ the Elastic {nlp} trained models feature.
1111

1212
[discrete]
1313
[[ml-nlp-elser-v1-limit-512]]
14-
== ELSER v1 semantic search is limited to 512 tokens per field that inference is applied to
14+
== ELSER semantic search is limited to 512 tokens per field that inference is applied to
1515

16-
When you use ELSER v1 for semantic search, only the first 512 extracted tokens
17-
from each field of the ingested documents that ELSER is applied to are taken
18-
into account for the search process. If your data set contains long documents,
19-
divide them into smaller segments before ingestion if you need the full text to
20-
be searchable.
16+
When you use ELSER for semantic search, only the first 512 extracted tokens from
17+
each field of the ingested documents that ELSER is applied to are taken into
18+
account for the search process. If your data set contains long documents, divide
19+
them into smaller segments before ingestion if you need the full text to be
20+
searchable.

0 commit comments

Comments
 (0)