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
Collaborate with other authors and editors using role-based access control (RBAC) placed on your QnA Maker resource.
11
+
12
+
## Access is provided on the QnA Maker resource
13
+
14
+
All permissions are controlled by the permissions placed on the QnA Maker resource. These permissions align to read, write, publish, and full access.
15
+
16
+
This RBAC feature includes:
17
+
* Azure Active Directory (AAD) is 100% backward compatible with key-based authentication for owners and contributors. Customers can use either key-based authentication or RBAC-based authentication in their requests.
18
+
* Quickly add authors and editors to all knowledge bases in the resource because control is at the resource level, not at the knowledge base level.
The following diagram shows the flow, from the author's perspective, for signing into the QnA Maker portal and using the authoring APIs.
27
+
28
+
> [!div class="mx-imgBorder"]
29
+
> 
30
+
31
+
|Steps|Description|
32
+
|--|--|
33
+
|1|Portal Acquires token for QnA Maker resource.|
34
+
|2|Portal Calls the appropriate QnA Maker authoring API (APIM) passing the token instead of keys.|
35
+
|3|QnA Maker API validates the token.|
36
+
|4 |QnA Maker API calls QnAMaker Service.|
37
+
38
+
If you intend to call the authoring APIs](../How-To/collaborate-knowledge-base.md), learn more about how to set up authentication.
39
+
40
+
## Authenticate by QnA Maker portal
41
+
42
+
If you author and collaborate using the QnA Maker portal, after you [add the appropriate role to the resource for a collaborator](../How-To/collaborate-knowledge-base.md), the QnA Maker portal manages all the access permissions.
43
+
44
+
## Authenticate by QnA Maker APIs and SDKs
45
+
46
+
If you author and collaborate using the APIs, either through REST or the SDKs, you need to [create a service principal](../../authentication.md#assign-a-role-to-a-service-principal) to manage the authentication.
47
+
48
+
## Next step
49
+
50
+
* Design a knowledge base for [languages](design-language-culture.md) and for [client applications](integration-with-other-applications.md)
Copy file name to clipboardExpand all lines: articles/cognitive-services/QnAMaker/Tutorials/integrate-with-power-virtual-assistant-fallback-topic.md
+56-14Lines changed: 56 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,32 @@
1
1
---
2
-
title: Integrate Power Virtual Agent - QnA Maker
3
-
description: Improve the quality of your knowledge base with active learning. Review, accept or reject, add without removing or changing existing questions.
4
-
ms.topic: conceptual
2
+
title: "Tutorial: Integrate with Power Virtual Agent - QnA Maker"
3
+
description: In this tutorial, improve the quality of your knowledge base with active learning. Review, accept or reject, add without removing or changing existing questions.
4
+
ms.topic: tutorial
5
5
ms.date: 03/11/2020
6
6
---
7
7
8
-
# How to add a QnA Maker knowledge base to Power Virtual Agent
8
+
# Tutorial: Add knowledge base to Power Virtual Agent
9
+
Create and extend a [Power Virtual Agent](https://powervirtualagents.microsoft.com/) bot to provide answers from your knowledge base.
9
10
10
-
Extend your [Power Virtual Agent](https://powervirtualagents.microsoft.com/) bot to provide answers from your knowledge base. You can configure your bot topic _conversation path_ to send the user's text, as the _trigger phrase_, to your knowledge base, then return the answer to your user shown in a message.
11
+
**In this tutorial, you learn how to:**
11
12
12
-
## Use QnA Maker knowledge base with a Power Virtual Agent
13
+
<!-- green checkmark -->
14
+
> [!div class="checklist"]
15
+
> * Create Power Virtual Agent
16
+
> * Create System fallback topic
17
+
> * Add QnA Maker as action to topic as Power Automate flow
18
+
> * Create Power Automate solution
19
+
> * Add Power Automate flow to solution
20
+
> * Publish Power Virtual Agent
21
+
> * Test Power Virtual Agent, recieve answer from QnA Maker knowledge base
13
22
14
-
QnA Maker is a cloud-based API service that lets you create a conversational question-and-answer layer over your existing data. Use it to build a knowledge base by extracting questions and answers from your semi-structured content, including FAQs, manuals, and documents. Answer questions from the QnA sets in your knowledge base. Your knowledge base gets smarter, too, as it continually learns from user behavior.
23
+
## Integrate a Power Virtual agent with a knowledge base
15
24
16
-
## Power Virtual agent
25
+
[Power Virtual Agents](https://powervirtualagents.microsoft.com/) empowers teams to easily create powerful bots using a guided, no-code graphical interface without the need for data scientists or developers.
17
26
18
27
A Power Virtual Agent is created with a series of topics (subject areas), in order to answer user questions by performing actions. If an answer can't be found, a system fallback can return an answer.
19
28
20
-
You can send the question to your knowledge base as part of a topic's action or as part of the System Fallback topic path. They both use the same mechanism of an action to connect to your knowledge base and return an answer.
29
+
Configure the agent to send the question to your knowledge base as part of a topic's action or as part of the System Fallback topic path. They both use the same mechanism of an action to connect to your knowledge base and return an answer.
21
30
22
31
## Power Automate connects to GenerateAnswer action
23
32
@@ -27,6 +36,8 @@ Once the **flow** is designed and saved, it is available from a Power Automate *
27
36
28
37
## Process steps to connect an agent to your knowledge base
29
38
39
+
The following steps are presented as an overview to help you understand how the steps relate the goal of connecting Power Virtual Agent to a QnA Maker knowledge base.
40
+
30
41
Steps to use a Power Virtual agent with QnA Maker:
31
42
* In [QnA Maker](https://www.qnamaker.ai/) portal
32
43
* Build and publish knowledge base
@@ -47,15 +58,38 @@ Steps to use a Power Virtual agent with QnA Maker:
47
58
* Return to Power Virtual Agent
48
59
* Select solution's output as message for topic
49
60
61
+
## Create and publish a knowledge base
62
+
63
+
Follow the [quickstart](../Quickstarts/create-publish-knowledge-base.md) to create a knowledge base. Do not complete the last section to create a bot. This tutorial uses the Power Virtual Agent instead of the Bot Framework bot in the quickstart.
64
+
50
65
## Get your published knowledge base information
51
66
52
67
Before you build your agent, create and publish your knowledge base. Next, find the endpoint key, endpoint host, and knowledge base ID on the **Settings** page in the QnA Maker portal.
53
68
69
+
> [!div class="mx-imgBorder"]
70
+
>  portal.](../media/how-to-integrate-power-virtual-agent/published-knowledge-base-settings.png)
71
+
54
72
You will need this information for the [Power Automate step](#create-power-automate-flow-to-connect-to-your-knowledge-base) to configure your QnA Maker GenerateAnswer connection.
55
73
74
+
## Create Power Virtual Agent
75
+
76
+
1.[Sign into](https://go.microsoft.com/fwlink/?LinkId=2108000&clcid=0x409) the Power Virtual Agent with your school or work email account.
77
+
1. If this is not your first Power Virtual Agent, select the bot from the top-right navigation and select **+ New Bot**. If this is your first bot, you should be on the **Home** page of the agent.
78
+
79
+
> [!div class="mx-imgBorder"]
80
+
>  portal.](../media/how-to-integrate-power-virtual-agent/power-virtual-agent-home.png)
81
+
82
+
## Several topics are provided in the bot
83
+
84
+
The agent uses the topic collection to answer questions in your subject area. In this tutorial, the agent has many topics provided for divided into **User Topics** and **System topics**.
85
+
86
+
> [!div class="mx-imgBorder"]
87
+
> 
88
+
89
+
56
90
## Create Power Virtual Agent's System fallback topic
57
91
58
-
The first step is to configure an agent topic. While it can be any topic, this procedure uses the System **Fallback** topic. If the agent can't find an answer, it should pass the answer to QnA Maker's GenerateAnswer API.
92
+
While the agent can connect to your knowledge base from any topic, this tutorial uses the System **Fallback** topic. The fallback topic is used when the agent can't find an answer in the current topic. The agent passes the user's text to QnA Maker's GenerateAnswer API, receives the answer and displays it back to the user as a message.
59
93
60
94
1. In the [Power Virtual Agents](https://powerva.microsoft.com/#/) portal, on the top-right corner of the navigation, select the **Settings** page. The icon for this page is the gear. Select **System Fallback**.
61
95
@@ -74,14 +108,16 @@ The first step is to configure an agent topic. While it can be any topic, this p
74
108
75
109
## Use authoring canvas to add an action
76
110
77
-
Use the Power Virtual Agent's authoring canvas to connect the Fallback topic to your knowledge base. The topic starts with the **unrecognized user text**. You need to add an action that passes that text to QnA Maker, then shows the answer as a message. The last step of displaying an answer is handled as a separate step later.
111
+
Use the Power Virtual Agents authoring canvas to connect the Fallback topic to your knowledge base. The topic starts with the **unrecognized user text**. You need to add an action that passes that text to QnA Maker, then shows the answer as a message. The last step of displaying an answer is handled as a separate step later.
78
112
79
-
1. The new Fallback action may already have conversation flow elements. Delete all items in the flow except for the first item, **Trigger Phrases**, with the `Unrecognized user input`.
113
+
This section creates the fallback topic conversation flow.
114
+
115
+
1. The new Fallback action may already have conversation flow elements. Delete the **Escalate** item by selecting the Options menu.
80
116
81
117
> [!div class="mx-imgBorder"]
82
-
> 
118
+
> 
83
119
84
-
1. Select the **+** connector flowing from the **Trigger Phrases** box, then select **Call an action**.
120
+
1. Select the **+** connector flowing from the **Message** box, then select **Call an action**.
85
121
86
122
> [!div class="mx-imgBorder"]
87
123
> 
@@ -91,6 +127,8 @@ Use the Power Virtual Agent's authoring canvas to connect the Fallback topic to
91
127
> [!div class="mx-imgBorder"]
92
128
> 
93
129
130
+
A new browser window opens to the **Power Automate** portal.
131
+
94
132
## Create Power Automate Flow to connect to your knowledge base
95
133
96
134
The following procedure creates an action that:
@@ -212,6 +250,10 @@ Test the agent by typing in a question that your knowledge base can answer. The
212
250
> [!div class="mx-imgBorder"]
213
251
> [](../media/how-to-integrate-power-virtual-agent/power-virtual-agent-test.png#lightbox)
214
252
253
+
## Clean up resources
254
+
255
+
When you are done with the knowledge base, remove the QnA Maker resources in the Azure portal.
256
+
215
257
## Next step
216
258
217
259
[Get analytics on your knowledge base](get-analytics-knowledge-base.md)
0 commit comments