Skip to content

Commit bd19542

Browse files
Learn Build Service GitHub AppLearn Build Service GitHub App
authored andcommitted
Merging changes synced from https://github.com/MicrosoftDocs/azure-docs-pr (branch live)
2 parents e26b4e5 + b56ed76 commit bd19542

File tree

223 files changed

+4369
-1129
lines changed

Some content is hidden

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

223 files changed

+4369
-1129
lines changed

.openpublishing.redirection.azure-monitor.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6728,8 +6728,14 @@
67286728
"source_path_from_root": "/articles/azure-monitor/essentials/prometheus-get-started.md",
67296729
"redirect_url": "/azure/azure-monitor/essentials/prometheus-metrics-overview",
67306730
"redirect_document_id": false
6731+
},
6732+
{
6733+
"source_path_from_root": "/articles/azure-monitor/essentials/pipeline-overview.md",
6734+
"redirect_url": "/azure/azure-monitor/essentials/data-collection-rule-overview",
6735+
"redirect_document_id": false
67316736
}
67326737

6738+
67336739

67346740
]
67356741
}
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
---
2+
title: Best practices for using Azure OpenAI On Your Data
3+
titleSuffix: Azure OpenAI
4+
description: Learn about the best practices when using Azure OpenAI On Your data.
5+
ms.service: azure-ai-openai
6+
ms.topic: conceptual
7+
ms.date: 04/08/2024
8+
ms.custom: references_regions, build-2023, build-2023-dataai, refefences_regions
9+
manager: nitinme
10+
author: aahill
11+
ms.author: aahi
12+
recommendations: false
13+
---
14+
15+
# Troubleshooting and best practices for Azure OpenAI On Your Data
16+
17+
Use this article to help you guide through the common issues you might run into while developing a solution using Azure OpenAI On Your Data, a service that allows you to use the power of OpenAI models with your own data. By following the best practices and tips in this article, you can optimize your output with Azure OpenAI On Your Data and achieve the best AI quality possible.
18+
19+
This document covers:
20+
21+
* High level workflow of the Azure OpenAI On Your Data
22+
* How to structure your debugging investigation
23+
* Common issues and their respective solutions
24+
25+
## Azure OpenAI On Your Data: workflow
26+
27+
Azure OpenAI On Your Data's workflow can be divided into two major parts:
28+
29+
* Data ingestion
30+
* Inferencing
31+
32+
## Data ingestion
33+
34+
This is the stage where you connect your data with the Azure OpenAI On Your Data service. In this stage, user documents are processed and broken down into smaller chunks (1,024 tokens by default, however there are more chunking options available) and then indexed. This is the stage where you can choose an embedding model (embeddings are representations of values or objects like text, images, and audio that are designed to be consumed by machine learning models and semantic search algorithms) to use for embeddings creation or preferred search type. The output of this process is an index that will later be used to retrieve documents from during inference.
35+
36+
## Inferencing
37+
38+
This is the stage where users chat with their data using a studio, deployed webapp, or direct API calls. In this stage users are able to set various model parameters (such as `temperature`, or `top_P` ) and system parameters such as `strictness`, and `topNDocuments`.
39+
40+
## Inner workings
41+
42+
Ingestion should be thought of as a separate process before inference. After the index has been created, Azure OpenAI On Your Data has many steps it goes through to generate a good response to user questions.
43+
44+
1. **Intent generation**: Multiple search intents are generated using user question and conversation history. We generate multiple search intents to address any ambiguity in the user's question, add more context using the conversation history to retrieve holistic information in the retrieval stage, and to provide any additional information to make the final response thorough and useful.
45+
2. **Retrieval**: Using the search type provided during the ingestion, a list of relevant document chunks are retrieved corresponding to each of the search intents.
46+
3. **Filtration**: The strictness setting is used to filter out the retrieved documents that are considered irrelevant per the strictness threshold. `strictness` controls how aggressive the filtration is.
47+
4. **Re-ranking**: The remaining document chunks retrieved for each of the search intents are reranked. Reranking is done to come up with a combined list of most relevant documents retrieved for all search intents.
48+
5. **TopNDocuments**: The `topNDocuments` from this reranked list is included in the prompt sent to the model, along with the question, the conversation history, and the role information/system message.
49+
1. **Response Generation**: The model uses the provided context to generate the final response along with citations.
50+
51+
## How to structure debugging investigation
52+
53+
When you see an unfavorable response to a query, it could be the result of different outputs from various components not working as expected. It's advisable to debug the outputs of each component using the following steps.
54+
55+
### Step 1: Check for Retrieval issues
56+
57+
Check if the correct document chunks are present in the retrieved documents. This is straight forward to check using the REST API. In the API response, check the citations in the `tool` message.
58+
59+
### Step 2: Check for Generation issues
60+
61+
If you're seeing the correct document chunks in the retrieved documents, then you're likely encountering a **generation issue**. Consider using a more powerful model. If you aren't, go to [step 3](#step-3-check-the-rest-of-the-funnel).
62+
63+
1. **Upgrade the model**: For example, if you're using gpt-35-turbo, consider using gpt-4.
64+
1. **Switch the model version**: If you're using gpt-35-turbo-1106, consider using gpt-35-turbo-16k (0613).
65+
1. You can also tune the finer aspects of the response by changing the role information / system message.
66+
67+
### Step 3: Check the rest of the funnel
68+
69+
If you aren't seeing the correct document chunks in step 1, then you need to dig further down the funnel.
70+
71+
1. It's possible that the correct document chunk was retrieved but was filtered out based on `strictness`. In this case, try reducing the `strictness` parameter.
72+
73+
1. It's possible that the correct document chunk wasn't part of the `topNDocuments`. In this case, increase the `topNDocuments` parameter.
74+
75+
1. It's possible that your index fields are not correctly mapped, meaning retrieval might not work well. This is particularly relevant if you're using a pre-existing data source (you did not create the index using the Studio or offline scripts available on [GitHub](https://github.com/microsoft/sample-app-aoai-chatGPT/tree/main/scripts). For more information on mapping index fields, see the [how-to article](../concepts/use-your-data.md?tabs=ai-search#index-field-mapping).
76+
77+
1. It's possible that the intent generation step isn't working well. In the API response, check the `intents` fields in the `tool` message.
78+
79+
- Some models are known to not work well for intent generation. For example, if you're using the GPT-35-turbo-1106 model version, consider using a later model, such as gpt-35-turbo (0125) or GPT-4-1106-preview.
80+
81+
1. Do you have semi-structured data in your documents, such as numerous tables? There might be an **ingestion issue**. Your data might need special handling during ingestion.
82+
- If the file format is PDF, we offer optimized ingestion for tables using the offline scripts available on [GitHub](https://github.com/microsoft/sample-app-aoai-chatGPT/tree/main/scripts). to use the scripts, you need to have a [Document Intelligence](../../document-intelligence/overview.md) resource and use the `Layout` [model](../../document-intelligence/concept-layout.md). You can also:
83+
- Adjust your chunk size to make sure your largest table fits within the specified [chunk size](../concepts/use-your-data.md#chunk-size-preview).
84+
85+
1. Are you converting a semi-structured data type such as json/xml to a PDF document? This might cause an **ingestion issue** because structured information needs a chunking strategy that is different from purely text content.
86+
87+
1. If none of the above apply, you might be encountering a **retrieval issue**. Consider using a more powerful `query_type`. Based on our benchmarking, `semantic` and `vectorSemanticHybrid` are preferred.
88+
89+
## Frequently encountered issues
90+
91+
**Issue 1**: _The model responds with "The requested information isn't present in the retrieved documents. Please try a different query or topic" even though that's not the case._
92+
93+
See [Step 3](#step-3-check-the-rest-of-the-funnel) in the above debugging process.
94+
95+
**Issue 2**: _The response is from my data, but it isn't relevant/correct in the context of the question._
96+
97+
See the debugging process starting at [Step 1](#step-1-check-for-retrieval-issues).
98+
99+
**Issue 3**: _The role information / system message isn't being followed by the model._
100+
101+
- Instructions in the role information might contradict with our [Responsible AI guidelines](/legal/cognitive-services/openai/overview?context=%2Fazure%2Fai-services%2Fopenai%2Fcontext%2Fcontext), in which case it won't likely be followed.
102+
103+
- For each model, there is an implicit token limit for the role information, beyond which it is truncated. Ensure your role information follows the established [limits](../concepts/use-your-data.md#token-usage-estimation-for-azure-openai-on-your-data).
104+
105+
- A prompt engineering technique you can use is to repeat an important instruction at the end of the prompt. Surrounding the important instruction with `**` on both side of it can also help.
106+
- Upgrade to a newer GPT-4 model as it's likely to follow your instructions better than GPT-35.
107+
108+
**Issue 4**: _There are inconsistencies in responses._
109+
110+
- Ensure you're using a low `temperature`. We recommend setting it to `0`.
111+
112+
- Although the question is the same, the conversation history gets added to the context and affects how the model responds to same question over a long session.
113+
114+
- Using the REST API, check if the search intents generated are the same both times or not. If they are very different, try a more powerful model such as GPT-4 to see if the problem is affected by the chosen model.
115+
116+
- If the intents are same or similar, try reducing `strictness` or increasing `topNDocuments`.
117+
118+
**Issue 5**: _Intents are empty or wrong._
119+
120+
- Refer to [Step 3](#step-3-check-the-rest-of-the-funnel) in the above debugging process.
121+
122+
- If intents are irrelevant, the issue might be that the intent generation step lacks context. It only considers the user question and conversation history. It does not look at the role information or the document chunks. You might want to consider adding a prefix to each user question with a short context string to help the intent generation step.
123+
124+
**Issue 6**: _I have set inScope=true or checked "Restrict responses to my data" but it still responds to Out-Of-Domain questions._
125+
126+
- Consider increasing `strictness`.
127+
- Add the following instruction in your role information / system message:
128+
- _"You are also allowed to respond to questions based on the retrieved documents."_
129+
- The `inscope` parameter isn't a hard switch, but setting it to `true` encourages the model to stay restricted.
130+
131+
**Issue 7**: _The response is correct but occasionally missing document references/citations._
132+
- Consider upgrading to a GPT-4 model if you're already not using it. GPT-4 is generally more consistent with citation generation.
133+
- You can try to emphasize citation generation in the response by adding `**You must generate citation based on the retrieved documents in the response**` in the role information.
134+
- Or you can add a prefix in the user query `**You must generate citation to the retrieved documents in the response to the user question \n User Question: {actual user question}**`

articles/ai-services/openai/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ items:
156156
href: ./how-to/use-web-app.md
157157
- name: Use the Azure Developer CLI
158158
href: ./how-to/azure-developer-cli.md
159+
- name: Troubleshooting and best practices
160+
href: ./how-to/on-your-data-best-practices.md
159161
- name: Migrate to OpenAI Python v1.x
160162
href: ./how-to/migration.md
161163
- name: Models

articles/aks/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@
158158
href: servicemesh-about.md
159159
- name: Sustainable software engineering
160160
href: concepts-sustainable-software-engineering.md
161+
- name: Preview API life cycle
162+
href: concepts-preview-api-life-cycle.md
161163
- name: Dapr
162164
href: dapr-overview.md
163165
- name: GitOps
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: AKS Preview API life cycle
3+
description: Learn about the AKS preview API life cycle.
4+
ms.custom: azure-kubernetes-service
5+
ms.topic: article
6+
ms.date: 05/29/2024
7+
author: matthchr
8+
ms.author: matthchr
9+
10+
---
11+
12+
# AKS Preview API life cycle
13+
14+
The Azure Kubernetes Service (AKS) preview APIs (APIs that end in `-preview`) have a lifespan of ~one year from their release date.
15+
This means that you can expect the 2023-01-02-preview API to be deprecated somewhere around January 1st, 2024.
16+
17+
We love when people try our preview features and give us feedback, so we encourage you to use the preview APIs and the
18+
tools built on them (such as the [AKS Preview CLI Extension](https://github.com/Azure/azure-cli-extensions/tree/main/src/aks-preview)).
19+
20+
After an API version is deprecated, it will no longer function! We recommend you routinely:
21+
- Update your ARM/BICEP templates using preview API versions to use the latest version of the preview API.
22+
- Update your AKS preview CLI extension to the latest version.
23+
- Update any preview SDKs or other tools built on the preview API to the latest version.
24+
25+
You should perform these updates at a minimum every 6-9 months. If you fail to do so, you will be notified that you are using a soon-to-be deprecated
26+
API version as deprecation approaches.
27+
28+
## Completed deprecations
29+
30+
| API version | Announce Date | Deprecation Date |
31+
|--------------------|-------------------|-------------------|
32+
| 2018-08-01-preview | March 7, 2023 | June 1, 2023 |
33+
| 2021-11-01-preview | March 23, 2023 | July 1, 2023 |
34+
| 2022-02-02-preview | April 27, 2023 | August 1, 2023 |
35+
| 2022-01-02-preview | May 3, 2023 | Sept 1, 2023 |
36+
| 2022-03-02-preview | May 3, 2023 | Sept 1, 2023 |
37+
| 2022-04-02-preview | May 3, 2023 | Sept 1, 2023 |
38+
| 2022-05-02-preview | May 3, 2023 | Sept 1, 2023 |
39+
| 2022-06-02-preview | May 3, 2023 | Sept 1, 2023 |
40+
41+
## Upcoming deprecations
42+
43+
| API version | Announce Date | Deprecation Date |
44+
|--------------------|-------------------|-------------------|
45+
| 2022-07-02-preview | November 20, 2023 | February 14, 2024 |
46+
| 2022-08-02-preview | March 27, 2024 | June 20, 2024 |
47+
| 2022-08-03-preview | March 27, 2024 | June 20, 2024 |
48+
| 2022-09-02-preview | March 27, 2024 | June 20, 2024 |
49+
| 2022-10-02-preview | March 27, 2024 | June 20, 2024 |
50+
| 2022-11-02-preview | March 27, 2024 | June 20, 2024 |
51+
| 2023-01-02-preview | March 27, 2024 | June 20, 2024 |
52+
| 2023-02-02-preview | March 27, 2024 | June 20, 2024 |
53+

articles/application-gateway/application-gateway-backend-health.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services: application-gateway
66
author: jaesoni
77
ms.service: application-gateway
88
ms.topic: article
9-
ms.date: 09/19/2023
9+
ms.date: 05/30/2024
1010
ms.author: jaysoni
1111
---
1212

articles/application-gateway/quick-create-bicep.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: In this quickstart, you learn how to use Bicep to create an Azure A
55
services: application-gateway
66
author: greg-lindsay
77
ms.author: greglin
8-
ms.date: 04/18/2024
8+
ms.date: 05/30/2024
99
ms.topic: quickstart
1010
ms.service: application-gateway
1111
ms.custom: mvc, subject-armqs, mode-arm, devx-track-bicep
@@ -19,6 +19,9 @@ In this quickstart, you use Bicep to create an Azure Application Gateway. Then y
1919

2020
![Conceptual diagram of the quickstart setup.](./media/quick-create-portal/application-gateway-qs-resources.png)
2121

22+
> [!NOTE]
23+
> Application Gateway frontend now supports dual-stack IP addresses (Preview). You can now create up to four frontend IP addresses: Two IPv4 addresses (public and private) and two IPv6 addresses (public and private).
24+
2225
## Prerequisites
2326

2427
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).

articles/application-gateway/quick-create-cli.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services: application-gateway
66
author: greg-lindsay
77
ms.service: application-gateway
88
ms.topic: quickstart
9-
ms.date: 01/23/2024
9+
ms.date: 05/30/2024
1010
ms.author: greglin
1111
ms.custom: mvc, devx-track-azurecli, mode-api
1212
---
@@ -28,6 +28,9 @@ You can also complete this quickstart using [Azure PowerShell](quick-create-powe
2828

2929
- This article requires version 2.0.4 or later of the Azure CLI. If using Azure Cloud Shell, the latest version is already installed.
3030

31+
> [!NOTE]
32+
> Application Gateway frontend now supports dual-stack IP addresses (Preview). You can now create up to four frontend IP addresses: Two IPv4 addresses (public and private) and two IPv6 addresses (public and private).
33+
3134
## Create resource group
3235

3336
In Azure, you allocate related resources to a resource group. Create a resource group by using `az group create`.

articles/application-gateway/quick-create-portal.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: In this quickstart, you learn how to use the Azure portal to create
55
services: application-gateway
66
author: greg-lindsay
77
ms.author: greglin
8-
ms.date: 04/18/2024
8+
ms.date: 05/30/2024
99
ms.topic: quickstart
1010
ms.service: application-gateway
1111
ms.custom: mvc, mode-ui
@@ -21,6 +21,9 @@ For more information about the components of an application gateway, see [Applic
2121

2222
You can also complete this quickstart using [Azure PowerShell](quick-create-powershell.md) or [Azure CLI](quick-create-cli.md).
2323

24+
> [!NOTE]
25+
> Application Gateway frontend now supports dual-stack IP addresses (Preview). You can now create up to four frontend IP addresses: Two IPv4 addresses (public and private) and two IPv6 addresses (public and private).
26+
2427
## Prerequisites
2528

2629
An Azure account with an active subscription is required. If you don't already have an account, you can [create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).

articles/application-gateway/quick-create-powershell.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: In this quickstart, you learn how to use Azure PowerShell to create
55
services: application-gateway
66
author: greg-lindsay
77
ms.author: greglin
8-
ms.date: 01/23/2024
8+
ms.date: 05/30/2024
99
ms.topic: quickstart
1010
ms.service: application-gateway
1111
ms.custom: devx-track-azurepowershell, mvc, mode-api
@@ -22,6 +22,9 @@ The application gateway directs application web traffic to specific resources in
2222

2323
You can also complete this quickstart using [Azure CLI](quick-create-cli.md) or the [Azure portal](quick-create-portal.md).
2424

25+
> [!NOTE]
26+
> Application Gateway frontend now supports dual-stack IP addresses (Preview). You can now create up to four frontend IP addresses: Two IPv4 addresses (public and private) and two IPv6 addresses (public and private).
27+
2528
## Prerequisites
2629

2730
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).

0 commit comments

Comments
 (0)