Skip to content

Commit 90ada4d

Browse files
author
RoseHJM
committed
Fixing merge conflict
2 parents 8af827e + 72ffed9 commit 90ada4d

File tree

488 files changed

+8957
-2377
lines changed

Some content is hidden

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

488 files changed

+8957
-2377
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
}

.openpublishing.redirection.azure-resource-manager.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,6 +1920,11 @@
19201920
"redirect_url": "/azure/azure-resource-manager/managed-applications/overview",
19211921
"redirect_document_id": false
19221922
},
1923+
{
1924+
"source_path_from_root": "/articles/azure-resource-manager/managed-applications/deploy-marketplace-app-quickstart.md",
1925+
"redirect_url": "/azure/azure-resource-manager/managed-applications/deploy-service-catalog-quickstart",
1926+
"redirect_document_id": false
1927+
},
19231928
{
19241929
"source_path_from_root": "/articles/resource-manager-policy.md",
19251930
"redirect_url": "/azure/governance/policy/overview",
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/aks/howto-deploy-java-liberty-app.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ description: Deploy a Java application with Open Liberty or WebSphere Liberty on
55
author: KarlErickson
66
ms.author: edburns
77
ms.topic: how-to
8-
ms.date: 04/02/2024
8+
ms.date: 05/29/2024
99
ms.subservice: aks-developer
1010
keywords: java, jakartaee, javaee, microprofile, open-liberty, websphere-liberty, aks, kubernetes
1111
ms.custom: devx-track-java, devx-track-javaee, devx-track-javaee-liberty, devx-track-javaee-liberty-aks, devx-track-javaee-websphere, build-2023, devx-track-extended-java, devx-track-azurecli
1212
---
1313

14-
# Deploy a Java application with Open Liberty or WebSphere Liberty on an Azure Kubernetes Service cluster
14+
# Deploy a Java application with Open Liberty or WebSphere Liberty on an Azure Kubernetes Service (AKS) cluster
1515

1616
This article demonstrates how to:
1717

@@ -41,7 +41,7 @@ This article is intended to help you quickly get to deployment. Before you go to
4141
* Sign in to the Azure CLI by using the [az login](/cli/azure/reference-index#az-login) command. To finish the authentication process, follow the steps displayed in your terminal. For other sign-in options, see [Sign in with the Azure CLI](/cli/azure/authenticate-azure-cli).
4242
* When you're prompted, install the Azure CLI extension on first use. For more information about extensions, see [Use extensions with the Azure CLI](/cli/azure/azure-cli-extensions-overview).
4343
* Run [az version](/cli/azure/reference-index?#az-version) to find the version and dependent libraries that are installed. To upgrade to the latest version, run [az upgrade](/cli/azure/reference-index?#az-upgrade). This article requires at least version 2.31.0 of Azure CLI.
44-
* Install a Java SE implementation, version 17 or later. (for example, [Eclipse Open J9](https://www.eclipse.org/openj9/)).
44+
* Install a Java Standard Edition (SE) implementation, version 17 or later (for example, [Eclipse Open J9](https://www.eclipse.org/openj9/)).
4545
* Install [Maven](https://maven.apache.org/download.cgi) 3.5.0 or higher.
4646
* Install [Docker](https://docs.docker.com/get-docker/) for your OS.
4747
* Ensure [Git](https://git-scm.com) is installed.
@@ -145,7 +145,7 @@ If you moved away from the **Deployment is in progress** pane, the following ste
145145
146146
---
147147
148-
You'll use these values later in this article. Note that the outputs list several other useful commands.
148+
You use these values later in this article. The outputs list several other useful commands.
149149
150150
## Create an Azure SQL Database instance
151151
@@ -167,7 +167,7 @@ $Env:DB_RESOURCE_GROUP_NAME="<db-resource-group>"
167167
168168
---
169169
170-
Now that you've created the database and AKS cluster, you can proceed to preparing AKS to host your Open Liberty application.
170+
Now that you created the database and AKS cluster, you can proceed to preparing AKS to host your Open Liberty application.
171171
172172
## Configure and deploy the sample application
173173

articles/aks/workload-identity-deploy-cluster.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ az account set --subscription <subscription-id>
4444

4545
To help simplify steps to configure the identities required, the steps below define environment variables that are referenced in the examples in this article. Remember to replace the values shown with your own values:
4646

47-
```bash
47+
```azurecli-interactive
4848
export RESOURCE_GROUP="myResourceGroup"
4949
export LOCATION="eastus"
5050
export CLUSTER_NAME="myAKSCluster"
@@ -117,7 +117,7 @@ az aks update \
117117

118118
To get the OIDC issuer URL and save it to an environmental variable, run the following command:
119119

120-
```bash
120+
```azurecli-interactive
121121
export AKS_OIDC_ISSUER="$(az aks show --name "${CLUSTER_NAME}" \
122122
--resource-group "${RESOURCE_GROUP}" \
123123
--query "oidcIssuerProfile.issuerUrl" \
@@ -146,7 +146,7 @@ az identity create \
146146

147147
Next, create a variable for the managed identity's client ID.
148148

149-
```bash
149+
```azurecli-interactive
150150
export USER_ASSIGNED_CLIENT_ID="$(az identity show \
151151
--resource-group "${RESOURCE_GROUP}" \
152152
--name "${USER_ASSIGNED_IDENTITY_NAME}" \
@@ -164,7 +164,7 @@ az aks get-credentials --name "${CLUSTER_NAME}" --resource-group "${RESOURCE_GRO
164164

165165
Copy and paste the following multi-line input in the Azure CLI.
166166

167-
```bash
167+
```azurecli-interactive
168168
cat <<EOF | kubectl apply -f -
169169
apiVersion: v1
170170
kind: ServiceAccount
@@ -321,8 +321,8 @@ The following example shows how to use the Azure role-based access control (Azur
321321
322322
To check whether all properties are injected properly by the webhook, use the [kubectl describe][kubectl-describe] command:
323323
324-
```bash
325-
kubectl describe pod quick-start | grep "SECRET_NAME:"
324+
```azurecli-interactive
325+
kubectl describe pod sample-workload-identity-key-vault | grep "SECRET_NAME:"
326326
```
327327

328328
If successful, the output should be similar to the following:
@@ -333,8 +333,8 @@ If successful, the output should be similar to the following:
333333

334334
To verify that pod is able to get a token and access the resource, use the kubectl logs command:
335335

336-
```bash
337-
kubectl logs quick-start
336+
```azurecli-interactive
337+
kubectl logs sample-workload-identity-key-vault
338338
```
339339

340340
If successful, the output should be similar to the following:

0 commit comments

Comments
 (0)