Natural Language Understanding (NLU)

Sentiment Analysis provides BigFix AEX the capability to extract user sentiments (anger, sadness, happiness etc.) and intent categories (software issue, hardware issue, installation etc.) from user utterances. This can be used to design more intuitive conversations.

To start using the Semantic Analysis, user needs to access the Global Admin Console, and from there select the NLU features that need to be used.

  1. Log into Global Admin and navigate to Tenants page under Provider tab.
Figure 1. Figure 270 - Tenants Page
C:\Users\saloni.malik\AppData\Local\Microsoft\Windows\INetCache\Content.MSO\5085F55B.tmp

  1. Click on theC:\Users\saloni.malik\AppData\Local\Microsoft\Windows\INetCache\Content.MSO\5085F55B.tmp button in Actions column.
  2. In Tenant’s Configuration page, click on open in Choose Integrations card.
Figure 2. Figure 271 - Tenant’s Configuration Page
C:\Users\saloni.malik\AppData\Local\Microsoft\Windows\INetCache\Content.MSO\259D1321.tmp

  1. Click on open on Connector for Semantic Analysis connector.
Figure 3. Figure 272 – Option for Connector for Semantic Analysis

  1. Click on the drop-down menu to get the list of available features.
Figure 4. Figure 273 – Drop Down Menu
C:\Users\saloni.malik\AppData\Local\Microsoft\Windows\INetCache\Content.MSO\46E69FD.tmp

  1. Select the features that you want to enable from the list.
Figure 5. Figure 274 – Selected Features from the Drop Down Menu
C:\Users\saloni.malik\AppData\Local\Microsoft\Windows\INetCache\Content.MSO\856C4A13.tmp

  1. Click outside the dropdown menu to collapse the menu.
Figure 6. Figure 275 – Display after Menu collapses
C:\Users\saloni.malik\AppData\Local\Microsoft\Windows\INetCache\Content.MSO\E85D2099.tmp

  1. Click on the Save button to save the selection.

After enabling the required features, the user needs to access the UCD Console. From which the user can select the skill that has already been modified for NLU features.

Define the context variable required for using the NLU feature set in step no. 6. The following section contains the format of data for every accessible NLU feature:

  • Emotions : This is one of the NLU features. The format in which data regarding this feature is recorded:

emotion: {

sadness: 0.021579,

joy: 0.011979,

fear: 0.035891,

disgust: 0.020473,

anger: 0.949074

}

In the given skill, the data inside emotion is accessed using context variables as follows:

$nlu.emotion.anger > 0.5 or $nlu.emotion.sadness > 0.5 or $nlu.emotion.fear > 0.5.

Figure 7. Figure 276 – BigFix AEX’s normal response
C:\Users\saloni.malik\AppData\Local\Microsoft\Windows\INetCache\Content.MSO\418CFEC8.tmp

If the emotion does not exceed the confidence score of 0.5, the response is normal, but for a query from an angry user, the user gets a polite calming advise from BigFix AEX.

Figure 8. Figure 277 – BigFix AEX’s response to an angry customer
C:\Users\saloni.malik\AppData\Local\Microsoft\Windows\INetCache\Content.MSO\A57D7816.tmp

Sentiment : This is one of the NLU features. The format in which data regarding this feature is recorded is:

sentiment: {negative: 0.935994}

In the given skill, the data is accessed inside sentiment as:

$nlu.sentiment.negative>0.7

Figure 9. Figure 278 - BigFix AEX’s normal response
C:\Users\saloni.malik\AppData\Local\Microsoft\Windows\INetCache\Content.MSO\95E59494.tmp

If the sentiment does not exceed the confidence score specified by the user, which is 0.7 in this case, the response will also be normal but for any negative sentiment that has exceeded the value 0.7, BigFix AEX will be replying in a calming humane manner.

Figure 10. Figure 279 – BigFix AEX’s response to a negative sentiment
C:\Users\saloni.malik\AppData\Local\Microsoft\Windows\INetCache\Content.MSO\426DABC2.tmp

Semantic Roles : This is one of the NLU features. The following format is used to record the data of this feature:

semantic_roles: [

{

subject: 'i',

object: 'so angry that India could not quality in the semifinal',

action: 'be'

},

{ subject: 'India', object: null, action: 'quality' }

],

relations: [

{

type: 'hasAttribute',

sentence: 'I am so angry that India could not quality in the semifinal',

score: 0.600013,

arguments: [Array]

}

],

in the given skill, the data is accessed inside semantic roles as:

<?$nlu.semantic_roles.get(0).object?>

Figure 280 – BigFix AEX’s response

When given an issue, BigFix AEX can extract the issue from the object of the sentence that is recorded inside semantic_roles.

Keywords: This is one of the NLU features. The following format is used to record the data of this feature:

keywords: [ { text: 'Teams', relevance: 0.980057, count: 1 } ]

in the given skill, the data is accessed inside keyword as:

$nlu.keywords.size()>0,

if keywords feature contains any element, then the response will access that feature based on the relevance score of that keyword. That is achieved by,

<? T(String).join(", ",($nlu.keywords.filter("keyword", "keyword.relevance> 0.6")).![text]) ?>

Figure 11. Figure 281 – BigFix AEX’s response
Graphical user interface, text, application, chat or text message Description automatically generated

Given the issue, BigFix AEX can extract the text from the keywords of the sentence that is recorded inside it.

Categories: This is one of the NLU features. The following format is used to record the data regarding this feature:

categories: [

{ score: 0.902201, label: '/sports/tennis' },

{ score: 0.764526, label: '/religion and spirituality/hinduism' }

]

In the given skill, we are accessing the data inside Categories is like

T(String).join(", ",($nlu.categories.filter("category", "category.score> 0.57")).![label]).contains('hardware')

Figure 12. Figure 282 - BigFix AEX’s response
Graphical user interface, text, application, chat or text message Description automatically generated

When given an issue, BigFix AEX can check the hardcoded value in the given condition with the labels that have been stored inside the labels of the categories feature and response back as intended by the designer.

Concepts: This is one of the NLU features. The format in which data regarding this feature is recorded is

concepts: [

{

text: 'Pakistan',

relevance: 0.844811,

dbpedia_resource: 'http://dbpedia.org/resource/Pakistan'

},

{

text: 'India',

relevance: 0.824978,

dbpedia_resource: 'http://dbpedia.org/resource/India'

},

{

text: 'Indus River',

relevance: 0.809685,

dbpedia_resource: 'http://dbpedia.org/resource/Indus_River'

},

{

text: 'South Asia',

relevance: 0.775787,

dbpedia_resource: 'http://dbpedia.org/resource/South_Asia'

},

{

text: 'Urdu',

relevance: 0.749786,

dbpedia_resource: 'http://dbpedia.org/resource/Urdu'

},

{

text: 'History of Pakistan',

relevance: 0.732502,

dbpedia_resource: 'http://dbpedia.org/resource/History_of_Pakistan'

},

{

text: 'Karachi',

relevance: 0.71277,

dbpedia_resource: 'http://dbpedia.org/resource/Karachi'

},

{

text: 'Arabian Sea',

relevance: 0.71215,

dbpedia_resource: 'http://dbpedia.org/resource/Arabian_Sea'

}

],

Figure 13. Figure 283 - BigFix AEX’s response
Graphical user interface, text, application, chat or text message Description automatically generated

for the given skill, we are accessing the data inside Concepts is like

$nlu.concepts.size()>0 && $nlu.sentiment.negative>0.7 ; if the condition satisfies, the following response is given:

‘I apologize you are facing such issue and you are not feeling good because of this issue, what I am able to detect your issue belongs to one of following category:<br><b> <? T(String).join(", ",($nlu.categories.filter("category", "category.score> 0.6")).![label]) ?> </b><br><br>you may find this article relevant<a href=" <? T(String).join(",",($nlu.concepts.filter("concept","concept.relevance>0.7")).![dbpedia_resource])?>"> <? T(String).join(",",($nlu.concepts.filter("concept","concept.relevance>0.7")).![text])?></a><br>let me help you out with it<br><br>Disabling certain add-ins in Outlook can improve its overall performance. I can run an automatic fix on your behalf to disable these add-ins, or I can guide you with step-by-step instructions on how to disable them manually. <br><br>

Please close Outlook and select an option to proceed.<br><br>

<mct:input>Run the auto-fix</mct:input><mct:input>Show me the steps</mct:input> ‘

Entities: This is one of the NLU features. The format is used format to record the data of this feature:

entities: [

{

type: 'Location',

text: 'india',

relevance: 0.963296,

disambiguation: [Object],

count: 1,

confidence: 0.527707

},

{

type: 'Location',

text: 'pakistan',

relevance: 0.145982,

disambiguation: [Object],

count: 1,

confidence: 0.531

}

],

Figure 14. Figure 284 - BigFix AEX’s response
Graphical user interface, text, application, chat or text message Description automatically generated

for the given skill, we are accessing the data inside Entities is like:

$nlu.entities.size() > 0 && $nlu.sentiment.negative>0.7 ; if the condition satisfies, the following response is given:

I apologise you are facing such issue and you are not feeling good because of this issue. your query belongs to this type : <? T(String).join(",",($nlu.entities.filter("entity","entity.relevance>0.8")).![type])?><br>let me help you out with it<br><br>Disabling certain add-ins in Outlook can improve its overall performance. I can run an automatic fix on your behalf to disable these add-ins, or I can guide you with step-by-step instructions on how to disable them manually. <br><br>

Please close Outlook and select an option to proceed.<br><br>

<mct:input>Run the auto-fix</mct:input><mct:input>Show me the steps</mct:input>

Relations: This is one of the NLU features. The following format is used to record the data of this feature:

Relation are ###[{"type":"participantIn","sentence":"i am really passed off india lost the match against pakistan","score":0.591402,"arguments":[{"text":"i","location":[0,1],"entities":[{"type":"Person","text":"i"}]},{"text":"match","location":[38,43],"entities":[{"type":"SportingEvent","text":"match"}]}]},{"type":"locatedAt","sentence":"i am really passed off india lost the match against pakistan","score":0.42945,"arguments":[{"text":"match","location":[38,43],"entities":[{"type":"SportingEvent","text":"match"}]},{"text":"pakistan","location":[52,60],"entities":[{"type":"Location","text":"pakistan"}]}]}]

The relations feature can also be accessed in UCD using $nlu.relations

Syntax: This is one of the NLU features. The following format is used to record the data of this feature:

{"tokens":[{"text":"i","location":[0,1]},{"text":"am","location":[2,4]},{"text":"so","location":[5,7]},{"text":"angry","location":[8,13]},{"text":"that","location":[14,18]},{"text":"india","location":[19,24]},{"text":"lost","location":[25,29]},{"text":"to","location":[30,32]},{"text":"pakistan","location":[33,41]},{"text":"in","location":[42,44]},{"text":"the","location":[45,48]},{"text":"world","location":[49,54]},{"text":"cup","location":[55,58]}]}

The relations feature can be also accessed in UCD using $nlu.syntax