The generic utterance model only covers the text, intent and entities for a given NLU scenario. For some NLU providers, we may want to include additional context, such as a confidence score for the intent prediction or a timestamp for when the request was made. This document covers some of the common extensions to the generic utterance model used across the LUIS, Lex, and Dialogflow NLU providers.
When an NLU provider in NLU.DevOps returns a prediction result, the value will be serialized as-is, meaning any additional properties included in the result will be serialized as well. Currently, LUIS and Dialogflow return text transcription and intent confidence scores in textScore
and score
properties, respectively. E.g.:
{
"text": "play a rock song",
"intent": "PlayMusic",
"entities": [
{
"matchText": "rock",
"entityType": "genre",
"score": 0.80
}
],
"score": 0.99,
"textScore": 0.95
}
In this case, the intent confidence score was 0.99
and the text transcription confidence score was 0.95
. This is useful context when debugging false predictions, as a low confidence score may indicate that the model could be improved with more training examples. The recognized genre
entity also includes a confidence score of 0.80
, although it should be noted that only the LUIS provider currently returns confidence score for entity types trained from examples.