Skip to content

Commit f4c5925

Browse files
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-docs-pr into WI-212716-upcoming-azure-ai-update-recommendations
2 parents bf0bcff + 0cb4516 commit f4c5925

File tree

76 files changed

+849
-632
lines changed

Some content is hidden

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

76 files changed

+849
-632
lines changed

articles/active-directory-b2c/custom-policies-series-validate-user-input.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Azure Active Directory B2C (Azure AD B2C) custom policy not only allows you to m
4949

5050
## Step 1 - Validate user input by limiting user input options
5151

52-
If you know all the possible values that a user can enter for a given input, you can provide a finite set of values that a user must select from. You can use *DropdownSinglSelect*, *CheckboxMultiSelect*, and *RadioSingleSelect* [UserInputType](claimsschema.md#userinputtype) for this purpose. In this article, you'll use a *RadioSingleSelect* input type:
52+
If you know all the possible values that a user can enter for a given input, you can provide a finite set of values that a user must select from. You can use *DropdownSingleSelect*, *CheckboxMultiSelect*, and *RadioSingleSelect* [UserInputType](claimsschema.md#userinputtype) for this purpose. In this article, you'll use a *RadioSingleSelect* input type:
5353

5454
1. In VS Code, open the file `ContosoCustomPolicy.XML`.
5555

articles/active-directory-b2c/session-behavior.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ With single sign-on, users sign in once with a single account and get access to
2525

2626
When the user initially signs in to an application, Azure AD B2C persists a cookie-based session. Upon subsequent authentication requests, Azure AD B2C reads and validates the cookie-based session, and issues an access token without prompting the user to sign in again. If the cookie-based session expires or becomes invalid, the user is prompted to sign-in again.
2727

28+
>[!NOTE]
29+
>If the user uses a browser that blocks third-party cookies, there are limitations with SSO due to limited access to the cookie-based session. The most user-visible impact is that there are more interactions required for sign-in. Additionally, the front channel sign-out doesn't immediately clear authentication state from federated applications. Check our recommended ways about [how to handle third-party cookie blocking in browsers](/entra/identity-platform/reference-third-party-cookies-spas).
30+
2831
## Prerequisites
2932

3033
[!INCLUDE [active-directory-b2c-customization-prerequisites](../../includes/active-directory-b2c-customization-prerequisites.md)]

articles/ai-services/language-service/question-answering/how-to/azure-openai-integration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.service: azure-ai-language
66
author: jboback
77
ms.author: jboback
88
ms.topic: how-to
9-
ms.date: 12/19/2023
9+
ms.date: 02/09/2024
1010
---
1111

1212
# Connect Custom Question Answering with Azure OpenAI on your data
@@ -72,7 +72,7 @@ At the same time, customers often require a custom answer authoring experience t
7272

7373
:::image type="content" source="../media/question-answering/chat-playground.png" alt-text="A screenshot of the playground page of the Azure OpenAI Studio with sections highlighted." lightbox="../media/question-answering/chat-playground.png":::
7474

75-
You can now start exploring Azure OpenAI capabilities with a no-code approach through the chat playground. It's simply a text box where you can submit a prompt to generate a completion. From this page, you can quickly iterate and experiment with the capabilities. You can also launch a [web app](../../..//openai/concepts/use-your-data.md#using-the-web-app) to chat with the model over the web.
75+
You can now start exploring Azure OpenAI capabilities with a no-code approach through the chat playground. It's simply a text box where you can submit a prompt to generate a completion. From this page, you can quickly iterate and experiment with the capabilities. You can also launch a [web app](../../../openai/how-to/use-web-app.md) to chat with the model over the web.
7676

7777
## Next steps
7878
* [Using Azure OpenAI on your data](../../../openai/concepts/use-your-data.md)

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

Lines changed: 205 additions & 286 deletions
Large diffs are not rendered by default.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: 'Using the Azure OpenAI web app'
3+
titleSuffix: Azure OpenAI
4+
description: Use this article to learn about using the available web app to chat with Azure OpenAI models.
5+
manager: nitinme
6+
ms.service: azure-ai-openai
7+
ms.topic: how-to
8+
author: aahill
9+
ms.author: aahi
10+
ms.date: 02/09/2024
11+
recommendations: false
12+
---
13+
14+
15+
# Use the Azure OpenAI web app
16+
17+
Along with Azure OpenAI Studio, APIs and SDKs, you can also use the available standalone web app to interact with Azure OpenAI models using a graphical user interface, which you can deploy using either Azure OpenAI studio or a [manual deployment](https://github.com/microsoft/sample-app-aoai-chatGPT).
18+
19+
![A screenshot of the web app interface.](../media/use-your-data/web-app.png)
20+
21+
## Important considerations
22+
23+
- Publishing creates an Azure App Service in your subscription. It might incur costs depending on the [pricing plan](https://azure.microsoft.com/pricing/details/app-service/windows/) you select. When you're done with your app, you can delete it from the Azure portal.
24+
- By default, the app will be deployed with the Microsoft identity provider already configured, restricting access to the app to members of your Azure tenant. To add or modify authentication:
25+
26+
1. Go to the [Azure portal](https://portal.azure.com/#home) and search for the app name you specified during publishing. Select the web app, and go to the **Authentication** tab on the left navigation menu. Then select **Add an identity provider**.
27+
28+
:::image type="content" source="../media/quickstarts/web-app-authentication.png" alt-text="Screenshot of the authentication page in the Azure portal." lightbox="../media/quickstarts/web-app-authentication.png":::
29+
30+
1. Select Microsoft as the identity provider. The default settings on this page will restrict the app to your tenant only, so you don't need to change anything else here. Then select **Add**
31+
32+
Now users will be asked to sign in with their Microsoft Entra ID account to be able to access your app. You can follow a similar process to add another identity provider if you prefer. The app doesn't use the user's sign-in information in any other way other than verifying they are a member of your tenant.
33+
34+
## Web app customization
35+
36+
You can customize the app's frontend and backend logic. For example, you could change the icon that appears in the center of the app by updating `/frontend/src/assets/Contoso.svg` and then redeploying the app [using the Azure CLI](https://github.com/microsoft/sample-app-aoai-chatGPT#deploy-with-the-azure-cli). See the source code for the web app, and more information on [GitHub](https://github.com/microsoft/sample-app-aoai-chatGPT).
37+
38+
When customizing the app, we recommend:
39+
40+
- Resetting the chat session (clear chat) if the user changes any settings. Notify the user that their chat history will be lost.
41+
42+
- Clearly communicating how each setting you implement will affect the user experience.
43+
44+
- When you rotate API keys for your Azure OpenAI or Azure AI Search resource, be sure to update the app settings for each of your deployed apps to use the new keys.
45+
46+
### Updating the web app
47+
48+
We recommend pulling changes from the `main` branch for the web app's source code frequently to ensure you have the latest bug fixes, API version, and improvements.
49+
50+
> [!NOTE]
51+
> After February 1, 2024, the web app requires the app startup command to be set to `python3 -m gunicorn app:app`. When updating an app that was published prior to February 1, 2024, you need to manually add the startup command from the **App Service Configuration** page.
52+
53+
## Chat history
54+
55+
You can enable chat history for your users of the web app. When you enable the feature, your users will have access to their individual previous queries and responses.
56+
57+
To enable chat history, deploy or redeploy your model as a web app using [Azure OpenAI Studio](https://oai.azure.com/portal)
58+
59+
:::image type="content" source="../media/use-your-data/enable-chat-history.png" alt-text="A screenshot of the chat history enablement button on Azure OpenAI studio." lightbox="../media/use-your-data/enable-chat-history.png":::
60+
61+
> [!IMPORTANT]
62+
> Enabling chat history will create a [Cosmos DB](/azure/cosmos-db/introduction) instance in your resource group, and incur [additional charges](https://azure.microsoft.com/pricing/details/cosmos-db/autoscale-provisioned/) for the storage used.
63+
64+
Once you've enabled chat history, your users will be able to show and hide it in the top right corner of the app. When the history is shown, they can rename, or delete conversations. As they're logged into the app, conversations will be automatically ordered from newest to oldest, and named based on the first query in the conversation.
65+
66+
:::image type="content" source="../media/use-your-data/web-app-chat-history.png" alt-text="A screenshot of the chat history in the web app." lightbox="../media/use-your-data/web-app-chat-history.png":::
67+
68+
## Deleting your Cosmos DB instance
69+
70+
Deleting your web app does not delete your Cosmos DB instance automatically. To delete your Cosmos DB instance, along with all stored chats, you need to navigate to the associated resource in the [Azure portal](https://portal.azure.com) and delete it. If you delete the Cosmos DB resource but keep the chat history option enabled on the studio, your users will be notified of a connection error, but can continue to use the web app without access to the chat history.
71+
72+
## Next steps
73+
* [Prompt engineering](../concepts/prompt-engineering.md)
74+
* [Azure openAI on your data](../concepts/use-your-data.md)

articles/ai-services/openai/how-to/use-your-data-securely.md

Lines changed: 59 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ ms.date: 02/13/2024
1212
recommendations: false
1313
---
1414

15-
# Securely use Azure OpenAI on your data
15+
# Securely use Azure OpenAI On Your Data
1616

17-
Use this article to learn how to use Azure OpenAI on your data securely by protecting data and resources with Microsoft Entra ID role-based access control, virtual networks and private endpoints.
17+
Use this article to learn how to use Azure OpenAI On Your Data securely by protecting data and resources with Microsoft Entra ID role-based access control, virtual networks and private endpoints.
1818

19-
This article is only applicable when using [Azure OpenAI on your data with text](/azure/ai-services/openai/concepts/use-your-data). It does not apply to [Azure OpenAI on your data with images](/azure/ai-services/openai/concepts/use-your-image-data).
19+
This article is only applicable when using [Azure OpenAI On Your Data with text](/azure/ai-services/openai/concepts/use-your-data). It does not apply to [Azure OpenAI On Your Data with images](/azure/ai-services/openai/concepts/use-your-image-data).
2020

2121
## Data ingestion architecture
2222

23-
When you use Azure OpenAI on your data to ingest data from Azure blob storage, local files or URLs into Azure AI Search, the following process is used to process the data.
23+
When you use Azure OpenAI On Your Data to ingest data from Azure blob storage, local files or URLs into Azure AI Search, the following process is used to process the data.
2424

2525
:::image type="content" source="../media/use-your-data/ingestion-architecture.png" alt-text="A diagram showing the process of ingesting data." lightbox="../media/use-your-data/ingestion-architecture.png":::
2626

@@ -47,6 +47,61 @@ When you send API calls to chat with an Azure OpenAI model on your data, the ser
4747

4848
If an embedding deployment is provided in the inference request, the rewritten query will be vectorized by Azure OpenAI, and both query and vector are sent Azure AI Search for vector search.
4949

50+
## Document-level access control
51+
52+
> [!NOTE]
53+
> Document-level access control is supported for Azure AI search only.
54+
55+
Azure OpenAI On Your Data lets you restrict the documents that can be used in responses for different users with Azure AI Search [security filters](/azure/search/search-security-trimming-for-azure-search-with-aad). When you enable document level access, the search results returned from Azure AI Search and used to generate a response will be trimmed based on user Microsoft Entra group membership. You can only enable document-level access on existing Azure AI Search indexes. To enable document-level access:
56+
57+
1. Follow the steps in the [Azure AI Search documentation](/azure/search/search-security-trimming-for-azure-search-with-aad) to register your application and create users and groups.
58+
1. [Index your documents with their permitted groups](/azure/search/search-security-trimming-for-azure-search-with-aad#index-document-with-their-permitted-groups). Be sure that your new [security fields](/azure/search/search-security-trimming-for-azure-search#create-security-field) have the schema below:
59+
60+
```json
61+
{"name": "group_ids", "type": "Collection(Edm.String)", "filterable": true }
62+
```
63+
64+
`group_ids` is the default field name. If you use a different field name like `my_group_ids`, you can map the field in [index field mapping](../concepts/use-your-data.md#index-field-mapping).
65+
66+
1. Make sure each sensitive document in the index has the value set correctly on this security field to indicate the permitted groups of the document.
67+
1. In [Azure OpenAI Studio](https://oai.azure.com/portal), add your data source. in the [index field mapping](../concepts/use-your-data.md#index-field-mapping) section, you can map zero or one value to the **permitted groups** field, as long as the schema is compatible. If the **Permitted groups** field isn't mapped, document level access won't be enabled.
68+
69+
**Azure OpenAI Studio**
70+
71+
Once the Azure AI Search index is connected, your responses in the studio will have document access based on the Microsoft Entra permissions of the logged in user.
72+
73+
**Web app**
74+
75+
If you are using a published [web app](./use-web-app.md), you need to redeploy it to upgrade to the latest version. The latest version of the web app includes the ability to retrieve the groups of the logged in user's Microsoft Entra account, cache it, and include the group IDs in each API request.
76+
77+
**API**
78+
79+
When using the API, pass the `filter` parameter in each API request. For example:
80+
81+
```json
82+
{
83+
"messages": [
84+
{
85+
"role": "user",
86+
"content": "who is my manager?"
87+
}
88+
],
89+
"dataSources": [
90+
{
91+
"type": "AzureCognitiveSearch",
92+
"parameters": {
93+
"endpoint": "'$SearchEndpoint'",
94+
"key": "'$SearchKey'",
95+
"indexName": "'$SearchIndex'",
96+
"filter": "my_group_ids/any(g:search.in(g, 'group_id1, group_id2'))"
97+
}
98+
}
99+
]
100+
}
101+
```
102+
* `my_group_ids` is the field name that you selected for **Permitted groups** during [fields mapping](../concepts/use-your-data.md#index-field-mapping).
103+
* `group_id1, group_id2` are groups attributed to the logged in user. The client application can retrieve and cache users' groups.
104+
50105

51106
## Resources configuration
52107

articles/ai-services/openai/includes/connect-your-data-studio.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,27 @@ ms.service: azure-ai-openai
66
ms.topic: include
77
author: aahill
88
ms.author: aahi
9-
ms.date: 11/14/2023
9+
ms.date: 02/15/2024
1010
recommendations: false
1111
---
1212

1313
## Add your data using Azure OpenAI Studio
1414

1515
Navigate to [Azure OpenAI Studio](https://oai.azure.com/) and sign-in with credentials that have access to your Azure OpenAI resource. During or after the sign-in workflow, select the appropriate directory, Azure subscription, and Azure OpenAI resource.
1616

17-
1. Select the **Chat playground** tile.
17+
1. Select the **Bring your own data** tile
1818

19-
:::image type="content" source="../media/quickstarts/chat-playground-card.png" alt-text="A screenshot of the Azure OpenAI Studio landing page." lightbox="../media/quickstarts/chat-playground-card.png":::
19+
:::image type="content" source="../media/use-your-data/bring-your-data-card.png" alt-text="A screenshot of the Azure OpenAI Studio landing page." lightbox="../media/use-your-data/bring-your-data-card.png":::
2020

21-
1. On the **Assistant setup** tile, select **Add your data (preview)** > **+ Add a data source**.
22-
23-
:::image type="content" source="../media/quickstarts/chatgpt-playground-add-your-data.png" alt-text="A screenshot showing the button for adding your data in Azure OpenAI Studio." lightbox="../media/quickstarts/chatgpt-playground-add-your-data.png":::
24-
25-
1. In the pane that appears, select **Upload files** under **Select data source**. Select **Upload files**. Azure OpenAI needs both a storage resource and a search resource to access and index your data.
21+
1. In the pane that appears, select **Upload files (preview)** under **Select data source**. Azure OpenAI needs both a storage resource and a search resource to access and index your data.
2622

2723
> [!TIP]
2824
> * See the following resource for more information:
29-
> * [Data source options](../concepts/use-your-data.md#ingesting-your-data)
30-
> * You can connect an existing Azure AI search index or Azure Cosmos DB for MongoDB vCore as a data source.
25+
> * [Data source options](../concepts/use-your-data.md#supported-data-sources)
3126
> * [supported file types and formats](../concepts/use-your-data.md#data-formats-and-file-types)
3227
> * For documents and datasets with long text, we recommend using the available [data preparation script](https://go.microsoft.com/fwlink/?linkid=2244395).
3328
34-
1. For Azure OpenAI to access your storage account, you will need to turn on [Cross-origin resource sharing (CORS)](https://go.microsoft.com/fwlink/?linkid=2237228). If CORS isn't already turned on for the Azure Blob storage resource, select **Turn on CORS**.
29+
1. For Azure OpenAI to access your storage account, you will need to turn on [Cross-origin resource sharing (CORS)](https://go.microsoft.com/fwlink/?linkid=2237228). If CORS isn't already turned on for the Azure Blob Storage resource, select **Turn on CORS**.
3530

3631
1. Select your Azure AI Search resource, and select the acknowledgment that connecting it will incur usage on your account. Then select **Next**.
3732

@@ -40,11 +35,11 @@ Navigate to [Azure OpenAI Studio](https://oai.azure.com/) and sign-in with crede
4035

4136
1. On the **Upload files** pane, select **Browse for a file** and select the files you want to upload. Then select **Upload files**. Then select **Next**.
4237

43-
1. On the **Data management** pane, you can choose whether to enable [semantic search or vector search](../concepts/use-your-data.md#search-options) for your index.
38+
1. On the **Data management** pane, you can choose whether to enable [semantic search or vector search](../concepts/use-your-data.md#search-types) for your index.
4439

45-
> [!IMPORTANT]
46-
> * [Semantic search](/azure/search/semantic-search-overview#availability-and-pricing) and [vector search](https://azure.microsoft.com/pricing/details/cognitive-services/openai-service/) are subject to additional pricing. You need to choose **Basic or higher SKU** to enable semantic search or vector search. See [pricing tier difference](/azure/search/search-sku-tier) and [service limits](/azure/search/search-limits-quotas-capacity) for more information.
47-
> * To help improve the quality of the information retrieval and model response, we recommend enabling [semantic search](/azure/search/semantic-search-overview) for the following languages: English, French, Spanish, Portuguese, Italian, Germany, Chinese(Zh), Japanese, Korean, Russian, and Arabic.
40+
> [!IMPORTANT]
41+
> * [Semantic search](/azure/search/semantic-search-overview#availability-and-pricing) and [vector search](https://azure.microsoft.com/pricing/details/cognitive-services/openai-service/) are subject to additional pricing. You need to choose **Basic or higher SKU** to enable semantic search or vector search. See [pricing tier difference](/azure/search/search-sku-tier) and [service limits](/azure/search/search-limits-quotas-capacity) for more information.
42+
> * To help improve the quality of the information retrieval and model response, we recommend enabling [semantic search](/azure/search/semantic-search-overview) for the following data source languages: English, French, Spanish, Portuguese, Italian, Germany, Chinese(Zh), Japanese, Korean, Russian, and Arabic.
4843
4944
1. Review the details you entered, and select **Save and close**. You can now chat with the model and it will use information from your data to construct the response.
5045

0 commit comments

Comments
 (0)