Skip to content

Commit e1e2df0

Browse files
authored
[DOCS][ML] Document the text_expansion task type (#119581) (#119876)
1 parent 03231d2 commit e1e2df0

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

docs/reference/ml/ml-shared.asciidoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,12 @@ tag::inference-config-text-embedding-size[]
11671167
The number of dimensions in the embedding vector produced by the model.
11681168
end::inference-config-text-embedding-size[]
11691169

1170+
tag::inference-config-text-expansion[]
1171+
The text expansion task works with sparse embedding models to transform an input sequence
1172+
into a vector of weighted tokens. These embeddings capture semantic meanings and
1173+
context and can be used in a <<sparse-vector,sparse vector>> field for powerful insights.
1174+
end::inference-config-text-expansion[]
1175+
11701176
tag::inference-config-text-similarity[]
11711177
Text similarity takes an input sequence and compares it with another input sequence. This is commonly referred to
11721178
as cross-encoding. This task is useful for ranking document text when comparing it to another provided text input.

docs/reference/ml/trained-models/apis/put-trained-models.asciidoc

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,10 +395,10 @@ the model definition is not supplied.
395395
(Required, object)
396396
The default configuration for inference. This can be: `regression`,
397397
`classification`, `fill_mask`, `ner`, `question_answering`,
398-
`text_classification`, `text_embedding` or `zero_shot_classification`.
398+
`text_classification`, `text_embedding`, `text_expansion` or `zero_shot_classification`.
399399
If `regression` or `classification`, it must match the `target_type` of the
400400
underlying `definition.trained_model`. If `fill_mask`, `ner`,
401-
`question_answering`, `text_classification`, or `text_embedding`; the
401+
`question_answering`, `text_classification`, `text_embedding` or `text_expansion`; the
402402
`model_type` must be `pytorch`.
403403
+
404404
.Properties of `inference_config`
@@ -592,6 +592,25 @@ Refer to <<tokenization-properties>> to review the properties of the
592592
`tokenization` object.
593593
=====
594594
595+
`text_expansion`:::
596+
(Object, optional)
597+
include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=inference-config-text-expansion]
598+
+
599+
.Properties of text_expansion inference
600+
[%collapsible%open]
601+
=====
602+
`results_field`::::
603+
(Optional, string)
604+
include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=inference-config-results-field]
605+
606+
`tokenization`::::
607+
(Optional, object)
608+
include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization]
609+
+
610+
Refer to <<tokenization-properties>> to review the properties of the
611+
`tokenization` object.
612+
=====
613+
595614
`text_similarity`:::
596615
(Object, optional)
597616
include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=inference-config-text-similarity]

0 commit comments

Comments
 (0)