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
Related
From what I am understanding the bing spellcheck api via azure can be integrated with LUIS queries but not qna queries on their own. However, when you use the dispatch multi-model pattern with a parent LUIS app and child apps the overall query or top level query coming from luis can run the bing spellcheck api.
Is this the suggested method for assuring some spellchecking is applied to a qna knowledge base?
Yes, you can do this with Dispatch Bot. When you get the results back from the recognizer, there will be an alteredText value if spell check made a correction. What you're wanting to do is replace the original text with this new value.
const recognizerResult = await this.dispatchRecognizer.recognize(context);
if (recognizerResult.alteredText) {
context.activity.text = recognizerResult.alteredText;
}
<code to select intent>
var processResult = await this.qnaDialog.processAsync(userDialog.qnaState, context.activity)
QnA Maker should now receive the query with the altered text. I don't have this implementation exactly but I had to do something similar where I modified context.activity.text and removed or # mentions from Teams, which were affecting intent identification and QnA answers.
As billoverton mentioned, if you integrate Bing Spell Check with LUIS then you can access the spellchecked utterance in the alteredQuery property of the LUIS results. If you don't have a LUIS model that you're passing utterances through before they reach QnA Maker, you can always call the Bing Spell Check API directly with HTTP requests or using an Azure SDK.
Once you have the spellchecked utterance, you can pass it along to QnA Maker through a QnA dialog by modifying the turn context's activity like billoverton suggested, or again you can call the API directly. There's plenty of information in the QnA Maker documentation about generating answers with the REST API or an SDK.
I'm looking for a solution where my bot can understand users request(may be with LUIS this can be achieved) and verifies/validates the user/requirement with master data. If all good, then connect to my native database(Siebel CRM via API) to perform the defined action and log a reference ticket(via API) and finally send an email to user using outlook. Is this achievable using azure service?
Yes, the Bot Framework can do all of those things:
my bot can understand users request
LUIS is perfect for this.
verifies/validates the user/requirement with master data
All of this can be done within Waterfall dialogs or Prompts. You can either store the master data in the bot code, or query it from an external source and have the bot validate against it.
Here's a good sample for prompts and validation.
connect to my native database(Siebel CRM via API) to perform the defined action and log a reference ticket(via API)
The bot runs on C#/Node, so anything (including calling your APIs) that you can do in C#/Node, you can do in your bot.
send an email to user using outlook
Bot Framework has a specific Email Channel for this or you can use the Graph API.
Recommended Resources
Docs and QuickStarts
Samples Repo
Reference Docs: C# / TypeScript
LUIS Docs
I have a working Teams bot, using the nodejs botbuilder-teams SDK v3, and registered at dev.botframework.com and apps.dev.microsoft.com. I have created a Teams app that contains it (using the App Studio app in Teams), and installed it in an Office 365 developer tenant of which I am the admin, and the bot can send and receive messages with no problem.
When the bot is added to a team, I get the "conversationUpdate"/"teamMemberAdded" message, and use the fetchMembers() call from the teams bot connector to retrieve basic info for each member, including "givenName", "surname", "email", etc. However, I don't get the "jobTitle" attribute. Is there any way to retrieve jobTitle through the Teams bot SDK?
Alternatively, could I make MSGraph API calls (say, /v1.0/groups/{group-id-for-teams}/members)? Is there a good example of a nodejs serverside app like a bot calling the MSGraph API? The authentication part seems somewhat murky to me.
jobTitle is not part of roster details. You need to call Graph APIs to fetch additional details.
Here is Node.js sample for bot authentication. If you are using Azure for bot registration then please take a look at Azure Bot Service for Authentication in Teams documentation.
I am using .Net V3 SDK Azure Bot framework. Integrated a Bing Spell Check API service with my Web App bot and enabled the service in my LUIS model as well. I thought the spell check service will correct the typos once the user ask the question from the bot. I am sure the spell check service works as the number of calls increase each time I test the bot, but how can I get the suggested text from the spell check service? Do I have to code this functionality in the bot code? thanks in advance for any help.
A query that's been corrected by Bing Spell Check gets sent in the LUIS result's alteredQuery property.
In your LUIS dialog, you can access the AlteredQuery property like this:
[LuisIntent("None")]
public async Task NoneIntent(IDialogContext context, LuisResult result)
{
await context.PostAsync($"I think you meant \"{result.AlteredQuery}\"");
}
Can Luis be used in Bots designed on a platform other than MSFT Bot Framework like chatfeul.
After training a LUIS model, you get an endpoint which is a REST service that can be called. You can then pass parameters to this, modify it according to need and get a JSON response.
You can read more about connecting an API to chatfuel here