How to implement multiple LUIS dialogs for one bot using the Bot Framework?

Since each LUIS model is limited to 20 intentions and 10 entities, and each model should have a clearly defined domain / domain, I wonder what is the best way to implement several dialogs in one bot application if I want my bot to be able to span multiple domains , say, for example, get financial information and weather information.

I know that ideally I would have two different bots, but in this situation I need to do this with one bot. I read the Bot Framework documentation on Dialogs (and several other parts) and the LUIS man page, but I could not find any information on how I could achieve this. I also looked at the examples and found nothing, is there any way to do this?

+5
source share
1 answer

So, from a technical point of view, there is no serious problem with this. You simply register two LUIS applications and have two dialogs in your application with the LUIS keys of the specific application that you created.

I think your question is more suitable for "how to redirect a message to the corresponding LUIS bot". And that is the right question.

AzureBot has a similar scenario, and they resolved it using DialogFactory , which follows the strategy template. Each "domain" dialog knows whether the incoming message can be processed or not ( this is the one used for virtual machine operations). Here you can see how they also have LUIS in their RootDialog, and how, in the intention of None / Empty, they redirect the message to the corresponding dialog.

Another alternative to study in this space is to use the IScorable interface, which, in the end, will allow you to intercept all messages and decide what to do. The ContosoFlowers example has an IScorable implementation for you to look at. The C # BotBuilder library also has DeleteProfileScorable , which basically handle the / deleteeprofile message.

+5
source

Source: https://habr.com/ru/post/1259208/


All Articles