Use Question Answering Model With Language Studio
Use Question Answering Model With Language Studio
Language Studio
In this exercise you will use Language Studio to create and train a knowledge
base of question and answers that will be used by a customer services bot.
Content for the knowledge base will come from an existing FAQ page from
the web site of Margie’s Travel, a fictitious travel agency. You will then use
Language Studio to see how it would work when used by customers.
1.
2.
3. Click the +Create a resource button and search for Language service.
Select create a Language service plan. You will be taken to a page
to Select additional features. Use the following settings:
1. Select Additional Features:
1. Default features: Keep the default features.
2. Custom features: Select custom question answering.
2. Select Continue to create your
resource
4. On the Create Language page, specify the following settings:
1. Project Details
1. Subscription: Your Azure subscription.
2. Resource group: Select an existing resource group or
create a new one.
2. Instance Details
4. Responsible AI Notice
5.
Select Review and Create and then select Create. Wait for the
deployment of the Language service that will support your custom
question answering knowledge base.
6.
7.
3.
At the top of the Language Studio portal, in the Create new menu,
select Custom question answering.
4.
5.
6.
7.
8. On the Enter basic information page, enter the following details and
click Next:
1. At the top of the Question answer pairs pane, select Test to test your
knowledge base.
2. In the test pane, at the bottom enter the message Hi. The
response Hi should be returned.
3.
In the test pane, at the bottom enter the message I want to book a
flight. An appropriate response from the FAQ should be returned.
4.
5.
6. Try another question, such as How can I cancel a reservation?
7. When you’re done testing the knowledge base, select Test to close the
test pane.
1. After the service has been deployed, select Create a bot. This opens
the Azure portal in a new browser tab so you can create a Web App Bot
in your Azure subscription.
2.
In the Azure portal, create a Web App Bot. (You may see a warning
message to check that the source of the template is trustworthy. You
do not need to take any action for that message.) Continue by
updating the following settings:
3.
1. Project Details
2. Instance details
1. Resource group Location: The same location as your
Language service.
3. Azure Bot
5. Microsoft App ID
6. App Service
8. App Settings
1. Language Resource Key: You will need to copy your
Language resource key and paste it here:
5. Select Create. Then wait for your bot to be created (the notification
icon at the top right, which looks like a bell, will be animated while you
wait). Then in the notification that deployment has completed,
select Go to resource (or alternatively, on the home page,
click Resource groups, open the resource group where you created
the bot, and select the Azure bot resource.)
6. In the left-hand pane of your bot look for Settings, select on Test in
Web Chat, and wait until the bot displays the message Hello and
Welcome (it may take a few seconds to initialize).
7. Use the test chat interface to ensure your bot answers questions from
your knowledge base as expected. For example, try submitting I need
to cancel my hotel.
Experiment with the bot. You’ll probably find that it can answer questions
from the FAQ quite accurately, but it will have limited ability to interpret
questions that it has not been trained with. You can always use the Language
Studio to edit the knowledge base to improve it, and republish it.
Clean up
If you don’t intend to do more exercises, delete any resources that you no
longer need. This avoids accruing any unnecessary costs.
1. Open the Azure portal and select the resource group that contains the
resource you created.
2. Select the resource and select Delete and then Yes to confirm. The
resource is then deleted.
Learn more
To learn more about the Question Answering service, view the
documentation.
To learn more about the Microsoft Bot Service, view the Azure Bot
Service page.