Predict

Predicts the intents associated with a given input utterance.

Path Parameters
namespace string โ€” REQUIRED

Namespace where the workspace is located.

playbook_id string โ€” REQUIRED

Unique identifier of the workspace whose model is to be used.

Request body โ€” REQUIRED
namespace string

Namespace where the workspace is located.

playbook_id string

Unique identifier of the workspace whose model is to be used.

input_utterance string

Input text to classify.

model_id string

Optional. Specifies which model to use through its unique NLU engine identifier. If none specified, the default is used.

revision_id string

Optional. Specifies which revision of the model to use.

intent_tags TagPredicate
require_ids string[]

Only include objects with ALL of the given tag ids.

include_ids string[]

Only include objects with ANY of the given tag ids.

exclude_ids string[]

Exclude objects with ANY of the given tag ids.

Response Body
matches IntentMatch[]

Raw list of matches ordered by descending score (no hierarchical considerations)

id string

The intent id that was matched.

name string

The name of the intent when the model was trained.

hierarchy_ids string[]

Intent IDs of the lineage of the matched intent. The first ID is the root parent intent, the last is the matched intent.

hierarchy_names string[]

Intent names of the lineage of the matched intent. The first name is the root parent intent, the last is the matched intent.

score float

The probability of this being the right matched, as determined by the underlying model.

hier_matches HierIntentMatch[]

List of matches rescored with hierarchical considerations.

id string

The intent id that was matched.

name string

The name of the intent when the model was trained.

score float

The recursive sum of the scores of all the sub-intents.

own_score float

The probability of this intent, if its children were disregarded.

children_entropy float

The entropy of the intent's direct children.

children HierIntentMatch (circular)[]

The match probabilities for this intent's direct children

entity_matches EntityMatch[]

Entity matches, if available

entity EntityReference

Sync from zia.ai.playbook.EntityReference

entity_id string

Unique identifier of the entity for database storage.

key string

Key by which we can refer to this entity in the utterance. Ex (rasa): I'd like to visit [New York City](city) where city is the key

text string

Text used to reference the entity in the utterance Ex (rasa): I'd like to visit [New York City](city) where New York City is the text.

value string

If the reference text isn't the main entity value, this value points to the right key value to use. For example, for a city entity, if a synonym was used, this value would contain the key value it refers to in the entity. (rasa long): I went to NYC{"entity": "city", "value": "New York City"} where 'New York City' is the value (rasa short): I went to NYC(city:New York City)

value_id string

Unique identifier of the entity value for database storage.

role string

If entity has repeated usage in the utterance, assigns role for each usage Ex (rasa): I want to fly from Berlin{"entity": "city", "role": "departure"} to San Francisco{"entity": "city", "role": "destination"}.

score float

The confidence score for this match

span Span
start uint32

The start of this entity, as the utf8 byte index

end uint32

The end of this entity, as the utf8 byte index

extractor string

(Rasa specific) Name of the pipeline component that found this entity

parts InputPart[]

If there are entity matches, matches in part format for convenience

text Text
text string
entity EntityMatch
entity EntityReference

Sync from zia.ai.playbook.EntityReference

entity_id string

Unique identifier of the entity for database storage.

key string

Key by which we can refer to this entity in the utterance. Ex (rasa): I'd like to visit [New York City](city) where city is the key

text string

Text used to reference the entity in the utterance Ex (rasa): I'd like to visit [New York City](city) where New York City is the text.

value string

If the reference text isn't the main entity value, this value points to the right key value to use. For example, for a city entity, if a synonym was used, this value would contain the key value it refers to in the entity. (rasa long): I went to NYC{"entity": "city", "value": "New York City"} where 'New York City' is the value (rasa short): I went to NYC(city:New York City)

value_id string

Unique identifier of the entity value for database storage.

role string

If entity has repeated usage in the utterance, assigns role for each usage Ex (rasa): I want to fly from Berlin{"entity": "city", "role": "departure"} to San Francisco{"entity": "city", "role": "destination"}.

score float

The confidence score for this match

span Span
start uint32

The start of this entity, as the utf8 byte index

end uint32

The end of this entity, as the utf8 byte index

extractor string

(Rasa specific) Name of the pipeline component that found this entity

model_id string

The model that was used to make this prediction.

revision_id string

The revision of the model that was used to make this prediction.