Customer Service Bot Reference Architecture
Provide your players a conversational assistant tailored to your game that understands natural language. This assistant can answer questions defined in one or more knowledge sets containing information from marketing materials to troubleshooting guides and everything in between.
Architecture Diagram
Architecture Services
- Azure Bot Service - Azure out-of-the-box solution for building serverless and scalable bots.
- Azure Language Understanding (LUIS) - Applies custom machine-learning intelligence to a user's conversational, natural language text to predict overall meaning, and pull out relevant, detailed information.
- Azure QnA Maker - Creates a question and answer repository of data based on information you provide.
- Azure Application Insights - Optionally used to monitor the customer service bot. It will automatically detect performance anomalies and help understand what users actually do with the bot.
Architecture considerations
This reference architecture will provide support for two different knowledge databases: one for game information and the other for technical support information.
You can, of course, extend and support more knowledge databases of your own. Please see the Azure Search pricing page to find out what pricing tier is more adequate for you, as each knowledge database requires the use of one search index.
Deployment
At the present time, it's not possible to automate the deployment of this reference architecture, as some of the services are managed through separate portals. Follow these steps to setup the backend:
Azure Language Understanding Service (LUIS)
- Create a new application at the LUIS portal. Note that this app will not not show up in the Azure portal, it lives on the LUIS portal only.
- Add intents ("Game" and "Support", for example, or whatever names make sense for your scenario). When these intents are recognized, you can determine what responses to provide to the user.
- For each intent, add some questions that a user might enter. For example, in the "Game" intent, you might have a question like, "Where can I find the sword?" or "How do I beat the second boss?"
- After you have created your intents and questions, you will need to train the service. Click the Train button at the top of the page.
- After training press the Publish button to make the service live.
- Under the Manage tab, you will find several bits of information. Make a note of the following:
- Application Information tab
- Application ID
- Keys and Endpoints tab
- Key 1
- Endpoint
- Application Information tab
QnA Maker Service
There are two tiers for QnA Maker. Pease read through the pricing information for the service located at the bottom of this page. Be aware that you will have to pay for Azure App Service, Azure Search, and optionally Azure Insights as part of the QnA Maker service.
- Navigate to the QnA Maker portal.
- Click Create a knoweldge base at the top of the page.
- If this is your first knowledge base, create a QnA Maker service by clicking the button provided. This will redirect you to the Azure portal.
- Name it azgaming-refarch-bot-qna (for example)
- Choose the pricing tiers that make sense for your usage and select appropriate locations for the resources. Note that the Search pricing tier will determine how many different knowledge bases you can create, and also note that the service itself will use a single index, so you are left with N-1 indexes/knowledge bases.
- Once complete, back at the QnA Maker portal, click the Refresh button and select the service you just created.
- Name the knowledge base accordingly (similar to the "Game" and "Support" names we used earlier).
- If you have an existing FAQ or other information, you can enter it here. Otherwise, click the Create your KB button.
- Once created, select the My knowledge bases tab, and click your knowledge base. Here, you can add key/value pairs for questions and answers. For example, above we created a question of "Where can I find the sword?" in LUIS. Here, you would create a key/value pair where the key is "sword" and the value would be the answer of "You will find the sword in the woods." Of course, these are free-form entries, use what makes sense for your scenario.
- Repeat these steps for each knowledge base you wish to respond to.
Azure Bot Service
- In the Azure Portal, create a Web App Bot.
- The free tier is just fine, but note other things you could end up paying for
- Note: you can use the same app service as the one you created above
- For the Bot template selection, select the SDK v3 option and choose the Language understanding option.
- After the bot is created, go to the Application settings item in the Web App Bot you just created.
- Find the LuisAppId entry and set its value to the Application ID you received above in the LUIS steps.
- Modify the code as shown in this article.
- With the code in place and built, you can test the bot using the Test in Web Chat option in the Azure portal.
Channels
In order for the public to use this bot, you will need to set up which "channels" it runs on. Please see this article for information on how to configure each channel.
Additional Resources and Samples
Use bot with QnA Maker and LUIS to distribute your knowledge base
Pricing
If you don't have an Azure subscription, create a free account to get started with 12 months of free services. You're not charged for services included for free with Azure free account, unless you exceed the limits of these services. Learn how to check usage through the Azure Portal or through the usage file.
You are responsible for the cost of the Azure services used while running these reference architectures. See the pricing webpages for each of the services that were used in the reference architecture:
- Azure Bot Service
- Azure Language Understanding (LUIS)
- Azure QnA Maker
- Azure Search pricing
- Azure Application Insights
You can also use the Azure pricing calculator to configure and estimate the costs for the Azure services that you are planning to use.
Feedback
Submit and view feedback for



