Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/reference/ml/ml-shared.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,12 @@ tag::inference-config-text-embedding-size[]
The number of dimensions in the embedding vector produced by the model.
end::inference-config-text-embedding-size[]

tag::inference-config-text-expansion[]
The text expansion task works with sparse embedding models to transform an input sequence
into a vector of weighted tokens. These embeddings capture semantic meanings and
context and can be used in a <<sparse-vector,sparse vector>> field for powerful insights.
end::inference-config-text-expansion[]

tag::inference-config-text-similarity[]
Text similarity takes an input sequence and compares it with another input sequence. This is commonly referred to
as cross-encoding. This task is useful for ranking document text when comparing it to another provided text input.
Expand Down
23 changes: 21 additions & 2 deletions docs/reference/ml/trained-models/apis/put-trained-models.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,10 @@ the model definition is not supplied.
(Required, object)
The default configuration for inference. This can be: `regression`,
`classification`, `fill_mask`, `ner`, `question_answering`,
`text_classification`, `text_embedding` or `zero_shot_classification`.
`text_classification`, `text_embedding`, `text_expansion` or `zero_shot_classification`.
If `regression` or `classification`, it must match the `target_type` of the
underlying `definition.trained_model`. If `fill_mask`, `ner`,
`question_answering`, `text_classification`, or `text_embedding`; the
`question_answering`, `text_classification`, `text_embedding` or `text_expansion`; the
`model_type` must be `pytorch`.
+
.Properties of `inference_config`
Expand Down Expand Up @@ -592,6 +592,25 @@ Refer to <<tokenization-properties>> to review the properties of the
`tokenization` object.
=====

`text_expansion`:::
(Object, optional)
include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=inference-config-text-expansion]
+
.Properties of text_expansion inference
[%collapsible%open]
=====
`results_field`::::
(Optional, string)
include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=inference-config-results-field]

`tokenization`::::
(Optional, object)
include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization]
+
Refer to <<tokenization-properties>> to review the properties of the
`tokenization` object.
=====

`text_similarity`:::
(Object, optional)
include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=inference-config-text-similarity]
Expand Down