Editing Your Knowledge Base – Fundamentals of Natural Language Processing


Editing Your Knowledge Base

  1. Click Edit knowledge base on the left-hand panel as shown in Figure 5-11.

Figure 5-11Clicking Edit knowledge base

  1. Select + Add question pair.
  2. In the Questions box, type “Good Morning,” then click Submit changes.
  3. Click + Add alternate phrase and type “Good Day,” then click Submit changes.
  4. In the Answer and prompts box, type “Good Day.” Keep the Source: Editorial.
  5. Click Submit and click Save changes. Figure 5-12 shows the final output once you click on Save changes.

Figure 5-12Editing the knowledge base

Training and Testing the Knowledge Base

  1. Click Test to test your knowledge base as shown in Figure 5-13.

Figure 5-13Testing the knowledge base

  1. In the test pane, at the bottom enter the message Good Morning. The response Good Day should be returned.
  2. In the test pane, at the bottom enter the message Why SPAN LABS? You will see the response from the FAQ. You can see the output in the Figure 5-14.

Figure 5-14Testing the knowledge base

Creating an Informational Bot for the Knowledge Base
The knowledge base acts as a backend service for bots. Bots are common client apps. To make a bot’s knowledge base accessible, publish it as an HTTP service. With the Azure Bot Service, you can make and host a bot that uses the knowledge base to answer questions from users.

  1. At the left of the Language Studio page, click Deploy knowledge base.
  2. At the top of the page, click Deploy, and then click Deploy again as shown in Figure 5-15.

Figure 5-15Deploying the knowledge base

  1. After the service has been deployed, click Create a bot.
  2. Figure 5-16 is about Provisioning a new bot resource. Create a Web App Bot. Provide a unique name for the bot, select a pricing tier, and select the new user managed identity.

Figure 5-16Provisioning a new bot resource

  1. Select Next: Web App.
  2. You can go with the default name provided for the app name option. Choose C# or Node as the SDK language, and then click Create New App Service Plan. In the case of the Language Resource Key, go to your Language Service project and copy the key as shown in Figure 5-17.

Figure 5-17Copying the key from the Language Service project

  1. Select Review + Create, and at last click Create.
  2. Once your bot is created, click Go to resource group and select the Azure bot you have just provisioned.
  3. To test the newly provisioned bot, select Test in Web Chat as shown in Figure 5-18.

Figure 5-18Once inside the newly created bot instance, click Test in Web Chat

  1. Wait until the bot displays the message Hello and Welcome (it may take a few seconds to initialize).
  2. Use the test chat interface to test your bot as shown in Figure 5-19.

Figure 5-19Testing the bot

Leave a Reply

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