How to merge 2 LUIS models?

1k Views Asked by At

I have 2 LUIS models. One I use for non-production Bot & another I use for production Bot. I have made many changes on LUIS non-prod app as part of day to day development and new skills. Now, we are planning to deploy these skills to prod bot so we would need same LUIS changes on prod LUIS.

I can certainly, update prod LUIS model with non prod by copying Intents and entities, utterances but of course this time consuming & error pron.

I would like to know the best way to merge 2 LUIS models and/or any other best practices I could use.

4

There are 4 best solutions below

0
On

Just a workaround, if you are in Hurry You can simply add two luis model in the LuisDialog and it will pick the highest scoring intent automatically.

    [LuisModel("Model", "secret")]
    [LuisModel("Model", "secret")]
public class RootDialog : LuisDialog<object>
    {
        [LuisIntent("None")]
        public async Task NoneRes(IDialogContext context, LuisResult result)
        {
        }
    }
0
On

As Nicols mentioned, LUIS has an option of importing a LUIS app as a new version to the existing application. You can get details about importing/exporting versions from their doc.

You can import your development LUIS app json file as a new version to your production LUIS app and set the new version as the active one.

1
On

Use the dispatcher tool if these two models are in separate LUIS apps. It will combine them into a single app. If these are two models (as versions) in a single app, it is easier to export both versions then use Node.js to combine the JSON objects.

0
On

The best scenario in your case would be to clone your non-production, give it a new version name, set the newly cloned version as active, and continue working on your non-production.

The full documentation to that can be found here