Conversational Artificial Intelligence in Azure

0
9

What is Conversational Artificial Intelligence?

In today’s connected world, people use Conversational Artificial Intelligence to communicate. For example:

  • Voice calls
  • Messaging services
  • Online chat applications
  • Email
  • Social media platforms
  • Collaborative workplace tools

We’ve become so used to ubiquitous connectivity, that we expect the organizations we deal with to be easily contactable and immediately responsive through the channels we already use. Additionally, we expect these organizations to engage with us individually, and be able to answer complex questions at a personal level using the technique of Conversational Artificial Intelligence.

Perception:

While many organizations publish support information and answers to frequently asked questions (FAQs) that can be accessed through a web browser or dedicated app. The complexity of the systems and services they offer means that answers to specific questions are hard to find. Often, these organizations find their support personnel being overloaded with requests for help through phone calls, email, text messages, social media, and other channels.

Increasingly, organizations are turning to artificial intelligence (AI) solutions that make use of AI agents, commonly known as bots to provide a first-line of automated support through the full range of channels that we use to communicate. Bots are designed to interact with users in a conversational manner, as shown in this example of a chat interface:

Chat interface bots – Conversational Artificial Intelligence.

The example shown here is a chat interface, such as you might find on a web site; but bots can be designed to work across multiple channels, including email, social media platforms, and even voice calls. Regardless of the channel used, bots typically manage conversation flows using a combination of natural language and constrained option responses that guide the user to a resolution.

Conversations typically take the form of messages exchanged in turns; and one of the most common kinds of conversational exchange is a question following by an answer. This pattern forms the basis for many user support bots, and can often be based on existing FAQ documentation. To implement this kind of solution, you need:

  • knowledge base of question and answer pairs – usually with some built-in natural language processing model to enable questions that can be phrased in multiple ways to be understood with the same semantic meaning.
  • bot service that provides an interface to the knowledge base through one or more channels.

Responsible Guidelines for Conversational Artificial Intelligence:

  1. Be transparent about what the bot can (and can’t) do
  2. Make it clear that the user is communicating with a bot
  3. Enable the bot to seamlessly hand-off to a human if necessary
  4. Ensure the bot respects cultural norms
  5. Ensure the bot is reliable
  6. Respect user privacy
  7. Handle data securely
  8. Ensure the bot meets accessibility standards
  9. Assume accountability for the bot’s actions

The QnA Maker Service

You can easily create a user support bot solution on Microsoft Azure using a combination of two core technologies:

  • QnA Maker. This cognitive service enables you to create and publish a knowledge base with built-in natural language processing capabilities.
  • Azure Bot Service. This service provides a substructute for developing, publishing, and managing bots on Azure.

Creating a QnA Maker knowledge base

The first challenge in creating a user support bot is to use the QnA Maker service to create a knowledge base. The service provides a dedicated QnA Maker portal web-based interface that you can use to create, train, publish, and manage knowledge bases.

Note: You can write code to create and manage knowledge bases using the QnA Maker REST API or SDK. However, in most scenarios it is easier to use the QnA Maker portal.

Provision a QnA Maker Azure resource

To create a knowledge base, you must first provision a QnA Maker resource in your Azure subscription. You can do this directly in the Azure portal before you start creating your knowledge base, or you can start developing your knowledge base in the QnA Maker portal and provision the resource when prompted.

Define questions and answers

After provisioning a QnA Maker resource, you can use the QnA Maker portal to create a knowledge base that consists of question-and-answer pairs. These questions and answers can be:

  • FAQ document or web page which was existing. generated this.
  • Imported from a pre-defined chit-chat data source.
  • Entered and edited manually.

In many cases, a knowledge base is created using a combination of all of these techniques; starting with a base dataset of questions and answers from an existing FAQ document, adding common conversational exchanges from a chit-chat source, and extending the knowledge base with additional manual entries.

Assigning questions in the knowledge base with alternative phrasing  helps consolidate questions with the same meaning. For example, you might include a question like:

What is your head office location?

You can anticipate different ways this question can be asked by adding an alternative phrasing such as:

Where is your head office?

Train and test the knowledge base

After creating a set of question-and-answer pairs, you must train your knowledge base. This process analyzes your literal questions and answers and applies a built-in natural language processing model to match appropriate answers to questions, even when they are not phrased exactly as specified in your question definitions.

After training, you can use the built-in test interface in the QnA Maker portal to test your knowledge base by submitting questions and reviewing the answers that returns.

Publish the knowledge base

When you’re satisfied with your trained knowledge base, you can publish it so that client applications can use it over its REST interface. To access the knowledge base, client applications require:

Knowledge base:-

  • ID
  • Endpoint
  • Authorization key

Azure Bot Service

After you’ve created and published a knowledge base, you can use Azure Bot Service deliver it to users through a bot.

Create a bot for your knowledge base

You can create a custom bot by using the Microsoft Bot Framework SDK to write code that controls conversation flow and integrates with your QnA Maker knowledge base. However, an easier approach is to use the automatic bot creation functionality of QnA Maker, which enables you create a bot for your published knowledge base and publish it as an Azure Bot Service application with just a few clicks.

Extend and configure the bot

After creating your bot, you can manage it in the Azure portal, where you can:

  • Extend the bot’s functionality by adding custom code.
  • Test the bot in an interactive test interface.
  • Configure logging, analytics, and integration with other services.

For simple updates, you can edit bot code directly in the Azure portal. However, for more comprehensive customization, you can download the source code and edit it locally; republishing the bot directly to Azure when you’re ready.

Connect channels

When your bot is ready to deliver to users, you can connect it to multiple channels by Conversational Artificial Intelligence; making it possible for users to interact with it through web chat, email, Microsoft Teams, and other common communication media.

Users can submit questions to the bot through any of its channels, and receive an appropriate answer from the knowledge base on which the bot is based.