You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cognitive-services/QnAMaker/Tutorials/integrate-qnamaker-luis.md
+30-30Lines changed: 30 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: LUIS and QnAMaker - Bot Integration
2
+
title: LUIS and QnAMaker - bot integration
3
3
titleSuffix: Azure Cognitive Services
4
-
description: As your QnA Maker knowledge base grows large, it becomes difficult to maintain it as a single monolithic set and there is a need to split the knowledge base into smaller logical chunks.
4
+
description: As your QnA Maker knowledge base grows larger, it becomes difficult to maintain it as a single monolithic set. Split the knowledge base into smaller, logical chunks.
5
5
services: cognitive-services
6
6
author: diberry
7
7
manager: nitinme
@@ -13,50 +13,50 @@ ms.author: diberry
13
13
ms.custom: seodec18
14
14
---
15
15
16
-
# Use bot with QnA Maker and LUIS to distribute your knowledge base
17
-
As your QnA Maker knowledge base grows large, it becomes difficult to maintain it as a single monolithic set and there is a need to split the knowledge base into smaller logical chunks.
16
+
# Use a bot with QnA Maker and LUIS to distribute your knowledge base
17
+
As your QnA Maker knowledge base grows larger, it becomes difficult to maintain it as a single monolithic set. Split the knowledge base into smaller, logical chunks.
18
18
19
-
While it is straightforward to create multiple knowledge bases in QnA Maker, you will need some logic to route the incoming question to the appropriate knowledge base. You can do this by using LUIS.
19
+
Although it's straightforward to create multiple knowledge bases in QnA Maker, you will need some logic to route the incoming question to the appropriate knowledge base. You can do this by using LUIS.
20
20
21
-
This article uses Bot Framework v3 SDK. Please see this [Bot Framework article](https://docs.microsoft.com/azure/bot-service/bot-builder-tutorial-dispatch?view=azure-bot-service-4.0&tabs=csharp), if you are interested in Bot Framework v4 SDK version of this information.
21
+
This article uses the Bot Framework v3 SDK. If you're interested in the Bot Framework v4 SDK version of this information, see [Use multiple LUIS and QnA models](https://docs.microsoft.com/azure/bot-service/bot-builder-tutorial-dispatch?view=azure-bot-service-4.0&tabs=csharp).
22
22
23
23
## Architecture
24
24
25
-

25
+

26
26
27
-
In the above scenario, QnA Maker first gets the intent of the incoming question from a LUIS model, and then use that to route it to the correct QnA Maker knowledge base.
27
+
The preceding graphic shows that QnA Maker first gets the intent of the incoming question from a LUIS model. Then, QnA Maker uses that intent to route the question to the correct QnA Maker knowledge base.
28
28
29
29
## Create a LUIS app
30
30
31
31
1. Sign in to the [LUIS](https://www.luis.ai/) portal.
32
32
1.[Create an app](https://docs.microsoft.com/azure/cognitive-services/luis/create-new-app).
33
33
1.[Add an intent](https://docs.microsoft.com/azure/cognitive-services/luis/add-intents) for each QnA Maker knowledge base. The example utterances should correspond to questions in the QnA Maker knowledge bases.
34
-
1.[Train the LUIS app](https://docs.microsoft.com/azure/cognitive-services/luis/luis-how-to-train) and [publish the LUIS app](https://docs.microsoft.com/azure/cognitive-services/luis/publishapp) your LUIS App.
34
+
1.[Train the LUIS app](https://docs.microsoft.com/azure/cognitive-services/luis/luis-how-to-train) and [publish the LUIS app](https://docs.microsoft.com/azure/cognitive-services/luis/publishapp).
35
35
1. In the **Manage** section, make note of your LUIS app ID, LUIS endpoint key, and [custom domain name](../../cognitive-services-custom-subdomains.md). You will need these values later.
36
36
37
37
## Create QnA Maker knowledge bases
38
38
39
39
1. Sign in to [QnA Maker](https://qnamaker.ai).
40
-
1.[Create](https://www.qnamaker.ai/Create) a knowledge bases for each intent in the LUIS app.
41
-
1. Test and publish the knowledge bases. When you publish each KB, make note of the KB ID, resource name (custom subdomain before _.azurewebsites.net/qnamaker_), and the authorization endpoint key. You will need these values later.
40
+
1.[Create](https://www.qnamaker.ai/Create) a knowledge base for each intent in the LUIS app.
41
+
1. Test and publish the knowledge bases. When you publish each one, make note of the ID, resource name (the custom subdomain before _.azurewebsites.net/qnamaker_), and the authorization endpoint key. You will need these values later.
42
42
43
-
This article assumes the KBs are all created in the same Azure QnA Maker subscription.
43
+
This article assumes the knowledge bases are all created in the same Azure QnA Maker subscription.

46
46
47
-
## Web app Bot
47
+
## Web app bot
48
48
49
-
1.[Create a "Basic" Web App bot](https://docs.microsoft.com/azure/bot-service/bot-service-quickstart?view=azure-bot-service-4.0) which automatically includes a LUIS app. Select C# programming language.
49
+
1.[Create a "Basic" bot with Azure Bot Service](https://docs.microsoft.com/azure/bot-service/bot-service-quickstart?view=azure-bot-service-4.0), which automatically includes a LUIS app. Select the C# programming language.
50
50
51
-
1.Once the web app bot is created, in the Azure portal, select the web app bot.
52
-
1.Select **Application Settings** in the Web app bot service navigation, then scroll down to **Application settings** section of available settings.
53
-
1. Change the **LuisAppId** to the value of the LUIS app created in the preceding section then select **Save**.
51
+
1.After you create the web app bot, in the Azure portal, select the web app bot.
52
+
1.In the web app bot service navigation, select **Application Settings**. Then scroll down to the**Application settings** section of available settings.
53
+
1. Change the **LuisAppId** to the value of the LUIS app created in the preceding section. Then select **Save**.
54
54
55
55
56
-
## Change code in BasicLuisDialog.cs
56
+
## Change the code in the BasicLuisDialog.cs file
57
57
1. From the **Bot Management** section of the web app bot navigation in the Azure portal, select **Build**.
58
58
2. Select **Open online code editor**. A new browser tab opens with the online editing environment.
59
-
3. In the **WWWROOT** section, select the **Dialogs** directory, then open **BasicLuisDialog.cs**.
59
+
3. In the **WWWROOT** section, select the **Dialogs** directory, and then open **BasicLuisDialog.cs**.
60
60
4. Add dependencies to the top of the **BasicLuisDialog.cs** file:
61
61
62
62
```csharp
@@ -71,7 +71,7 @@ In the above scenario, QnA Maker first gets the intent of the incoming question
@@ -98,7 +98,7 @@ In the above scenario, QnA Maker first gets the intent of the incoming question
98
98
```
99
99
100
100
101
-
6. Addthefollowingclassto make an HTTP request to the QnA Maker service. Notice that the **Authorization** header's value includes the word, `EndpointKey` with a space following the word. The JSON result is deserialized into the preceding classes and the first answer is returned.
101
+
6. Addthefollowingclassto make an HTTP request to the QnA Maker service. Notice that the **Authorization** header's value includes the word, `EndpointKey`, with a space following the word. The JSON result is deserialized into the preceding classes, and the first answer is returned.
102
102
103
103
```csharp
104
104
[Serializable]
@@ -150,7 +150,7 @@ In the above scenario, QnA Maker first gets the intent of the incoming question
150
150
```
151
151
152
152
153
-
7. ModifytheBasicLuisDialog class. Each LUIS intent should have a method decorated with **LuisIntent**. The parameter to the decoration is the actual LUIS intent name. The method name that is decorated _should_ be the LUIS intent name for readability and maintainability but doesn't have to be the same at design or run time.
153
+
7. Modifythe`BasicLuisDialog` class. Each LUIS intent should have a method decorated with **LuisIntent**. The parameter to the decoration is the actual LUIS intent name. The method name that is decorated _should_ be the LUIS intent name for readability and maintainability, but doesn't have to be the same at design or runtime.
154
154
155
155
```csharp
156
156
[Serializable]
@@ -162,7 +162,7 @@ In the above scenario, QnA Maker first gets the intent of the incoming question
0 commit comments