Practical Labs – Fundamentals of Natural Language Processing


Practical Labs
Using a custom question-answering template, you will provision a simple knowledge base that serves the purpose of an informational bot. With the help of an information bot, you can get information quickly through simple text chat.
In customer service, bots that can understand and answer the most common questions asked by customers via text chat, email, or voice interface are becoming more common. The bot can give an appropriate answer because it has access to a database of questions and knows how to answer them.
The lab consists of four steps:
• Provisioning a question-answering knowledge base
• Editing the knowledge base
• Knowledge base training and testing
• Provisioning a bot to consume the knowledge base

Creating a Custom Question-Answering Knowledge Base
A Frequently Asked Question (FAQ) URL or a document can be used to feed questions and answers into a QnA Maker service, which then puts them all together. Here’s how it works:

  1. Log in to the Azure portal. Select Create Resource. Under the AI+Machine Learning category, select Language Service, as shown in Figure 5-1.

Figure 5-1Choosing a Language Service from the Azure Marketplace
For the custom features, select the “Custom question answering” option, as shown in Figure 5-2.

Figure 5-2Keeping all default features and adding custom question answering as a custom feature

  1. As shown in Figure 5-3, provide the subscription, resource group, unique name for your language resource, pricing tier, and other details.

Figure 5-3Creating new language services

  1. Select Review + Create, followed by Create. Wait until the Language Service is up and running before you use it in your own knowledge base.
  2. In the new tab, navigate to the Language Studio portal. Sign in with your Azure account, fill out the information for Azure directory and subscription, and choose the language resource that was already set up as shown in Figure 5-4.

Figure 5-4Choosing the language resource to be used by the custom question-answering service

  1. On the Language Studio home page, look for the “Understand questions and conversational language” menu and choose “Custom question answering” as shown in Figure 5-5.

Figure 5-5Selecting the custom question-answering service option

  1. Click +Create new project on the Language Studio page as shown in Figure 5-6 to create a new Language Studio Project.

Figure 5-6Creating a new Language Studio project

  1. On the Choose language setting for resource page, select “I want to select the language when I create a project in this resource” and click Next as depicted in Figure 5-7.

Figure 5-7Configuring language settings for the knowledge base project

  1. Figure 5-8 shows how to enter basic information for the question-answering knowledge base. On the Enter basic information page, enter the details such as name, description, source language, and default answer. Here, we keep the default language resource and Azure search resource:

Figure 5-8Entering basic information for custom question-answering knowledge base

  1. Finally, click Create project to provision the resource.
  2. You’ll be redirected to the Manage sources page; here on Manage Sources page, select URLs by clicking Add source as shown in Figure 5-9.

Figure 5-9Choosing URLs to include as knowledge base sources

  1. Click + Add URL in the Add URLs box. Fill in the details and select Add All as shown in Figure 5-10:
    • URL name: SPANLABS-FAQ
    • URL: https://ai900faqstorage.blob.core.windows.net/spanlabs/spanlabs_faq.docx
    • Classify file structure: Auto-detect

Figure 5-10Providing the URL for the knowledge base source

  1. You can see the recently added knowledge base source.

Leave a Reply

Your email address will not be published. Required fields are marked *