Skip to content

[ML] Expose the Input Type option for the text_embedding task in the Inference API #117856

@davidkyle

Description

@davidkyle

Description

Many of the integrated inference services have an input type option for text embeddings which modifies the resulting embedding for a specific use. The inference API has an InputType class for internal use and depending on where the text embedding call is made the Inference API will pick either the search or ingest input type.

When ingesting documents with an ingest pipeline or into a semantic text field the ingest type is used, when used in a query the search type is used automatically, this way users don't have to worry about selecting the right type and will get consistent results.

Exposing the input_type option in the POST _inference API is a natural extension that gives users more control over their embeddings. This change should not alter the search or ingest behaviours.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions