You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[DOCS] [8.17] Adds new default inference endpoint information (#117985) (#118239)
* Adds new default inference information
* Update docs/reference/mapping/types/semantic-text.asciidoc
* Update docs/reference/search/search-your-data/semantic-search-semantic-text.asciidoc
* Update docs/reference/mapping/types/semantic-text.asciidoc
---------
Co-authored-by: István Zoltán Szabó <[email protected]>
Co-authored-by: David Kyle <[email protected]>
Copy file name to clipboardExpand all lines: docs/reference/mapping/types/semantic-text.asciidoc
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,13 +12,14 @@ Long passages are <<auto-text-chunking, automatically chunked>> to smaller secti
12
12
13
13
The `semantic_text` field type specifies an inference endpoint identifier that will be used to generate embeddings.
14
14
You can create the inference endpoint by using the <<put-inference-api>>.
15
-
This field type and the <<query-dsl-semantic-query,`semantic` query>> type make it simpler to perform semantic search on your data.
16
-
If you don't specify an inference endpoint, the <<infer-service-elser,ELSER service>> is used by default.
15
+
This field type and the <<query-dsl-semantic-query,`semantic` query>> type make it simpler to perform semantic search on your data.
16
+
17
+
If you don’t specify an inference endpoint, the `inference_id` field defaults to `.elser-2-elasticsearch`, a preconfigured endpoint for the elasticsearch service.
17
18
18
19
Using `semantic_text`, you won't need to specify how to generate embeddings for your data, or how to index it.
19
20
The {infer} endpoint automatically determines the embedding generation, indexing, and query to use.
20
21
21
-
If you use the ELSER service, you can set up `semantic_text` with the following API request:
22
+
If you use the preconfigured `.elser-2-elasticsearch` endpoint, you can set up `semantic_text` with the following API request:
If you use a service other than ELSER, you must create an {infer} endpoint using the <<put-inference-api>> and reference it when setting up `semantic_text` as the following example demonstrates:
38
+
To use a custom {infer} endpoint instead of the default `.elser-2-elasticsearch`, you must <<put-inference-api>> and specify its `inference_id` when setting up the `semantic_text` field type.
<1> The `inference_id` of the {infer} endpoint to use to generate embeddings.
55
56
56
-
57
-
The recommended way to use semantic_text is by having dedicated {infer} endpoints for ingestion and search.
57
+
The recommended way to use `semantic_text` is by having dedicated {infer} endpoints for ingestion and search.
58
58
This ensures that search speed remains unaffected by ingestion workloads, and vice versa.
59
59
After creating dedicated {infer} endpoints for both, you can reference them using the `inference_id` and `search_inference_id` parameters when setting up the index mapping for an index that uses the `semantic_text` field.
60
60
@@ -82,10 +82,11 @@ PUT my-index-000003
82
82
83
83
`inference_id`::
84
84
(Required, string)
85
-
{infer-cap} endpoint that will be used to generate the embeddings for the field.
85
+
{infer-cap} endpoint that will be used to generate embeddings for the field.
86
+
By default, `.elser-2-elasticsearch` is used.
86
87
This parameter cannot be updated.
87
88
Use the <<put-inference-api>> to create the endpoint.
88
-
If `search_inference_id` is specified, the {infer} endpoint defined by `inference_id` will only be used at index time.
89
+
If `search_inference_id` is specified, the {infer} endpoint will only be used at index time.
Copy file name to clipboardExpand all lines: docs/reference/search/search-your-data/semantic-search-semantic-text.asciidoc
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,15 +14,15 @@ You don't need to define model related settings and parameters, or create {infer
14
14
The recommended way to use <<semantic-search,semantic search>> in the {stack} is following the `semantic_text` workflow.
15
15
When you need more control over indexing and query settings, you can still use the complete {infer} workflow (refer to <<semantic-search-inference,this tutorial>> to review the process).
16
16
17
-
This tutorial uses the <<inference-example-elser,`elser` service>> for demonstration, but you can use any service and their supported models offered by the {infer-cap} API.
17
+
This tutorial uses the <<infer-service-elasticsearch,`elasticsearch` service>> for demonstration, but you can use any service and their supported models offered by the {infer-cap} API.
18
18
19
19
20
20
[discrete]
21
21
[[semantic-text-requirements]]
22
22
==== Requirements
23
23
24
-
This tutorial uses the <<infer-service-elser,ELSER service>> for demonstration, which is created automatically as needed.
25
-
To use the `semantic_text` field type with an {infer} service other than ELSER, you must create an inference endpoint using the <<put-inference-api>>.
24
+
This tutorial uses the <<infer-service-elasticsearch,`elasticsearch` service>> for demonstration, which is created automatically as needed.
25
+
To use the `semantic_text` field type with an {infer} service other than `elasticsearch` service, you must create an inference endpoint using the <<put-inference-api>>.
26
26
27
27
28
28
[discrete]
@@ -48,7 +48,7 @@ PUT semantic-embeddings
48
48
// TEST[skip:TBD]
49
49
<1> The name of the field to contain the generated embeddings.
50
50
<2> The field to contain the embeddings is a `semantic_text` field.
51
-
Since no `inference_id` is provided, the <<infer-service-elser,ELSER service>> is used by default.
51
+
Since no `inference_id` is provided, the default endpoint `.elser-2-elasticsearch` for the <<infer-service-elasticsearch,`elasticsearch` service>> is used.
52
52
To use a different {infer} service, you must create an {infer} endpoint first using the <<put-inference-api>> and then specify it in the `semantic_text` field mapping using the `inference_id` parameter.
Copy file name to clipboardExpand all lines: docs/reference/search/search-your-data/semantic-text-hybrid-search
+7-44Lines changed: 7 additions & 44 deletions
Original file line number
Diff line number
Diff line change
@@ -8,47 +8,12 @@ This tutorial demonstrates how to perform hybrid search, combining semantic sear
8
8
9
9
In hybrid search, semantic search retrieves results based on the meaning of the text, while full-text search focuses on exact word matches. By combining both methods, hybrid search delivers more relevant results, particularly in cases where relying on a single approach may not be sufficient.
10
10
11
-
The recommended way to use hybrid search in the {stack} is following the `semantic_text` workflow. This tutorial uses the <<inference-example-elser,`elser` service>> for demonstration, but you can use any service and its supported models offered by the {infer-cap} API.
12
-
13
-
[discrete]
14
-
[[semantic-text-hybrid-infer-endpoint]]
15
-
==== Create the {infer} endpoint
16
-
17
-
Create an inference endpoint by using the <<put-inference-api>>:
<1> The task type is `sparse_embedding` in the path as the `elser` service will
36
-
be used and ELSER creates sparse vectors. The `inference_id` is
37
-
`my-elser-endpoint`.
38
-
<2> The `elser` service is used in this example.
39
-
<3> This setting enables and configures adaptive allocations.
40
-
Adaptive allocations make it possible for ELSER to automatically scale up or down resources based on the current load on the process.
41
-
42
-
[NOTE]
43
-
====
44
-
You might see a 502 bad gateway error in the response when using the {kib} Console.
45
-
This error usually just reflects a timeout, while the model downloads in the background.
46
-
You can check the download progress in the {ml-app} UI.
47
-
====
11
+
The recommended way to use hybrid search in the {stack} is following the `semantic_text` workflow.
12
+
This tutorial uses the <<infer-service-elasticsearch,`elasticsearch` service>> for demonstration, but you can use any service and their supported models offered by the {infer-cap} API.
48
13
49
14
[discrete]
50
15
[[hybrid-search-create-index-mapping]]
51
-
==== Create an index mapping for hybrid search
16
+
==== Create an index mapping
52
17
53
18
The destination index will contain both the embeddings for semantic search and the original text field for full-text search. This structure enables the combination of semantic search and full-text search.
0 commit comments