microsoft / botbuilder-tools

Welcome to the Bot Framework Tools repository, which is the home for a set of tools for developers building bots with the Microsoft Bot Framework
https://github.com/Microsoft/botframework
MIT License
444 stars 262 forks source link

Refresh dispatch model without losing entity mapping #1432

Closed srinivasnarula closed 4 years ago

srinivasnarula commented 4 years ago

What project is affected?

Dispatch model refresh losing all the changes to Intents and Entities.

What language is this in?

C#

What happens?

I'm understanding the concepts of BOT Framework by following documentation.

Entities and Intents are wiped off when dispatch model is refreshed.

What are the steps to reproduce this issue?

Step 1: Followed steps to create new KB and then cognitiveModels.json is updated with new values and .\Deployment\Scripts\update_cognitive_models.ps1 -RemoteToLocal command need to be executed which will update Dispatch model.

Step 2: For make BOT more user friendly, added few entitiesand mapped to Intents. Till here everything works fine.

Step 3: Repeated step 1 then entitieswhich were mapped earlier are wiped off.

What were you expecting to happen?

When I add,update,modify QnA KB, entities which already created should stay in.

Please let me know what I'm missing in achieving it.

lauren-mills commented 4 years ago

Hi @narulasrinivas, did you add entities directly to your dispatch model in the LUIS portal?

srinivasnarula commented 4 years ago

Hi @lauren-mills, Yes. I'm adding them manually and directly in LUIS portal.

lauren-mills commented 4 years ago

As far as I know, the dispatch CLI tool does not support maintaining entities and intents that are added directly to the LUIS model after the dispatch model is created. I'm going to transfer this issue to the botbuilder-tools repo so that the Dispatch team can weigh in.

srinivasnarula commented 4 years ago

Thanks @lauren-mills. @sidmore - Can you throw some light on how to manage Intents and Entities when deployed via CLI?

srinivasnarula commented 4 years ago

@tsuwandy - Please help me with this.

tsuwandy commented 4 years ago

@narulasrinivas, where did you add the intents/entities? To the dispatch LUIS app via LUIS portal? Any changes done to the dispatch app on portal won’t be persisted next time dispatch app is refreshed from cli. Could you clarify your scenarios? Why do you need to add intents to the dispatch app directly? Can the intent be added to the sub LUIS app instead? Also entities in sub LUIS app are not transferred directly to dispatch app, except for this used in patterns.

hcyang commented 4 years ago

hi @narulasrinivas, below are some common Dispatch use-cases:

1) A user already has one or more LUIS, QnA Maker apps/models, or even some flat files of intent-utterances and the user would like to create a meta-app to dispatch bot traffics to those child apps. In this scenario, entities should be (manually) added to the child LUIS apps instead of to the Dispatch parent app, so that the entity definitions won't get wiped out after the Dispatch app/model is refreshed as @lauren-mills and @tsuwandy had indicated. 2) A user has a LUIS app and he/she can use Dispatch to evaluate the app's intent prediction performance in a 5-fold cross validation process.

As you can see from the scenarios, Dispatch focuses on intent prediction/dispatching and evaluation, so that entity definitions are not persisted. Please maintain your entities in the child apps, not at the Dispatch level.

I am going to close this issue for now. If you have more questions, please feel free to reopen it.