I'm trying to migrate a watson app to LUIS, or at least it's intents and entities, I have it currently exported as a json file, is there any way to import intents and entities in bulk to LUIS? I know you can import values for each individual entity but how can I import many at the same time?
Any help will be greatly appreciated.
There is no way to do this in the LUIS website. You can either modify your JSON, then import the JSON as an app, or you add use the REST API to add the intents, entities, and utterances to an existing app.
My preference is to generate the LUIS JSON app definition from the watson app definition.
Related
I have subscription on Azure and I dowloaded chat bot with my AppId and password. On page luis.ai I trained new model and exported it to downloaded azure project (with flight booking). I replaced their cognitive model with my model from luis.ai, but after that - azure project is always working with old data. I donĀ“t understand why, because their model is removed from my PC. What should I do to working with my own model? Thanks.
You code is based on the core-bot sample. First of all, make sure that your LUIS configuration is set up correctly in your .env file (or in App Settings if running from Azure). The recognizer is created in index.js and passed to MainDialog.js. From the core-bot sample code, I'm actually not seeing where it is importing the local code. I think that is maybe just to give you the model to import to your own LUIS app? If you have the proper LUIS keys and app ID, it should respond to whatever you have in there. My guess is maybe that you replaced the FlightBooking.json LUIS model file, but didn't actually point the bot to your LUIS app with the new intents.
I would suggest, though, that this isn't the best sample to use if you are trying to just tweak it. There are a lot of things here that are set up specifically for booking flights that don't really make sense if that's not what your bot is doing. Personally I like the Dispatch Bot sample better as a starting point (even if you are not using Dispatch CLI tool), though it has the intent actions within the bot file instead of separate dialogs. Maybe that will give you a better starting point though?
I have close to 50 unique set of FAQs in 50 different excel files with 100 s of Questions and Answers in each excel file.Is there a way I can dynamically generate all my LUIS intents, Entities, patterns, utterances etc and generate LUIS Apps.
I tried google, but could not find any relevant documentation
You can generate an application JSON file which can be imported into LUIS with this API call. Just parse your excel files and create the JSON file.
You can also use a tool specialised just for that, like QnA Maker.
Is it possible to use LUIS API without MS BOT Framework?
It is ok if I need to reference MS BOT Framework libraries for parsing LUIS response, but incoming request text will be from web application and not from MS BOT Framework.
I am struggling to found recent proper nuget package, which will provide parsing capability and context management. So for example if bot asked for name and phone and user provided only name, bot will be able to ask for missing phone.
If you want to use LUIS easily in C#, without using it inside Bot Framework, you can use Microsoft.Cognitive.LUIS package available on Nuget (see here)
This package contains the methods to query LUIS.
Sample:
private async Task QueryLuis(string querySentence)
{
var client = new LuisClient("appId", "appKey", domain: "westeurope");
var luisResult = await client.Predict("Text sent to LUIS for prediction");
Console.WriteLine($"{luisResult.Intents.Select(i => $"Intent '{i.Name}' with score {i.Score}")}\r\n");
}
I guess in the future it may be included in a different package because as you can see in this psSdkJson6 branch of azure-sdk-for-net Github's project, there are also classes for LUIS Runtime available here
I manually inputted thousands of data points into my LUIS bot for an Entities List but I may have to start over with a new bot. Is there any way to preserve my Entities List that I made?
In the luis.ai page, once logged you can see your applications at https://www.luis.ai/applications.
Right from there, you can export your application using the {} button.
Then, you can just click the Import App button (in that account or in another one) to import it back.
As stuartd said in his comment, you can export the entire LUIS model via the Authoring API. To do this you'll use the v2.0 API; here you can export by App ID and version ID.
You can also find instructions on acquiring only your list entity via the Authoring API here.
Chances are though, you'll probably want to follow Ezequiel's instructions and just download your LUIS model via the portal.
I have a bot that uses .NET, MS Bot Framework and LUIS.ai for its smarts.
All's fine, except that I need to provide a way for non-technical users to train the bot and teach it new things, i.e. new intents in LUIS.ai.
In other words, suppose that right now the bot can answer messages like "hey bot where can i get coffee" and "where can I buy some clothes" with simple phrases containing directions. Non-technical users need to be able to train it to answer "where can I get some food" too.
Here's what I have considered:
Continuing to use LUIS.ai. Doesn't work because LUIS.ai doesn't have an API. The best it has is the GUI to refine existing intents, and the upload app/phrase list feature. The process can be semi-automated if the JSON file with the app can be generated by some application that I write; however, there still needs to be backend code that handles the new intents, and that has to be implemented by a C# coder.
Could it work if I switch from C# to Node.js? Then theoretically I would be able to auto-generate code files / intent handlers.
Azure Bot Service. Seems it doesn't have a non-technical interface and is just a browser-based IDE.
Ditching Bot Framework entirely and using third-party tools such as motion.ai. Doesn't work because there's no "intellect" as the one provided by LUIS.ai.
Using Form Flow that's part of Bot Framework. If my GUI bot builder application can generate JSON files, these files can be used by Bot Framework to build a bot automatically. Doesn't work because there's no intellect as in LUIS.ai.
Keep using Bot Framework, but ditch LUIS and build a separate web service based on a node.js language processing library for determining intents. May or may not work, may be less smart than LUIS, and could be an overkill.
Override the method in LuisDialog that selects the intent from the LuisResponse, in order to use the my own way to decide the intent (but how?).
At this point I'm out of ideas and any pointers will be greatly appreciated.
First of all, LUIS.ai provides an API that you can use to automatize the training. Moreover, here is Luis Trainer written entirely in Python against the API that just does that.
The easiest one, probably is the one you are describing in #1: you can automatize the training (as explaining above) but you will still have to deploy a new version of the bot if new intents are being provided. One thing is letting users to train an existing model with new utteraces and another completely and different thing is to let them create the model :)
It might be hard to skip having to write the backend code (I wouldn't automatize that at all)
Here is a potential idea (not sure if it will work though). You would need 2 Luis models.
One with your current model, that users will be able to train with new utterances.
The second model, is one exclusively intended to be "expanded" with new intents by users.
If you separate this in that way, you might be able to look into a "plugin" architecture for the second LUIS model. So, your app, somehow, loads dinamically an assembly where the second model lives.
Once you you have that in place, you can focus on writing the backend code for your second Luis Model without having to worry about the bot/first model. You should be able to replace the assembly with the second Luis Model and be able in the bot to detect if there is new version of that assembly and replace the current one in the app domain.
As I said, is just an idea as I'm brainstorming with you. Sounds a bit complex, and it's not addressing all your concerns; as you still will need to write code (which in any case, you will eventually have to do)
I am working through a challenge project (training) to automate the creation of Chat Bots specifically targeted against a Luis.ai model using plain old javascript and web services to Luis.
I looked at the Bot Framework and it's just too cumbersome to automate (I want X number of customers to create a Chat Bot without coding). I also want to add my own type of 'Cards' (html widgets) that do more and can be easily configured by someone with zero coding skills.
Calls to the Luis.ai/Cognitive Services API are made in my code behind and the json response returned to my own rules engine. On the following URL click the LUIS API link on the page to open the Luis API Console where you can test, and train your Model. All the endpoints you will need are here...
https://dev.projectoxford.ai/docs/services/
Based on the various endpoints on that page, you can use WebClient in asp.net to pull back the response. So in my testing I have buttons on a page to push utterances up to the model, pull back entities, create hierarchical entities and so on. Have a look at http://onlinebotbuilder.com to see how an intent of product dynamically inserted a shopping cart.
When your tool is built and utterances start to arrive, Luis.ai will store them and via the Suggest tab (at Luis.ai) it will ask you for guidance...Unfortunately I don't think you could give that control over to your customers, unless they are experts in your domain (they understand which utterance belongs to which intent). You don't need to take your app down, just train it periodically to improve the Model based on your customers input...soon enough you will have your model working well based on your intents.
Hope that helps.