-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[DOCS] [8.17] Adds new default inference endpoint information #117985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kosabogi
merged 8 commits into
elastic:main
from
kosabogi:default-inference-endpoint-updates
Dec 9, 2024
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
be8a894
Adds new default inference information
kosabogi 290837a
Merge branch 'main' into default-inference-endpoint-updates
kosabogi 6eace79
Merge branch 'main' into default-inference-endpoint-updates
kosabogi a49fc95
Update docs/reference/mapping/types/semantic-text.asciidoc
kosabogi 4c9b868
Update docs/reference/search/search-your-data/semantic-search-semanti…
kosabogi e70afd3
Merge branch 'main' into default-inference-endpoint-updates
kosabogi 9d1c009
Update docs/reference/mapping/types/semantic-text.asciidoc
kosabogi 20e5189
Merge branch 'main' into default-inference-endpoint-updates
kosabogi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
|
||
The `semantic_text` field type specifies an inference endpoint identifier that will be used to generate embeddings. | ||
You can create the inference endpoint by using the <<put-inference-api>>. | ||
This field type and the <<query-dsl-semantic-query,`semantic` query>> type make it simpler to perform semantic search on your data. | ||
If you don't specify an inference endpoint, the <<infer-service-elser,ELSER service>> is used by default. | ||
This field type and the <<query-dsl-semantic-query,`semantic` query>> type make it simpler to perform semantic search on your data. | ||
|
||
If you don’t specify an inference endpoint, the `inference_id` field defaults to `.elser-2-elasticsearch`, a preconfigured endpoint for the ELSER service. | ||
|
||
Using `semantic_text`, you won't need to specify how to generate embeddings for your data, or how to index it. | ||
The {infer} endpoint automatically determines the embedding generation, indexing, and query to use. | ||
|
||
If you use the ELSER service, you can set up `semantic_text` with the following API request: | ||
If you use the preconfigured `.elser-2-elasticsearch` endpoint, you can set up `semantic_text` with the following API request: | ||
|
||
[source,console] | ||
------------------------------------------------------------ | ||
|
@@ -34,7 +35,7 @@ PUT my-index-000001 | |
} | ||
------------------------------------------------------------ | ||
|
||
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: | ||
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. | ||
|
||
[source,console] | ||
------------------------------------------------------------ | ||
|
@@ -53,8 +54,7 @@ PUT my-index-000002 | |
// TEST[skip:Requires inference endpoint] | ||
<1> The `inference_id` of the {infer} endpoint to use to generate embeddings. | ||
|
||
|
||
The recommended way to use semantic_text is by having dedicated {infer} endpoints for ingestion and search. | ||
The recommended way to use `semantic_text` is by having dedicated {infer} endpoints for ingestion and search. | ||
This ensures that search speed remains unaffected by ingestion workloads, and vice versa. | ||
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. | ||
|
||
|
@@ -82,10 +82,11 @@ PUT my-index-000003 | |
|
||
`inference_id`:: | ||
(Required, string) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like we forgot to update this to |
||
{infer-cap} endpoint that will be used to generate the embeddings for the field. | ||
{infer-cap} endpoint that will be used to generate embeddings for the field. | ||
By default, `.elser-2-elasticsearch` is used. | ||
This parameter cannot be updated. | ||
Use the <<put-inference-api>> to create the endpoint. | ||
If `search_inference_id` is specified, the {infer} endpoint defined by `inference_id` will only be used at index time. | ||
If `search_inference_id` is specified, the {infer} endpoint will only be used at index time. | ||
|
||
`search_inference_id`:: | ||
(Optional, string) | ||
|
@@ -129,7 +130,7 @@ Once a document is ingested, a `semantic_text` field will have the following str | |
"inference_field": { | ||
"text": "these are not the droids you're looking for", <1> | ||
"inference": { | ||
"inference_id": "my-elser-endpoint", <2> | ||
"inference_id": ".elser-2-elasticsearch", <2> | ||
"model_settings": { <3> | ||
"task_type": "sparse_embedding" | ||
}, | ||
|
@@ -208,7 +209,7 @@ PUT test-index | |
"properties": { | ||
"infer_field": { | ||
"type": "semantic_text", | ||
"inference_id": "my-elser-endpoint" | ||
"inference_id": ".elser-2-elasticsearch" | ||
}, | ||
"source_field": { | ||
"type": "text", | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.