Does Microsoft Bot Framework Require LUIS For NLU? - azure-language-understanding

In other words, can I use another engine like RASA rather than LUIS?

Does Microsoft Bot Framework Require LUIS For NLU?
No
In other words, can I use another engine like RASA rather than LUIS?
Yes
While bots have certain structure, in the end, they are just another ASP.NET application. You can extend and customize them to do what you wish. That being said; there is no built-in scaffolding for other NLU like RASA, etc.
I would suggest taking a look at the Core bot sample, which does use LUIS. As well as the SDK itself (linking dotnet, as I assuming you're using that). But you can see how that is done and give you a starting point.
I would recommend familiarizing yourself with the SDK and documentation so you know what and where the built in functions are and how they handle interaction with the users and connector. Including the implementation of middleware.
If you are using Composer instead of the SDK, you could make calls to other NLPs, but it won't be as integral as with LUIS. You can make specific calls, but there you won't easily be able to just replace LUIS for something else.

Related

Culture-specific understanding in LUIS

We are trying to create a multi-language chat bot using Azure Bot Framework and LUIS.
While designing the architecture we are struggling to understand following points:
I am not able to see 'en-GB' in the list of supported languages mentioned in following blog.
https://learn.microsoft.com/en-us/azure/cognitive-services/luis/luis-supported-languages.
Does that mean LUIS does not support 'en-GB'?
If so, will LUIS really struggle to understand the query written in 'en-GB' as far as this app is just a chat bot and not voice bot?
Do we need to do anything special so that LUIS can understand query written in any supported language say 'de-DE' and map it to utterances modeled in 'English'?
I am not able to see 'en-GB' in the list of supported languages mentioned in following blog.
https://learn.microsoft.com/en-us/azure/cognitive-services/luis/luis-supported-languages.
Does that mean LUIS does not support 'en-GB'?
Yes. But in fact the announced language is English, not American English or British English (see below)
If so, will LUIS really struggle to understand the query written in 'en-GB' as far as this app is just a chat bot and not voice bot?
You can use en-US language. There is no link with chat vs voice capability, LUIS is only treating text items. For voice, you need to use other tools first like STT (Speech-to-text) tools.
Do we need to do anything special so that LUIS can understand query written in any supported language say 'de-DE' and map it to
utterances modeled in 'English'?
Yes, you have to translate your items.
When you create a project (called an app) in LUIS, the 1st setting that you must provide is the Culture (see capture below).
If you want to use several languages in a chatbot project for example, you have at least 2 possibilities:
Create 1 LUIS app for each language, and call the right one. You can select the right one by several ways (using the locale if selected by the user, or using Language detection APIs for example)
Create 1 global LUIS app in 1 language (choosing English may be the right option as LUIS main feature are available in English first) and make a translation before calling LUIS.
I would recommend the 1st solution because translation is never perfect and may be loosing context which can be important for LUIS.

Is there any way to call yammer Rest api in SharePoint framework?

I want a code sample which explains , how to call a yammer rest api url in sharepoint framework.
I am not aware of any support planned for the SharePoint framework at this time, but the Yammer JS SDK may be usable as an external JS library. Since it's just JavaScript, it's more likely a limitation of the tooling or framework if it won't run. You will have trouble calling the REST APIs without using the SDK. It currently lacks Typescript typings that you ideally would want to have. I'm not familiar enough with the SharePoint framework to know the best way to do this.

Bot Framework Language Translation

The first version of the Bot Framework advertised automatic language translation as a major Bot Connector feature as outlined in the v1 Bot Framework Overview page.
However, the v3 documentation doesn't mention it. I was wondering if this feature is no longer available or should we use the Cognitive Services Text APIs instead?
Here's what I tried with a Skype Bot:
I would like to speak in German
May I speak in French
fr-FR
Everything I've tried hasn't worked.
This is something which I've looked into while building my own bot as well. The feature is no longer available in V3 and will have to call the Translator API directly. https://github.com/Microsoft/BotBuilder/issues/1156
In V4, you can use the code as below
Resources.Global.Culture = new System.Globalization.CultureInfo("en-US");

Creating an API for LUIS.AI or using .JSON files in order to train the bot for non-technical users

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.

Which bot framework to use (if any) for a Kik, Facebook, & Slack messaging bot using javascript?

I'm building a chatbot that will need to be launched on Kik, Facebook, and Slack. I'm unsure of where to start in terms of using a bot framework or whether I should create something custom myself.
I don't believe I will need any NLP. The user is going to be pushed down a very structured path, that will use buttons to guide the users to the next prompts and will also share with the user links and media.
Microsoft Bot Framework seems like the main framework I should look at, but its unclear to me how useful it will be if I end up wanting to deliver responses that are custom to each messaging platform. Meaning, on Facebook I may want to take advantage of a custom feature that they have like buttons or templates and on Kik I will want to take advantage of suggested keyboards.
Any suggestions or guidance is appreciated.
BotFramework will do the translation for you. Write to the BotFramework schema and it will using buttons for Facebook and keyboards for Kik.

Resources