Skip to content

Commit bcec54c

Browse files
committed
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-docs-pr into rolyon-rbac-roles-mar2024
2 parents 4e31e89 + 856cfbf commit bcec54c

File tree

7 files changed

+393
-38
lines changed

7 files changed

+393
-38
lines changed

articles/ai-services/openai/concepts/use-your-data.md

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,50 @@ When you chat with a model, providing a history of the chat will help the model
420420

421421
## Token usage estimation for Azure OpenAI On Your Data
422422

423+
Azure OpenAI On Your Data Retrieval Augmented Generation (RAG) service that leverages both a search service (such as Azure AI Search) and generation (Azure OpenAI models) to let users get answers for their questions based on provided data.
423424

425+
As part of this RAG pipeline, there are are three steps at a high-level:
426+
427+
1. Reformulate the user query into a list of search intents. This is done by making a call to the model with a prompt that includes instructions, the user question, and conversation history. Let's call this an *intent prompt*.
428+
429+
1. For each intent, multiple document chunks are retrieved from the search service. After filtering out irrelevant chunks based on the user-specified threshold of strictness and reranking/aggregating the chunks based on internal logic, the user-specified number of document chunks are chosen.
430+
431+
1. These document chunks, along with the user question, conversation history, role information, and instructions are sent to the model to generate the final model response. Let's call this the *generation prompt*.
432+
433+
In total, there are two calls made to the model:
434+
435+
* For processing the intent: The token estimate for the *intent prompt* includes those for the user question, conversation history and the instructions sent to the model for intent generation.
436+
437+
* For generating the response: The token estimate for the *generation prompt* includes those for the user question, conversation history, the retrieved list of document chunks, role information and the instructions sent to it for generation.
438+
439+
The model generated output tokens (both intents and response) need to be taken into account for total token estimation. Summing up all the four columns below gives the average total tokens used for generating a response.
440+
441+
| Model | Generation prompt token count | Intent prompt token count | Response token count | Intent token count |
442+
|--|--|--|--|--|
443+
| gpt-35-turbo-16k | 4297 | 1366 | 111 | 25 |
444+
| gpt-4-0613 | 3997 | 1385 | 118 | 18 |
445+
| gpt-4-1106-preview | 4538 | 811 | 119 | 27 |
446+
| gpt-35-turbo-1106 | 4854 | 1372 | 110 | 26 |
447+
448+
The above numbers are based on testing on a data set with:
449+
450+
* 191 conversations
451+
* 250 questions
452+
* 10 average tokens per question
453+
* 4 conversational turns per conversation on average
454+
455+
And the following [parameters](#runtime-parameters).
456+
457+
|Setting |Value |
458+
|---------|---------|
459+
|Number of retrieved documents | 5 |
460+
|Strictness | 3 |
461+
|Chunk size | 1024 |
462+
|Limit responses to ingested data? | True |
463+
464+
These estimates will vary based on the values set for the above parameters. For example, if the number of retrieved documents is set to 10 and strictness is set to 1, the token count will go up. If returned responses aren't limited to the ingested data, there are fewer instructions given to the model and the number of tokens will go down.
465+
466+
The estimates also depend on the nature of the documents and questions being asked. For example, if the questions are open-ended, the responses are likely to be longer. Similarly, a longer system message would contribute to a longer prompt that consumes more tokens, and if the conversation history is long, the prompt will be longer.
424467

425468
| Model | Max tokens for system message | Max tokens for model response |
426469
|--|--|--|
@@ -429,16 +472,18 @@ When you chat with a model, providing a history of the chat will help the model
429472
| GPT-4-0613-8K | 400 | 1500 |
430473
| GPT-4-0613-32K | 2000 | 6400 |
431474

432-
The table above shows the total number of tokens available for each model type. It also determines the maximum number of tokens that can be used for the [system message](#system-message) and the model response. Additionally, the following also consume tokens:
475+
The table above shows the maximum number of tokens that can be used for the [system message](#system-message) and the model response. Additionally, the following also consume tokens:
433476

434477

435478

436-
* The meta prompt (MP): if you limit responses from the model to the grounding data content (`inScope=True` in the API), the maximum number of tokens is 4,036 tokens. Otherwise (for example if `inScope=False`) the maximum is 3,444 tokens. This number is variable depending on the token length of the user question and conversation history. This estimate includes the base prompt and the query rewriting prompts for retrieval.
479+
* The meta prompt: if you limit responses from the model to the grounding data content (`inScope=True` in the API), the maximum number of tokens higher. Otherwise (for example if `inScope=False`) the maximum is lower. This number is variable depending on the token length of the user question and conversation history. This estimate includes the base prompt and the query rewriting prompts for retrieval.
437480
* User question and history: Variable but capped at 2,000 tokens.
438481
* Retrieved documents (chunks): The number of tokens used by the retrieved document chunks depends on multiple factors. The upper bound for this is the number of retrieved document chunks multiplied by the chunk size. It will, however, be truncated based on the tokens available tokens for the specific model being used after counting the rest of fields.
439482

440483
20% of the available tokens are reserved for the model response. The remaining 80% of available tokens include the meta prompt, the user question and conversation history, and the system message. The remaining token budget is used by the retrieved document chunks.
441484

485+
In order to compute the number of tokens consumed by your input (such as your question, the system message/role information), use the following code sample.
486+
442487
```python
443488
import tiktoken
444489

@@ -452,6 +497,7 @@ class TokenEstimator(object):
452497
token_output = TokenEstimator.estimate_tokens(input_text)
453498
```
454499

500+
455501
## Troubleshooting
456502

457503
### Failed ingestion jobs

articles/mysql/TOC.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,10 @@
769769
displayName: SUPER privilege, DBA role, Access is denied
770770
- name: Troubleshooting
771771
items:
772+
- name: Resolve capacity errors
773+
href: ./flexible-server/resolve-capacity-errors-mysql-flex.md
774+
- name: Request quota increase
775+
href: ./flexible-server/how-to-request-quota-increase.md
772776
- name: Troubleshoot migration errors
773777
href: single-server/how-to-troubleshoot-common-errors.md
774778
displayName: SUPER privilege, DBA role, Access is denied
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
title: Request quota increases for Azure Database for MySQL
3+
description: Request quota increases for Azure Database for MySQL - Flexible Server resources.
4+
author: karla-escobar # GitHub alias
5+
ms.author: karlaescobar # Microsoft alias
6+
ms.reviewer: maghan
7+
ms.date: 02/29/2024
8+
ms.service: mysql
9+
ms.subservice: flexible-server
10+
ms.topic: troubleshooting
11+
---
12+
13+
# Request quota increases for Azure Database for MySQL - Flexible Server
14+
15+
The resources in Azure Database for MySQL - Flexible Server have default quotas/limits. However, there might be a case where your workload needs more quota than the default value. In such case, you must reach out to the Azure Database for MySQL - Flexible Server team to request a quota increase. This article explains how to request a quota increase for Azure Database for MySQL - Flexible Server resources.
16+
17+
## Create a new support request
18+
19+
To request a quota increase, you must create a new support request with your workload details. The Azure Database for MySQL flexible server team then processes your request and approves or denies it. Use the following steps to create a new support request from the Azure portal:
20+
21+
1. Sign into the Azure portal.
22+
23+
1. From the left-hand menu, select **Help + support** and then select **Create a support request**.
24+
25+
1. In the **Problem Description** tab, fill the following details:
26+
27+
- For **Summary**, Provide a short description of your request such as your workload, why the default values aren't sufficient along with any error messages you're observing.
28+
- For **Issue type**, select **Service and subscription limits (quotas)**
29+
- For **Subscription**, select the subscription for which you want to increase the quota.
30+
- For **Quota type**, select **Azure Database for MySQL Flexible Server**
31+
32+
:::image type="content" source="media/how-to-request-quota-increase/request-quota-increase-mysql-flex.png" alt-text="Screenshot of new support request.":::
33+
34+
1. In the **Additional Details** tab, enter the details corresponding to your quota request. The Information provided on this tab is used to further assess your issue and help the support engineer troubleshoot the problem.
35+
1. Fill the following details in this form:
36+
37+
- In **Request details** select **Enter details** and select the relevant **Quota Type**
38+
39+
provide the requested information for your specific quota request like Location, Series, New Quota.
40+
41+
- **File upload**: Upload the diagnostic files or any other files that you think are relevant to the support request. To learn more on the file upload guidance, see the [Azure support](../../azure-portal/supportability/how-to-manage-azure-support-request.md#upload-files) article.
42+
43+
- **Allow collection of advanced ​diagnostic information?​**: Choose Yes or NO
44+
45+
- **Severity**: Choose one of the available severity levels based on the business impact.
46+
47+
- **Preferred contact method**: You can either choose to be contacted over **Email** or by **Phone**.
48+
49+
1. Fill out the remaining details such as your availability, support language, contact information, email, and phone number on the form.
50+
51+
1. Select **Next: Review+Create**. Validate the information provided and select **Create** to create a support request.
52+
53+
The Azure Database for MySQL - Flexible Server support team processes all quota requests in 24-48 hours.
54+
55+
## Related content
56+
57+
- [Create an Azure Database for MySQL - Flexible Server instance in the portal](/azure/mysql/flexible-server/quickstart-create-server-portal)
58+
- [Service limitations](/azure/mysql/flexible-server/concepts-limitations)
120 KB
Loading
154 KB
Loading
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
---
2+
title: Resolve capacity errors
3+
description: The article describes how you can resolve capacity errors when deploying or scaling Azure Database for MySQL - Flexible Server.
4+
author: karla-escobar
5+
ms.author: karlaescobar
6+
ms.reviewer: maghan
7+
ms.date: 02/29/2024
8+
ms.service: mysql
9+
ms.subservice: flexible-server
10+
ms.topic: troubleshooting
11+
---
12+
13+
# Resolve capacity errors for Azure Database for MySQL - Flexible Server
14+
15+
The article describes how you can resolve capacity errors when deploying or scaling Azure Database for MySQL - Flexible Server.
16+
17+
## Exceeded quota
18+
19+
If you encounter any of the following errors when attempting to deploy your Azure MySQL - Flexible Server resource, [submit a request to increase your quota](how-to-request-quota-increase.md).
20+
21+
- `Operation could not be completed as it results in exceeding approved {0} Cores quota. Additional details - Current Limit: {1}, Current Usage: {2}, Additional Required: {3}, (Minimum) New Limit Required: {4}.Submit a request for Quota increase by specifying parameters listed in the 'Details' section for deployment to succeed.`
22+
23+
## Subscription access
24+
25+
Your subscription might not have access to create a server in the selected region if your subscription isn't registered with the MySQL resource provider (RP).
26+
27+
If you see any of the following errors, [Register your subscription with the MySQL RP](#register-with-mysql-rp) to resolve it.
28+
29+
- `Your subscription does not have access to create a server in the selected region.`
30+
31+
- `Provisioning is restricted in this region. Please choose a different region. For exceptions to this rule please open a support request with issue type of 'Service and subscription limits'`
32+
33+
- `Location 'region name' is not accepting creation of new Azure Database for MySQL - Flexible servers for the subscription 'subscription id' at this time`
34+
35+
## Enable region
36+
37+
Your subscription might not have access to create a server in the selected region. To resolve this issue, [file a support request to access a region](https://ms.portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade).
38+
39+
If you see the following errors, file a support ticket to enable the specific region:
40+
- `Subscription 'Subscription name' is not allowed to provision in 'region name`
41+
- `Subscriptions are restricted from provisioning in this region. Please choose a different region. For exceptions to this rule please open a support request with the Issue type of 'Service and subscription limits.`
42+
43+
## Availability Zone
44+
45+
If you receive the following errors, select a different availability zone.
46+
47+
- `Availability zone '{ID}' is not available for subscription '{Sub ID}' in this region temporarily due to capacity constraints.`
48+
- `Multi-Zone HA is not supported in this region. Please choose a different region. For exceptions to this rule please open a support request with the Issue type of 'Service and subscription limits'.`
49+
50+
## SKU Not Available
51+
52+
If you encounter the following error, select a different SKU type. Availability of SKU might differ across regions, either the specific SKU isn't supported in the region or temporarily unavailable.
53+
54+
`Specified SKU is not supported in this region. Please choose a different SKU.`
55+
56+
## Register with MySQL RP
57+
58+
To deploy Azure Database for MySQL - Flexible Server resources, register your subscription with the MySQL resource provider (RP).
59+
60+
You can register your subscription using the Azure portal, [the Azure CLI](/cli/azure/install-azure-cli), or [Azure PowerShell](/powershell/azure/install-azure-powershell).
61+
62+
#### [Azure portal](#tab/portal)
63+
64+
To register your subscription in the Azure portal, follow these steps:
65+
66+
1. In Azure portal, select **More services.**
67+
68+
1. Go to **Subscriptions** and select your subscription.
69+
70+
1. On the **Subscriptions** page, in the left hand pane under **Settings** select **Resource providers.**
71+
72+
1. Enter **MySQL** in the filter to bring up the MySQL related extensions.
73+
74+
1. Select **Register**, **Re-register**, or **Unregister** for the **Microsoft.DBforMySQL** provider, depending on your desired action.
75+
:::image type="content" source="media/resolve-capacity-errors-mysql-flex/resource-provider-screen.png" alt-text="Screenshot of register mysql resource provider screen." lightbox="media/resolve-capacity-errors-mysql-flex/resource-provider-screen.png":::
76+
77+
#### [Azure CLI](#tab/azure-cli-b)
78+
79+
To register your subscription using [the Azure CLI](/cli/azure/install-azure-cli), run this cmdlet:
80+
81+
```azurecli-interactive
82+
# Register the MySQL resource provider to your subscription
83+
az provider register --namespace Microsoft.DBforMySQL
84+
```
85+
86+
#### [Azure PowerShell](#tab/powershell)
87+
88+
To register your subscription using [Azure PowerShell](/powershell/azure/install-az-ps), run this cmdlet:
89+
90+
```powershell-interactive
91+
# Register the MySQL resource provider to your subscription
92+
Register-AzResourceProvider -ProviderNamespace Microsoft.DBforMySQL
93+
```
94+
95+
---
96+
97+
## Other provisioning issues
98+
99+
If you're still experiencing provisioning issues, open a **Region** access request under the support topic of Azure Database for MySQL - Flexible Server and specify the vCores you want to utilize.
100+
101+
## Azure Program regions
102+
103+
Azure Program offerings (Azure Pass, Imagine, Azure for Students, MPN, BizSpark, BizSpark Plus, Microsoft for Startups / Sponsorship Offers, Microsoft Developer Network(MSDN) / Visual Studio Subscriptions) have access to a limited set of regions.
104+
105+
If your subscription is part of above offerings and you require access to any of the listed regions, submit an access request. Alternatively, you might opt for an alternate region:
106+
107+
`Australia Central, Australia Central 2, Australia SouthEast, Brazil SouthEast, Canada East, China East, China North, China North 2, France South, Germany North, Japan West, Jio India Central, Jio India West, Korea South, Norway West, South Africa West, South India, Switzerland West, UAE Central, UK West, US DoD Central, US DoD East, US Gov Arizona, US Gov Texas, West Central US, West India.`
108+
109+
## Related content
110+
111+
- [Azure subscription and service limits, quotas, and constraints](/azure/azure-resource-manager/management/azure-subscription-service-limits)

0 commit comments

Comments
 (0)