Skip to content

Commit 5b106d7

Browse files
authored
Merge pull request #100699 from diberry/diberry/0109-qna-concepts
[Cogsvcs] QnA Maker - reorg - concepts
2 parents 4446f45 + 66aa7b0 commit 5b106d7

File tree

48 files changed

+702
-343
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+702
-343
lines changed

.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,11 @@
841841
"redirect_url": "/azure/cognitive-services/LUIS/luis-how-to-azure-subscription",
842842
"redirect_document_id": false
843843
},
844+
{
845+
"source_path": "articles/cognitive-services/QnAMaker/Concepts/data-sources-supported.md",
846+
"redirect_url": "/azure/cognitive-services/QnAMaker/concepts/knowledge-base",
847+
"redirect_document_id": false
848+
},
844849
{
845850
"source_path": "articles/cognitive-services/QnAMaker/How-To/create-knowledge-base.md",
846851
"redirect_url": "/azure/cognitive-services/QnAMaker/Quickstarts/create-publish-knowledge-base",
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
---
2+
title: Azure resources - QnA Maker
3+
description: QnA Maker uses several Azure sources, each with a different purpose. Understanding how they are used individually allows you to plan for and select the correct pricing tier or know when to change your pricing tier. Understanding how they are used in combination allows you to find and fix problems when they occur.
4+
ms.topic: conceptual
5+
ms.date: 01/27/2020
6+
---
7+
8+
# Azure resources for QnA Maker
9+
10+
QnA Maker uses several Azure sources, each with a different purpose. Understanding how they are used individually allows you to plan for and select the correct pricing tier or know when to change your pricing tier. Understanding how they are used _in combination_ allows you to find and fix problems when they occur.
11+
12+
## Resource planning
13+
14+
When you first develop a QnA Maker knowledge base, in the prototype phase, it is common to have a single QnA Maker resource for both testing and production.
15+
16+
When you move into the development phase of the project, you should consider:
17+
18+
* how many languages your knowledge base system will hold
19+
* how many regions you need your knowledge base to be available in/from
20+
* how many documents in each domain your system will hold
21+
22+
Plan to have a single QnA Maker resource hold all knowledge bases that have the same language, the same region and the same subject domain combination.
23+
24+
## Pricing tier considerations
25+
26+
Typically there are three parameters you need to consider:
27+
28+
* **The throughput you need from the service**: Select the appropriate [App Plan](https://azure.microsoft.com/pricing/details/app-service/plans/) for your App service based on your needs. You can [scale up](https://docs.microsoft.com/azure/app-service/manage-scale-up) or down the App. This should also influence your Azure Cognitive Search SKU selection, see more details [here](https://docs.microsoft.com/azure/search/search-sku-tier).
29+
30+
* **Size and the number of knowledge bases**: Choose the appropriate [Azure search SKU](https://azure.microsoft.com/pricing/details/search/) for your scenario. Typically, you decide number of knowledge bases you need based on number of different subject domains. Once subject domain (for a single language) should be in one knowledge base.
31+
32+
You can publish N-1 knowledge bases in a particular tier, where N is the maximum indexes allowed in the tier. Also check the maximum size and the number of documents allowed per tier.
33+
34+
For example, if your tier has 15 allowed indexes, you can publish 14 knowledge bases (1 index per published knowledge base). The fifteenth index is used for all the knowledge bases for authoring and testing.
35+
36+
* **Number of documents as sources**: The free SKU of the QnA Maker management service limits the number of documents you can manage via the portal and the APIs to 3 (of 1 MB size each). The standard SKU has no limits to the number of documents you can manage. See more details [here](https://aka.ms/qnamaker-pricing).
37+
38+
The following table gives you some high-level guidelines.
39+
40+
| | QnA Maker Management | App Service | Azure Cognitive Search | Limitations |
41+
| ---------------------- | -------------------- | ----------- | ------------ | -------------------------------- |
42+
| Experimentation | Free SKU | Free Tier | Free Tier | Publish Up to 2 KBs, 50 MB size |
43+
| Dev/Test Environment | Standard SKU | Shared | Basic | Publish Up to 14 KBs, 2 GB size |
44+
| Production Environment | Standard SKU | Basic | Standard | Publish Up to 49 KBs, 25 GB size |
45+
46+
## When to change a pricing tier
47+
48+
|Upgrade|Reason|
49+
|--|--|
50+
|[Upgrade](../How-to/set-up-qnamaker-service-azure.md#upgrade-qna-maker-sku) QnA Maker management SKU|You want to have more QnA sets or document sources in your knowledge base.|
51+
|[Upgrade](../How-to/set-up-qnamaker-service-azure.md#upgrade-app-service) App Service SKU|Your knowledge base needs to serve more requests from your client app, such as a chat bot.|
52+
|[Upgrade](../How-to/set-up-qnamaker-service-azure.md#upgrade-the-azure-cognitive-search-service) Azure Cognitive Search service|You plan to have many knowledge bases.|
53+
54+
Get the latest runtime updates by [updating your App Service in the Azure portal](../how-to/set-up-qnamaker-service-azure.md#get-the-latest-runtime-updates).
55+
56+
## Resource naming considerations
57+
58+
The resource name for the QnA Maker resource, such as `qna-westus-f0-b`, is also used to name the other resources.
59+
60+
The Azure portal create window allows you to create a QnA Maker resource and select the pricing tiers for the other resources.
61+
62+
> [!div class="mx-imgBorder"]
63+
> ![Screenshot of Azure portal for QnA Maker resource creation](../media/concept-azure-resource/create-blade.png)
64+
65+
After the resources are created, they have the same name, except for the optional Application Insights resource, which postpends characters to the name.
66+
67+
> [!div class="mx-imgBorder"]
68+
> ![Screenshot of Azure portal resource listing](../media/concept-azure-resource/all-azure-resources-created-qnamaker.png)
69+
70+
> [!TIP]
71+
> Create a new resource group when you create a QnA Maker resource. That allows you to see all resources associated with the QnA Maker resource when searching by resource group.
72+
73+
> [!TIP]
74+
> Use a naming convention to indicate pricing tiers within the name of the resource or the resource group. When you receive errors from creating a new knowledge base, or adding new documents, the Cognitive Search pricing tier limit is a common issue.
75+
76+
## Resource purposes
77+
78+
Each Azure resource created with QnA Maker has a specific purpose:
79+
80+
* QnA Maker resource
81+
* Cognitive Search resource
82+
* App Service
83+
* App Plan Service
84+
* Application Insights Service
85+
86+
87+
### Cognitive Search resource
88+
89+
The [Cognitive Search](../../../search/index.yml) resource is used to:
90+
91+
* Store the QnA sets
92+
* Provide the initial ranking (ranker #1) of the QnA sets at runtime
93+
94+
#### Index usage
95+
96+
The resource keeps one index to act as the test index and the remaining indexes correlate to one published knowledge base each.
97+
98+
A resource priced to hold 15 indexes, will hold 14 published knowledge bases, and one index is used for testing all the knowledge bases. This test index is partitioned by knowledge base so that a query using the interactive test pane will use the test index but only return results from the specific partition associated with the specific knowledge base.
99+
100+
#### Language usage
101+
102+
The first knowledge base created in the QnA Maker resource is used to determine the _single_ language set for the Cognitive Search resource and all its indexes. You can only have _one language set_ for a QnA Maker service.
103+
104+
### QnA Maker resource
105+
106+
The QnA Maker resource provides access to the authoring and publishing APIs as well as the natural language processing (NLP) based second ranking layer (ranker #2) of the QnA sets at runtime.
107+
108+
The second ranking applies intelligent filters that can include metadata and follow-up prompts.
109+
110+
### App service and App service plan
111+
112+
The [App service](../../../app-service/index.yml) is used by your client application to access the published knowledge bases via the runtime endpoint.
113+
114+
To query the published knowledge base, all published knowledge bases use the same URL endpoint, but specify the **knowledge base ID** within the route.
115+
116+
`{RuntimeEndpoint}/qnamaker/knowledgebases/{kbId}/generateAnswer`
117+
118+
### Application Insights
119+
120+
[Application Insights](../../../azure-monitor/app/app-insights-overview.md) is used to collect chat logs and telemetry. Review the common [Kusto queries](../how-to/get-analytics-knowledge-base.md) for information about your service.
121+
122+
## Share services with QnA Maker
123+
124+
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:
125+
126+
|Service|Share|Reason|
127+
|--|--|--|
128+
|Cognitive Services|X|Not possible by design|
129+
|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.|
130+
|App Service|X|Not possible by design|
131+
|Application Insights||Can be shared|
132+
|Search service||1. `testkb` is a reserved name for the QnAMaker service; it can’t be used by others.<br>2. Synonym map by the name `synonym-map` is reserved for the QnAMaker service.<br>3. The number of published knowledge bases is limited by Search service tier. If there are free indexes available, other services can use them.|
133+
134+
### Using a single Cognitive Search service
135+
136+
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.
137+
138+
Learn [how to configure](../How-To/set-up-qnamaker-service-azure.md#configure-qna-maker-to-use-different-cognitive-search-resource) QnA Maker to use a different Cognitive Service resource than the one created as part of the QnA Maker resource creation process.
139+
140+
## Management service region
141+
142+
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.
143+
144+
## Keys in QnA Maker
145+
146+
Your QnA Maker service deals with two kinds of keys: **authoring keys** and **query endpoint keys** used with the runtime hosted in the App service.
147+
148+
If you are looking for your **subscription key**, [the terminology has changed](#subscription-keys).
149+
150+
Use these keys when making requests to the service through APIs.
151+
152+
![Key management](../media/qnamaker-how-to-key-management/key-management.png)
153+
154+
|Name|Location|Purpose|
155+
|--|--|--|
156+
|Authoring key|[Azure portal](https://azure.microsoft.com/free/?WT.mc_id=A261C142F)|These keys are used to access the [QnA Maker management service APIs](https://go.microsoft.com/fwlink/?linkid=2092179). 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.<br><br>Find these keys on the **Cognitive Services** resource on the **Keys** page.|
157+
|Query endpoint key|[QnA Maker portal](https://www.qnamaker.ai)|These keys are used to query the published knowledge base endpoint to get a response for a user question. You typically use this query 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.<br><br>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.|
158+
159+
### Subscription keys
160+
161+
The terms authoring and query endpoint key are corrective terms. The previous term was **subscription key**. If you see other documentation referring to subscription keys, these are equivalent to authoring and query endpoint keys (used in the runtime).
162+
163+
You must know what the key is accessing, knowledge base management or knowledge base querying, to know which key you need to find.
164+
165+
## Next steps
166+
167+
* Learn about the QnA Maker [knowledge base](knowledge-base.md)
168+
* Understand a [knowledge base life cycle](development-lifecycle-knowledge-base.md)
169+
* Review service and knowledge base [limits](../limits.md)
170+

0 commit comments

Comments
 (0)