|
| 1 | +--- |
| 2 | +title: Add guided conversations with multi-turn prompts |
| 3 | +description: In this tutorial learn how to make guided conversations with multi-turn prompts. |
| 4 | +ms.service: cognitive-services |
| 5 | +ms.subservice: qna-maker |
| 6 | +ms.topic: tutorial |
| 7 | +author: mrbullwinkle |
| 8 | +ms.author: mbullwin |
| 9 | +ms.date: 06/29/2021 |
| 10 | +--- |
| 11 | + |
| 12 | +# Add guided conversations with multi-turn prompts |
| 13 | + |
| 14 | + In this tutorial, we use [Surface Pen FAQ](https://support.microsoft.com/surface/how-to-use-your-surface-pen-8a403519-cd1f-15b2-c9df-faa5aa924e98) to create a knowledge base. |
| 15 | + |
| 16 | +For this example let's assume that users are asking for additional details about the Surface Pen product, particularly how to troubleshoot their Surface Pen, but they are not getting the correct answers. So, we add more prompts to support additional scenarios and guide the users to the correct answers using multi-turn prompts. |
| 17 | + |
| 18 | +## View QnAs with context |
| 19 | +While creating the knowledge base for [Surface Pen FAQ](https://support.microsoft.com/surface/how-to-use-your-surface-pen-8a403519-cd1f-15b2-c9df-faa5aa924e98), we choose to enable multi-turn extraction from the source document. For more details, follow [Create multi-turn conversation from document](../how-to/multiturn-conversation.md#create-a-multi-turn-conversation-from-a-documents-structure). This lists the multi-turn prompts that are associated with QnA pairs, which can be viewed using **Show context** under **View Options**. |
| 20 | + |
| 21 | +> [!div class="mx-imgBorder"] |
| 22 | +> [  ]( ../media/guided-conversations/show-context.png#lightbox) |
| 23 | +
|
| 24 | +This displays the context tree where all follow-up prompts linked to a QnA pair are shown: |
| 25 | + |
| 26 | +> [!div class="mx-imgBorder"] |
| 27 | +> [  ]( ../media/guided-conversations/source.png#lightbox) |
| 28 | +
|
| 29 | +## Add new QnA pair with follow-up prompts |
| 30 | + |
| 31 | +To help the user solve issues with their Surface Pen, we add follow-up prompts: |
| 32 | + |
| 33 | +1. Add a new QnA pair with two follow-up prompts |
| 34 | +2. Add a follow-up prompt to one of the newly added prompts |
| 35 | + |
| 36 | +**Step 1**: Add a new QnA pair with two follow-up prompts **Check compatibility** and **Check Pen Settings** |
| 37 | +Using the editor, we add a new QnA pair with a follow-up prompt by clicking on **Add QnA pair** |
| 38 | + |
| 39 | +> [!div class="mx-imgBorder"] |
| 40 | +> [  ]( ../media/guided-conversations/add-pair.png#lightbox) |
| 41 | +
|
| 42 | +A new row in **Editorial** is created where we enter the QnA pair as shown below: |
| 43 | + |
| 44 | +> [!div class="mx-imgBorder"] |
| 45 | +> [  ]( ../media/guided-conversations/follow-up.png#lightbox) |
| 46 | +
|
| 47 | +We then add a follow-up prompt to the newly created QnA pair by choosing **Add follow-up prompt**. Clicking on which, we fill the details for the prompt as shown: |
| 48 | + |
| 49 | +> [!div class="mx-imgBorder"] |
| 50 | +> [  ]( ../media/guided-conversations/follow-up.png#lightbox) |
| 51 | +
|
| 52 | +We provide **Check Compatibility** as the “Display text” for the prompt and try to link it to a QnA. Since, no related QnA pair is available to link to the prompt, when we search “Check your Surface Pen Compatibility”, we create a new QnA pair by clicking on **Create new**. Once we **Save** the changes, the following screen is presented, where a new QnA pair for the follow-up prompt can be entered as shown below: |
| 53 | + |
| 54 | +> [!div class="mx-imgBorder"] |
| 55 | +> [  ]( ../media/guided-conversations/check-compatibility.png#lightbox) |
| 56 | +
|
| 57 | +Similarly, we add another prompt **Check Pen Settings** to help the user troubleshoot the Surface Pen and add QnA pair to it. |
| 58 | + |
| 59 | +> [!div class="mx-imgBorder"] |
| 60 | +> [  ]( ../media/guided-conversations/check-pen-settings.png#lightbox) |
| 61 | +
|
| 62 | +**Step 2**: Add another follow-up prompt to newly created prompt. We now add “Replace Pen tips’ as a follow-up prompt to the previously created prompt “Check Pen Settings”. |
| 63 | + |
| 64 | +> [!div class="mx-imgBorder"] |
| 65 | +> [  ]( ../media/guided-conversations/replace-pen-tips.png#lightbox) |
| 66 | +
|
| 67 | +We finally save the changes and test these prompts in the Test pane: |
| 68 | + |
| 69 | +> [!div class="mx-imgBorder"] |
| 70 | +> [  ]( ../media/guided-conversations/test-pane.png#lightbox) |
| 71 | +
|
| 72 | +For a user query **Issues with Surface Pen**, the system returns an answer and presents the newly added prompts to the user. The user then selects one of the prompts **Check Pen Settings** and the related answer is returned to the user with another prompt **Replace Pen Tips**, which when selected further provides the user with more information. So, multi-turn is used to help and guide the user to the desired answer. |
| 73 | + |
| 74 | +## Next steps |
| 75 | + |
| 76 | +> [!div class="nextstepaction"] |
| 77 | +> [Enrich your knowlege base with active learning](active-learning.md) |
0 commit comments