Natural language recognition in Agents

icon picker
Top-5 intents

The
@Platform
has a "Top-5
@Intent
s" functionality, which is presented in the form of a
@Context Variable
@nlu_result
.
The
@Context Variable
appears when the
@Bot User
@Request
passes through the
@NLU
@Slot
and contains information about the top 5 recognized
@Intent
s in descending order of
@confidence
.
Example of
@Context Variable
@nlu_result
: [{'intent_name': 'size', 'confidence': 0.9993743300437927}, {'intent_name': 'product_in_stock', 'confidence': 0.00019508253899402916}, {'intent_name': 'model_price', 'confidence': 0.00012844608863815665}, {'intent_name': 'address', 'confidence': 0.00010525238758418709}, {'intent_name': 'change_info', 'confidence': 6.851823127362877e-05}]
The
@nlu_result
can contain a different number of key and value pairs:
5 pairs — if the
@NLU
@Slot
has 5 or more
@intent
@Subslot
s;
2-4 pairs — if the
@NLU
@Slot
has from 2 to 4
@intent
@Subslot
s (the number of pairs will correspond to the number of
@intent
@Subslot
s);
1 pair — if the
@Bot User
@Request
is an exact match with the
@Training Phrase
of one of the
@Intent
s.
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.