Get the NLU Intent value

ayman_h
Kilo Sage
Kilo Sage

Hi,

Is there way in the Virtual Agent topic initially to grab the NLU intent value that re-directed the user to the VA topic?

Regards,

Ayman 

5 REPLIES 5

ayman_h
Kilo Sage
Kilo Sage

Did some research on this one and don't think it is possible to grab the NLU Intent value inside a Virtual Agent topic. The best you could do would be to grab the Search text the user entered by using vaSystem.getSearchText(). There is currently no NLU Inference APIs that would help you run this search inside a Script action step.

Hi ayman_h. I am looking for a similar solution. How to return NLU intent value in VA response when using VA bot integration API? Any leads on that?

@javeriaarif705_ there is no quick way of doing this. You can use what Chris D suggested, that should work but I haven't tried this yet

 

1. Grab the utterance the user used by using vaSystem.getSearchText()

2. Lookup the open_nlu_predict_intent_feedback table using the end user ID, utterance used, 'auto selected = true' and the date time

3. Grab the first intent returned

Chris D
Kilo Sage
Kilo Sage

If you have the topic name and NLU Intent-to-Topic is a 1:1 relationship, why do you need to get the intent from the topic?

 

That said, it's a little indirect, but you should be able to use the open_nlu_predict_intent_feedback table. You can't get directly from a conversation (task) to the intent, but you use the Created By (vaInputs.user.user_name) in combination with the Utterance (vaSystem.getSearchText()) and (Selected | Auto-Selected = True) to get the intent if you sort the results descending by Created and grab the first one.