AuthThe Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.AvailabilityPlannedWe plan to add this functionality in a future Elastic Stack update. Subject to changes.Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Answer a set of named questions about an input, such as whether a customer is complaining, which team should handle a request, or how angry a customer is.
The questions are defined in the task settings of the inference endpoint, and can be replaced for a single request through task_settings.
Note
Only the elastic service currently supports the decision task.
An object containing the input data for a single item for the model to embed.
typeenumrequired
The type of input to embed. Not all models support all input types.
The audio, video, and pdf types are available in Elasticsearch 9.5.0 and later.
Values:textimageaudiovideopdf
formatenum
The format of the input. For the text type this must be text. For all other types, this must be base64 or url.
If not specified, this will default to text for the text type and base64 for all other types.
The url format is available in Elasticsearch 9.6.0 and later.
Not all services and models support all formats.
Values:textbase64url
valuestringrequired
The value of the input to embed. For the base64 format, this must be a base64-encoded data URI, i.e. "data:content/type;base64,...".
For the url format, this must be a URL that points to the content, i.e. "https://example.com/image.jpg".
task_settingsobject
Task settings for the individual inference request.
These settings override the task settings specified when creating the inference endpoint.
questionsmapstring to oneOf
The questions to answer, keyed by question name. The answers in the response use the same names.
The questions replace the ones of the inference endpoint as a whole. At least one question is required.
<string>uniononeOf
One of:
type: predicate
A question answered with the probability that the statement in instructions is true.
typeenumrequired
Values:predicate
instructionsstringrequired
A description of what to decide. It must not be empty.
type: choice
A question answered with one option out of a fixed set of choices.
typeenumrequired
Values:choice
instructionsstringrequired
A description of what to decide. It must not be empty.
choicesmapstring to stringrequired
The options to choose from, each mapped to an optional description. At least two choices are required.
type: score
A question answered with the probability-weighted position on an ordered scale of levels.
typeenumrequired
Values:score
instructionsstringrequired
A description of what to decide. It must not be empty.
levelsuniononeOf[]required
The levels of the scale, ordered from lowest to highest. At least two levels are required.