Loading

ES|QL TEXT_EMBEDDING function

Embedded
text
Text string to generate embeddings from. Must be a non-null literal string value.
inference_id
Identifier of an existing inference endpoint that will generate the embeddings. The inference endpoint must have the text_embedding task type and should use the same model that was used to embed your indexed data.
options

(Optional) Options for the inference request.

Generates dense vector embeddings from text input using a specified inference endpoint. Use this function to generate query vectors for KNN searches against your vectorized data or others dense vector based operations.

text inference_id options result
keyword keyword named parameters dense_vector
timeout

(keyword) Timeout for the inference request (e.g. "30s", "1m").

Generate text embeddings using the 'test_dense_inference' inference endpoint.

FROM dense_vector_text METADATA _score
| WHERE KNN(text_embedding_field, TEXT_EMBEDDING("be excellent to each other", "test_dense_inference"))