Skip to content

Commit fe4501c

Browse files
committed
edits
1 parent 8dd2885 commit fe4501c

File tree

4 files changed

+59
-20
lines changed

4 files changed

+59
-20
lines changed

articles/cognitive-services/QnAMaker/Tutorials/integrate-with-power-virtual-assistant-fallback-topic.md

Lines changed: 59 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ This section creates the fallback topic conversation flow.
131131

132132
## Create Power Automate Flow to connect to your knowledge base
133133

134-
The following procedure creates an action that:
134+
The following procedure creates a **Power Automate** flow that:
135135
* takes the incoming user text
136136
* sends it to QnA Maker
137137
* assigns the QnA Maker response to a variable
138138
* sends only the top answer as the response back to your agent
139139

140-
1. In **Power Automate**, the **Flow Template** is started. On the **Power Virtual Agents** item, select **Edit** to configure the input variable coming from your agent to your knowledge base. The text-based input variable is the user-submitted text question from your agent.
140+
1. In **Power Automate**, the **Flow Template** is started. On the **Power Virtual Agents** flow item, select **Edit** to configure the input variable coming from the agent to your knowledge base. The text-based input variable is the user-submitted text question from your agent.
141141

142142
> [!div class="mx-imgBorder"]
143143
> ![Configure your input variable as a text string](../media/how-to-integrate-power-virtual-agent/power-automate-configure-input-variable.png)
@@ -154,7 +154,7 @@ The following procedure creates an action that:
154154
> [!div class="mx-imgBorder"]
155155
> ![Search for `Qna` to find the **QnA Maker** actions, then select **Generate answer**](../media/how-to-integrate-power-virtual-agent/generate-answer-action-selected.png)
156156
157-
The connections settings for QnA Maker appear in the action.
157+
The three (3) required connections settings for QnA Maker appear in the action and the question settings from the virtual agent..
158158

159159
> [!div class="mx-imgBorder"]
160160
> ![The connections settings for QnA Maker appear in the action.](../media/how-to-integrate-power-virtual-agent/generate-answer-knowledge-base-settings.png)
@@ -181,14 +181,16 @@ The following procedure creates an action that:
181181

182182
Select the GenerateAnswer `answers`, which is the entire JSON from the GenerateAnswer API call. In the same **Apply to each** box, select **Add an action**. This subsequent action gets only the top answer and sets that to the variable.
183183

184+
1. Search for and select **Set variable**.
185+
184186
1. In the **Set variable** box, select the text box for **Name**, then select **OutgoingQnAAnswer** from the list.
185187

186188
Select the text box for **Value**, then select **Answers Answer** from the list.
187189

188190
> [!div class="mx-imgBorder"]
189191
> ![Set the name and value for the variable ](../media/how-to-integrate-power-virtual-agent/power-automate-flow-apply-to-each-set-variable.png)
190192
191-
1. To return the variable (and its value), select the **Return value(s) to Power Virtual Agent** then select **Add an output**. Select a **Text** output type then enter the **Title** of `FinalAnswer`. Select the text box for the **Value**, then select the `OutgoingQnAAnswer` variable.
193+
1. To return the variable (and its value), select the **Return value(s) to Power Virtual Agent** flow item then select **Edit**, then **Add an output**. Select a **Text** output type then enter the **Title** of `FinalAnswer`. Select the text box for the **Value**, then select the `OutgoingQnAAnswer` variable.
192194

193195
> [!div class="mx-imgBorder"]
194196
> ![Set the return value](../media/how-to-integrate-power-virtual-agent/power-automate-flow-return-value.png)
@@ -201,37 +203,38 @@ In order for the Power Virtual Agent to find and connect to the flow, the flow m
201203

202204
1. While still in Power Automate, select **Solutions** from the left-side navigation.
203205

204-
1. Select **+ New solution** and configure the solution. Select **Create** to finish the process.
206+
1. Select **+ New solution**.
205207

206-
> [!div class="mx-imgBorder"]
207-
> ![Create new solution](../media/how-to-integrate-power-virtual-agent/power-automate-create-new-solution.png)
208+
1. Enter a display name. The list of solutions includes every solution in your organization or school. Choose a naming convention that helps you filter to just your solutions such as prefixing your email to your solution name: `jondoe-power-virtual-agent-qnamaker-fallback`.
208209

209-
1. In the list of solutions, select the solution you just created. It should be at the top of the list.
210+
1. Select your publisher from the list of choices.
210211

211-
1. In the solution, select **+ Add existing**, then select **Flow** from the list.
212+
1. Accept the default values for the name and version.
212213

213-
1. Select the **Outside solutions** tab, then select the flow you just created. Select **Add** to finish the process.
214+
1. Select **Create** to finish the process.
214215

215-
> [!div class="mx-imgBorder"]
216-
> ![Add flow to solution](../media/how-to-integrate-power-virtual-agent/power-automate-add-flow-to-solution.png)
216+
## Add flow to solution
217+
218+
1. In the list of solutions, select the solution you just created. It should be at the top of the list. If it isn't, search by your email name, which is part of the solution name.
219+
220+
1. In the solution, select **+ Add existing**, then select **Flow** from the list.
221+
222+
1. Find your flow, then select **Add** to finish the process. If there are many flows, look at the **Modified** column to find the most recent flow.
217223

218224
## Add solution's flow to Power Virtual Agent
219225

220226
1. Return to the browser tab with your Power Virtual Agent. The authoring canvas should still be open.
221227

222-
1. Select the **+** connector under the **Trigger Phrases** action box to insert a new step in the flow, then select **Call an action**.
223-
224-
> [!div class="mx-imgBorder"]
225-
> ![Call an action from the authoring canvas](../media/how-to-integrate-power-virtual-agent/power-virtual-agent-topic-authoring-canvas-call-an-action.png)
228+
1. Select the **+** connector under the **Message** action box to insert a new step in the flow, then select **Call an action**.
226229

227-
1. In the new action, select the input value of **UnrecognizedTriggerPhrase**.
230+
1. In the new action, select the input value of **UnrecognizedTriggerPhrase**. This passes the text from the agent to the flow.
228231

229232
> [!div class="mx-imgBorder"]
230233
> ![In the new action, select the input value of **UnrecognizedTriggerPhrase**.](../media/how-to-integrate-power-virtual-agent/power-virtual-agent-select-unrecognized-trigger-phrase.png)
231234
232235
1. Select the **+** connector under the **Action** box to insert a new step in the flow, then select **Show a message**.
233236

234-
1. Enter the message text and the `FinalAnswer` from the Power Automate Flow.
237+
1. Enter the `Your answer is:` message text and select `FinalAnswer` as a context variable using the function of the in-place toolbar.
235238

236239
> [!div class="mx-imgBorder"]
237240
> ![Enter the message text and the `FinalAnswer` from the Power Automate Flow.](../media/how-to-integrate-power-virtual-agent/power-virtual-agent-topic-authoring-canvas-show-message-final-answer.png)
@@ -245,10 +248,46 @@ The final canvas is shown below.
245248
246249
## Test Power Virtual Agent
247250

248-
Test the agent by typing in a question that your knowledge base can answer. The authoring canvas reports the successful steps with a green check mark.
251+
1. In the test pane, toggle **Track between topics**. This allows you to watch the progression between topics as well as in topic.
252+
253+
1. Test the agent by entering the user text in the order provided below. The authoring canvas reports the successful steps with a green check mark.
254+
255+
|Question order|Test questions|Purpose|
256+
|--|--|--|
257+
|1|Hello|Begin conversation|
258+
|2|Store hours|Sample topic - configured for you without any additional work on your part.|
259+
|3|Yes|In reply to `Did that answer your question?`|
260+
|4|Excellent|In reply to `Please rate your experience.`|
261+
|5|Yes|In reply to `Can I help with anything else?`|
262+
|6|What is a knowledge base?|This question triggers the fallback action which sends the text to your knowledge base to answer, then the answer is displayed. |
249263

250264
> [!div class="mx-imgBorder"]
251-
> [![Test you Power Virtual Agent with a query meant for your knowledge base.](../media/how-to-integrate-power-virtual-agent/power-virtual-agent-test.png)](../media/how-to-integrate-power-virtual-agent/power-virtual-agent-test.png#lightbox)
265+
> ![Final agent canvas](../media/how-to-integrate-power-virtual-agent/power-virtual-agent-test-tracked.png)
266+
267+
## Publish your bot
268+
269+
In order to make the agent available to all members of your school or organization, you need to publish it to a channel.
270+
271+
1. Select **Publish** from the left-navigation.
272+
273+
1. Select **Publish** on the page.
274+
275+
1. Try your bot on the demo website, provided as a link below the **Publish** button .
276+
277+
A new web page opens with your bot. Ask the bot the same test question: `What is a knowledge base?`
278+
279+
> [!div class="mx-imgBorder"]
280+
> ![Final agent canvas](../media/how-to-integrate-power-virtual-agent/demo-chat-bot.png)
281+
282+
## Share your bot
283+
284+
In order to share the demo website, configure it as a channel.
285+
286+
1. Select **Manage** then **Channels** from the left-navigation.
287+
288+
1. Select **Demo website** from the channels list.
289+
290+
1. Copy the link and select **Save**. Paste the link to your demo website into an email to your school or organization members.
252291

253292
## Clean up resources
254293

276 KB
Loading
Loading
Loading

0 commit comments

Comments
 (0)