Manage QnA Maker resources
Before you can create any QnA Maker knowledge bases, you must first set up a QnA Maker service in Azure. Anyone with authorization to create new resources in a subscription can set up a QnA Maker service.
Types of keys in QnA Maker
Your QnA Maker service deals with two kinds of keys: subscription keys and endpoint keys.
|Subscription key||Azure portal||These keys are used to access the QnA Maker management service APIs. These APIs let you edit the questions and answers in your knowledge base, and publish your knowledge base. These keys are created when you create a new QnA Maker service.
Find these keys on the Cognitive Services resource on the Keys page.
|Endpoint key||QnA Maker portal||These keys are used to access the published knowledge base endpoint to get a response for a user question. You typically use this endpoint in your chat bot or in the client application code that connects to the QnA Maker service. These keys are created when you publish your QnA Maker knowledge base.
Find these keys in the Service settings page. Find this page from the user's menu in the upper right of the page on the drop-down menu.
Create a new QnA Maker service
This procedure creates the Azure resources needed to manage the knowledge base content. After you complete these steps, you'll find the subscription keys on the Keys page for the resource in the Azure portal.
Sign in to the Azure portal and create a QnA Maker resource.
Select Create after you read the terms and conditions:
In QnA Maker, select the appropriate tiers and regions:
In the Name field, enter a unique name to identify this QnA Maker service. This name also identifies the QnA Maker endpoint that your knowledge bases will be associated with.
Choose the Subscription under which the QnA Maker resource will be deployed.
Select the Pricing tier for the QnA Maker management services (portal and management APIs). See more details about SKU pricing.
Create a new Resource group (recommended) or use an existing one in which to deploy this QnA Maker resource. QnA Maker creates several Azure resources. When you create a resource group to hold these resources, you can easily find, manage, and delete these resources by the resource group name.
Select a Resource group location.
Choose the Search pricing tier of the Azure Cognitive Search service. If the Free tier option is unavailable (appears dimmed), it means you already have a free service deployed through your subscription. In that case, you'll need to start with the Basic tier. See Azure Cognitive Search pricing details.
Choose the Search location where you want Azure Cognitive Search indexes to be deployed. Restrictions on where customer data must be stored will help determine the location you choose for Azure Cognitive Search.
In the App name field, enter a name for your Azure App Service instance.
By default, App Service defaults to the standard (S1) tier. You can change the plan after creation. Learn more about App Service pricing.
Choose the Website location where App Service will be deployed.
The Search Location can differ from the Website Location.
Choose whether or not you want to enable Application Insights. If Application Insights is enabled, QnA Maker collects telemetry on traffic, chat logs, and errors.
Choose the App insights location where the Application Insights resource will be deployed.
For cost savings measures, you can share some but not all Azure resources created for QnA Maker.
After all the fields are validated, select Create. The process can take a few minutes to complete.
After deployment is completed, you'll see the following resources created in your subscription:
The resource with the Cognitive Services type has your subscription keys.
Find subscription keys in the Azure portal
You can view and reset your subscription keys from the Azure portal, where you created the QnA Maker resource.
Go to the QnA Maker resource in the Azure portal and select the resource that has the Cognitive Services type:
Go to Keys:
Find endpoint keys in the QnA Maker portal
The endpoint is in the same region as the resource because the endpoint keys are used to make a call to the knowledge base.
Endpoint keys can be managed from the QnA Maker portal.
Sign in to the QnA Maker portal, go to your profile, and then select Service settings:
View or reset your keys:
Refresh your keys if you think they've been compromised. This may require corresponding changes to your client application or bot code.
Share existing services with QnA Maker
QnA Maker creates several Azure resources. To reduce management and benefit from cost sharing, use the following table to understand what you can and can't share:
|Cognitive Services||X||Not possible by design|
|App Service plan||✔||Fixed disk space allocated for an App Service plan. If other apps that sharing the same App Service plan use significant disk space, the QnAMaker App Service instance will encounter problems.|
|App Service||X||Not possible by design|
|Application Insights||✔||Can be shared|
2. Synonym map by the name
3. The number of published knowledge bases is limited by Search service tier. If there are free indexes available, other services can use them.
Using a single Search service
If you create a QnA service and its dependencies (such as Search) through the portal, a Search service is created for you and linked to the QnA Maker service. After these resources are created, you can update the App Service setting to use a previously existing Search service and remove the one you just created.
If you create a QnA service through Azure Resource Manager templates, you can create all resources and control the App Service creation to use an existing Search service.
Upgrade QnA Maker
|Upgrade QnA Maker management SKU||You want to have more questions and answers in your knowledge base.|
|Upgrade App Service SKU||Your knowledge base needs to serve more requests from your client app, such as a chat bot.|
|Upgrade Azure Cognitive Search service||You plan to have many knowledge bases.|
Upgrade QnA Maker SKU
When you want to have more questions and answers in your knowledge base, beyond your current tier, upgrade your QnA Maker service pricing tier.
To upgrade the QnA Maker management SKU:
Go to your QnA Maker resource in the Azure portal, and select Pricing tier.
Choose the appropriate SKU and press Select.
Upgrade App Service
When your knowledge base needs to serve more requests from your client app, upgrade your App Service pricing tier.
You can scale up or scale out App Service.
Go to the App Service resource in the Azure portal, and select the Scale up or Scale out option as required.
Upgrade the Azure Cognitive Search service
If you plan to have many knowledge bases, upgrade your Azure Cognitive Search service pricing tier.
Currently, you can't perform an in-place upgrade of the Azure search SKU. However, you can create a new Azure search resource with the desired SKU, restore the data to the new resource, and then link it to the QnA Maker stack. To do this, follow these steps:
Create a new Azure search resource in the Azure portal, and select the desired SKU.
Restore the indexes from your original Azure search resource to the new one. See the backup restore sample code.
After the data is restored, go to your new Azure search resource, select Keys, and write down the Name and the Admin key:
To link the new Azure search resource to the QnA Maker stack, go to the QnA Maker App Service instance.
Select Application settings and modify the settings in the AzureSearchName and AzureSearchAdminKey fields from step 3.
Restart the App Service instance.
Get the latest runtime updates
The QnAMaker runtime is part of the Azure App Service instance that's deployed when you create a QnAMaker service in the Azure portal. Updates are made periodically to the runtime. The QnA Maker App Service instance is in auto-update mode after the April 2019 site extension release (version 5+). This update is designed to take care of ZERO downtime during upgrades.
You can check your current version at https://www.qnamaker.ai/UserSettings. If your version is older than version 5.x, you must restart App Service to apply the latest updates:
Go to your QnAMaker service (resource group) in the Azure portal.
Select the App Service instance and open the Overview section.
Restart App Service. The update process should finish in a couple of seconds. Any dependent applications or bots that use this QnAMaker service will be unavailable to end users during this restart period.
Management service region
The management service of QnA Maker is used only for the QnA Maker portal and for initial data processing. This service is available only in the West US region. No customer data is stored in this West US service.