Extract LUIS intent and score and train the LU from LUIS portal instead of from composer UI - bot-framework-composer

I am exploring Composer. I already use bot-framework c# model in Azure that connects with LUIS. We developed a one step FAQ bot (not multi-turn conversations) with only one main dialog. We used to extract the Luis intent and score whenever users type a text. We get answer from a SharePoint list for FAQs by passing the identified LUIS Intent as a column filter.
Is it possible to do the same in Composer to get the intent identified and score for each input we get from user.?
Also, instead of training the LU model in composer, can we train the utterances in the LUIS portal and consume the same intent/score in composer?

Yes it is possible to use Luis inside Bot Framework Composer to recognize intents and do entity extractions. Bot Framework Composer allows you to put conditions on the recognized intents which you can use to make sure the next steps only fire when the score is >= x.
You can see how to use this in action and how the scoring works here (starting at 27:38):
https://youtu.be/ZNcfIgO8biw?t=1658
You can still make changes in the Luis portal, but at this time this is not recommended as your changes will be overwritten the next time you publish to Luis via Bot Framework Composer. If you make changes in the Luis portal directly, make sure to export the .lu and re-integrate your Luis model in Bot Framework Composer to not lose your changes.

Related

How to make the bot ask a question after generating an answer from the FAQ file?

I am making a bot to suggest the most suitable product according to what the user input. I have made an excel file with the product description as the question and the product name as the answer. I have used QnA Maker to read from the file and have asked the user a few questions with the Add QnA pair function. After the user has given a description of the product and receiving an answer from the bot, I want the bot to ask the user if he/she is satisfied with the product.
I am new to this service and will be grateful if someone could help me. Thanks in advance.
Use Azure Bot Composer and integrate your existing QnA Maker database with it. You can easily create Bot conversations with the user this way.
Composer is a visual bot programming tool where you can introduce the logic behind your bot app. It uses the Bot Framework SDK from Microsoft and generates code that you can later refine. Within Bot Composer you can integrate services such as LUIS and the QnAMaker Knowledgebase that you already have. Of course, you can always use the Bot Framework SDK and start programming your Bot app from scratch with code.
To connect your existing QnAMaker Knowledgebase with Bot Composer: link
First steps tutorial with Bot Composer: link

Is it possible to use multiple LUIS application in single bot services?

I have a Azure Bot Service and it is integrated with LUIS application where i have some intents.
What I want according to my need i can forward same examples to different intents in LUIS.
But there is limitation that same example can't be there for multiple intents.
So i created another application in the LUIS and created the same example but different intent name.
Here my problem is i have to connect Single Bot service with two different LUIS application.
Can i do it in Azure Bot Services in Node.js??
Yes, it is absolutely possible to make use of multiple LUIS applications in one bot. The dispatch tool helps to determine which LUIS model best matches the user input. The dispatch tool does this by creating a single LUIS app to route user input to the correct model. Also, ensure that you do not have overlapping intents and make use of prediction data from LUIS to determine if your intents are overlapping.
The dispatch model is used in cases when:
Your bot consists of multiple modules and you need assistance in routing user's utterances to these modules and evaluate the bot integration.
Evaluate the quality of intents classification of a single LUIS model.
Create a text classification model from text files.
Refer to this sample, which is an NLP with Dispatch bot dealing with multiple LUIS models and also this documentation that provides more information about using multiple LUIS and QnAMaker models.
Hope this helps!!

Can one import a DialogFlow agent into LUIS

I have a fully mature agent in DialogFlow with utterances, intents and entities. Is there a way to quickly bring this info over into a new app in Luis? I really don't want to reenter the information. I know DialogFlow allows for a zip export. Is this format recognized by Luis?
This format is not recognised per Luis but both Dialogflow and luis have APIs and you can use those APIs to extract the utterances from Dialogflow and then POST those into Luis

ms azure: connecting bot with luis app

I want to create a bot using luis, fill it with entities and intents and use C# to handle the responses.
I have created an app on eu.luis.ai, but I couldn't find out, how i can edit the code of this app.
I have created a web app bot with luis template on the azure portal and can edit the code but i couldn't find out how i can create intents, entities and so on.
Do i have to connect them somehow?
Or how do i create a bot, so that i can fill it with content and edit the code?
LUIS and Bot Framework Bots are separate, meaning you don't need to use LUIS with your bot and vice versa. As such, you as the developer need to manually connect the two of them together. For the entities and intents aspect, you will need to create them in the LUIS portal. Then correspondingly, you can modify your bots code to handle the new intents and entities from your LUIS app.
You didn't specify, but I am going out on a limb and assuming that your Web App Bot is in a European datacenter. To minimize latency between LUIS and your bot, make sure to set your domain. Example below:
[LuisModel("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX", "XXXXXXXXXXXXXXXXX", domain: "westeurope.api.cognitive.microsoft.com", staging: true)]
[Serializable]
public class YourLUISDialog : LuisDialog
{
LUIS C# Tutorial Docs
List of all valid LUIS Endpoints
The code excerpt is from this issue

How to view missed user utterances in Microsoft Azure Bot framework

I have developed a bot using Microsoft Azure Bot framework but now I am trying to see if there is a way to see what were some of the utterances that were missed/not mapped to an intent. I tried to look around but couldn't find anything related to this. Is it possible to see the log of missed utterances?
There is no built-in capability in Bot Framework or LUIS for this. You will have to log the utterances that go through the None intent somewhere or use some analytics service like (App Insights) to get the information you are looking for.
Some initial information at https://learn.microsoft.com/en-us/bot-framework/portal-analytics-overview
LUIS provides a feature called Active Learning where it tracks utterances it is relatively unsure of, and places them in a list called Suggested Utterances. More information can be found here: https://learn.microsoft.com/en-us/azure/cognitive-services/luis/label-suggested-utterances
In the active learning process, LUIS examines all the utterances that
have been sent to it, and calls to your attention the ones that it
would like you to label. LUIS identifies the utterances that it is
relatively unsure of and asks you to label them. Suggested utterances
are the utterances that your LUIS app suggests for labeling.

Resources