Skip to content

Commit f7433a5

Browse files
Improves ELSER recommendations. (#2855) (#2856)
(cherry picked from commit a52fc2a) Co-authored-by: István Zoltán Szabó <[email protected]>
1 parent 7e48698 commit f7433a5

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

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

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -427,18 +427,13 @@ image::images/ml-nlp-elser-v2-test.png[alt="Testing ELSER",align="center"]
427427
[[performance]]
428428
== Performance considerations
429429

430-
* ELSER works best on small-to-medium sized fields that contain natural
431-
language. For connector or web crawler use cases, this aligns best with fields
432-
like _title_, _description_, _summary_, or _abstract_. As ELSER encodes the
433-
first 512 tokens of a field, it may not provide as relevant of results for large
434-
fields. For example, `body_content` on web crawler documents, or body fields
435-
resulting from extracting text from office documents with connectors. For larger
436-
fields like these, consider "chunking" the content into multiple values, where
437-
each chunk can be under 512 tokens.
438-
* Larger documents take longer at ingestion time, and {infer} time per
439-
document also increases the more fields in a document that need to be processed.
440-
* The more fields your pipeline has to perform inference on, the longer it takes
441-
per document to ingest.
430+
* ELSER works best on small-to-medium sized fields that contain natural language.
431+
For connector or web crawler use cases, this aligns best with fields like _title_, _description_, _summary_, or _abstract_.
432+
As ELSER encodes the first 512 tokens of a field, it may not provide as relevant of results for large fields.
433+
For example, `body_content` on web crawler documents, or body fields resulting from extracting text from office documents with connectors.
434+
For larger fields like these, consider "chunking" the content into multiple values, where each chunk can be under 512 tokens.
435+
* Larger documents take longer at ingestion time, and {infer} time per document also increases the more fields in a document that need to be processed.
436+
* The more fields your pipeline has to perform inference on, the longer it takes per document to ingest.
442437

443438
To learn more about ELSER performance, refer to the <<elser-benchmarks>>.
444439

@@ -460,15 +455,21 @@ Always review and clean your input text before ingestion to eliminate any irrele
460455

461456
To gain the biggest value out of ELSER trained models, consider to follow this list of recommendations.
462457

463-
* Use two ELSER {infer} endpoints: one optimized for ingest and one optimized for search.
464458
* If quick response time is important for your use case, keep {ml} resources available at all times by setting `min_allocations` to `1`.
465459
* Setting `min_allocations` to `0` can save on costs for non-critical use cases or testing environments.
460+
* Enabling <<ml-nlp-auto-scale,autoscaling>> through adaptive allocations or adaptive resources makes it possible for {es} to scale up or down the available resources of your ELSER deployment based on the load on the process.
461+
462+
* Use two ELSER {infer} endpoints: one optimized for ingest and one optimized for search.
463+
** In {kib}, you can select for which case you want to optimize your ELSER deployment.
464+
** If you use the {infer} API and want to optimize your ELSER endpoint for ingest, set the number of threads to `1` (`"num_threads": 1`).
465+
** If you use the {infer} API and want to optimize your ELSER endpoint for search, set the number of threads to greater than `1`.
466466

467467

468468
[discrete]
469469
[[further-readings]]
470470
== Further reading
471471

472+
* {ref}/semantic-search-semantic-text.html[Perform semantic search with `semantic_text` using the ELSER endpoint]
472473
* {ref}/semantic-search-elser.html[Perform semantic search with ELSER]
473474

474475

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ predictions.
1414

1515
* <<ml-nlp-overview>>
1616
* <<ml-nlp-deploy-models>>
17-
* <<<ml-nlp-auto-scale>>
17+
* <<ml-nlp-auto-scale>>
1818
* <<ml-nlp-inference>>
1919
* <<ml-nlp-apis>>
2020
* <<ml-nlp-elser>>

0 commit comments

Comments
 (0)