Skip to content

Commit c43798e

Browse files
authored
Merge pull request #283759 from eric-urban/eur/studo-doc-user-feedback
incorporate feedback from customers
2 parents d1d3b2c + 88d297e commit c43798e

File tree

8 files changed

+35
-37
lines changed

8 files changed

+35
-37
lines changed

articles/ai-studio/includes/chat-with-data.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.date: 5/21/2024
1010
ms.custom: include, build-2024
1111
---
1212

13-
To complete this section, you need a local copy of product data. The [Azure-Samples/aistudio-python-quickstart-sample repository on GitHub](https://github.com/Azure-Samples/aistudio-python-quickstart-sample/tree/main/data) contains sample retail customer and product information that's relevant for this tutorial scenario. Clone the repository or copy the files from [3-product-info](https://github.com/Azure-Samples/aistudio-python-quickstart-sample/tree/main/data/3-product-info).
13+
To complete this section, you need a local copy of product data. The [Azure-Samples/rag-data-openai-python-promptflow repository on GitHub](https://github.com/Azure-Samples/rag-data-openai-python-promptflow/) contains sample retail product information that's relevant for this tutorial scenario. Specifically, the `product_info_11.md` file contains product information about the TrailWalker hiking shoes that's relevant for this tutorial example. [Download the example Contoso Trek retail product data in a ZIP file](https://github.com/Azure-Samples/rag-data-openai-python-promptflow/raw/main/tutorial/data.zip) to your local machine.
1414

1515
> [!IMPORTANT]
1616
> The **Add your data** feature in the Azure AI Studio playground doesn't support using a virtual network or private endpoint on the following resources:
@@ -36,7 +36,7 @@ Follow these steps to add your data in the chat playground to help the assistant
3636

3737
1. Select **Upload** > **Upload files** to browse your local files.
3838

39-
1. Select the files you want to upload. Select the product information files ([3-product-info](https://github.com/Azure-Samples/aistudio-python-quickstart-sample/tree/main/data/3-product-info)) that you downloaded or created earlier. Add all of the files now. You won't be able to add more files later in the same playground session.
39+
1. Select the files you want to upload. Select the product information files that you [downloaded](https://github.com/Azure-Samples/rag-data-openai-python-promptflow/raw/main/tutorial/data.zip) or created earlier. Add all of the files now. You won't be able to add more files later in the same playground session.
4040

4141
1. Select **Upload** to upload the file to your Azure Blob storage account. Then select **Next**.
4242

@@ -63,8 +63,4 @@ Follow these steps to add your data in the chat playground to help the assistant
6363

6464
:::image type="content" source="../media/tutorials/chat/add-your-data-ingestion-in-progress.png" alt-text="Screenshot of the chat playground with the status of data ingestion in view." lightbox="../media/tutorials/chat/add-your-data-ingestion-in-progress.png":::
6565

66-
1. Enter a name for the playground configuration and select **Save** > **Save configuration**. All configuration items are saved by default. Items include deployment, system message, safety message, parameters, added data, examples, and variables. Saving a configuration with the same name will save over the previous version.
67-
68-
:::image type="content" source="../media/tutorials/chat/playground-configuration-save.png" alt-text="Screenshot of the playground configuration name and Save button." lightbox="../media/tutorials/chat/playground-configuration-save.png":::
69-
7066
1. You can now chat with the model asking the same question as before ("How much are the TrailWalker hiking shoes"), and this time it uses information from your data to construct the response. You can expand the **references** button to see the data that was used.

articles/ai-studio/includes/deploy-chat-model.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ ms.reviewer: eur
66
ms.author: eric-urban
77
ms.service: azure-ai-studio
88
ms.topic: include
9-
ms.date: 5/21/2024
9+
ms.date: 8/8/2024
1010
ms.custom: include, build-2024
1111
---
1212

1313
Follow these steps to deploy an Azure OpenAI chat model for your copilot.
1414

1515
1. Sign in to [Azure AI Studio](https://ai.azure.com) and go to the **Home** page.
1616
1. Go to your hub by selecting it from the list of hubs via **Home** > **All hubs**. If you don't have a hub, create one. For more information, see [how to create a hub](../how-to/create-azure-ai-resource.md).
17-
1. From the left pane, select **Deployments** > **+ Create deployment**.
17+
1. From the left pane, select **Deployments** > **+ Deploy model**.
1818

1919
:::image type="content" source="../media/tutorials/chat/deploy-create.png" alt-text="Screenshot of the deployments page with a button to create a new deployment." lightbox="../media/tutorials/chat/deploy-create.png":::
2020

Binary file not shown.

articles/ai-studio/quickstarts/get-started-code.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
11
---
22
title: Get started building a chat app using the prompt flow SDK
33
titleSuffix: Azure AI Studio
4-
description: This article provides instructions on how to set up your development environment for Azure AI SDKs.
4+
description: This article provides instructions on how to build a custom chat app in Python using the prompt flow SDK.
55
manager: nitinme
66
ms.service: azure-ai-studio
77
ms.custom: build-2024, devx-track-azurecli, devx-track-python
88
ms.topic: how-to
9-
ms.date: 5/30/2024
9+
ms.date: 8/6/2024
1010
ms.reviewer: dantaylo
1111
ms.author: eur
1212
author: eric-urban
1313
---
1414

1515
# Build a custom chat app in Python using the prompt flow SDK
16+
1617
[!INCLUDE [Feature preview](~/reusable-content/ce-skilling/azure/includes/ai-studio/includes/feature-preview.md)]
1718

1819
In this quickstart, we walk you through setting up your local development environment with the prompt flow SDK. We write a prompt, run it as part of your app code, trace the LLM calls being made, and run a basic evaluation on the outputs of the LLM.
1920

2021
## Prerequisites
2122

23+
> [!IMPORTANT]
24+
> You must have the necessary permissions to add role assignments for storage accounts in your Azure subscription. Granting permissions (adding role assignment) is only allowed by the **Owner** of the specific Azure resources. You might need to ask your IT admin for help to [grant access to call Azure OpenAI Service using your identity](#grant-access-to-call-azure-openai-service-using-your-identity).
25+
2226
Before you can follow this quickstart, create the resources that you need for your application:
2327
- An [AI Studio hub](../how-to/create-azure-ai-resource.md) for connecting to external resources.
2428
- A [project](../how-to/create-projects.md) for organizing your project artifacts and sharing traces and evaluation runs.
2529
- A [deployed Azure OpenAI](../how-to/deploy-models-openai.md) chat model (gpt-35-turbo or gpt-4)
2630

2731
Complete the [AI Studio playground quickstart](../quickstarts/get-started-playground.md) to create these resources if you haven't already. You can also create these resources by following the [SDK guide to create a hub and project](../how-to/develop/create-hub-project-sdk.md) article.
2832

29-
Also, you must have the necessary permissions to add role assignments for storage accounts in your Azure subscription. Granting permissions (adding role assignment) is only allowed by the **Owner** of the specific Azure resources. You might need to ask your IT admin for help to [grant access to call Azure OpenAI Service using your identity](#grant-access-to-call-azure-openai-service-using-your-identity).
30-
3133
## Grant access to call Azure OpenAI Service using your identity
3234

3335
To use security best practices, instead of API keys we use [Microsoft Entra ID](/entra/fundamentals/whatis) to authenticate with Azure OpenAI using your user identity.
@@ -62,9 +64,9 @@ To grant yourself access to the Azure AI Services resource that you're using:
6264

6365
1. Continue through the wizard and select **Review + assign** to add the role assignment.
6466

65-
## Install the Azure CLI and login
67+
## Install the Azure CLI and sign in
6668

67-
Now we install the Azure CLI and login from your local development environment, so that you can use your user credentials to call the Azure OpenAI service.
69+
You install the Azure CLI and sign in from your local development environment, so that you can use your user credentials to call the Azure OpenAI service.
6870

6971
In most cases you can install the Azure CLI from your terminal using the following command:
7072
# [Windows](#tab/windows)
@@ -89,7 +91,7 @@ brew update && brew install azure-cli
8991

9092
You can follow instructions [How to install the Azure CLI](/cli/azure/install-azure-cli) if these commands don't work for your particular operating system or setup.
9193

92-
After you install the Azure CLI, login using the ``az login`` command and sign-in using the browser:
94+
After you install the Azure CLI, sign in using the ``az login`` command and sign-in using the browser:
9395
```
9496
az login
9597
```
@@ -131,7 +133,7 @@ source .venv/bin/activate
131133

132134
---
133135

134-
Activating the Python environment means that when you run ```python``` or ```pip``` from the command line, you'll be using the Python interpreter contained in the ```.venv``` folder of your application.
136+
Activating the Python environment means that when you run ```python``` or ```pip``` from the command line, you then use the Python interpreter contained in the ```.venv``` folder of your application.
135137

136138
> [!NOTE]
137139
> You can use the ```deactivate``` command to exit the python virtual environment, and can later reactivate it when needed.
@@ -181,7 +183,7 @@ Your AI services endpoint and deployment name are required to call the Azure Ope
181183
182184
## Create a basic chat prompt and app
183185
184-
First create a prompt template file, for this we'll use **Prompty** which is the prompt template format supported by prompt flow.
186+
First create a **Prompty** file, which is the prompt template format supported by prompt flow.
185187
186188
Create a ```chat.prompty``` file and copy the following code into it:
187189
@@ -350,4 +352,4 @@ For more information on how to use prompt flow evaluators, including how to make
350352
## Next step
351353

352354
> [!div class="nextstepaction"]
353-
> [Augment the model with data for retrieval augmented generation (RAG)](../tutorials/copilot-sdk-build-rag.md)
355+
> [Add data and use retrieval augmented generation (RAG) to build a copilot](../tutorials/copilot-sdk-build-rag.md)

articles/ai-studio/tutorials/copilot-sdk-build-rag.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to build a RAG-based copilot using the prompt flow SDK.
55
manager: scottpolly
66
ms.service: azure-ai-studio
77
ms.topic: tutorial
8-
ms.date: 7/18/2024
8+
ms.date: 8/6/2024
99
ms.reviewer: lebaro
1010
ms.author: sgilley
1111
author: sdgilley
@@ -19,9 +19,9 @@ In this [Azure AI Studio](https://ai.azure.com) tutorial, you use the prompt flo
1919
This tutorial is part one of a two-part tutorial.
2020

2121
> [!TIP]
22-
> This tutorial is based on code in the sample repo for a [copilot application that implements RAG](https://github.com/Azure-Samples/rag-data-openai-python-promptflow).
22+
> Be sure to set aside enough time to complete the prerequisites before starting this tutorial. If you're new to Azure AI Studio, you might need to spend additional time to get familiar with the platform.
2323
24-
This part one shows you how to enhance a basic chat application by adding retrieval augmented generation (RAG) to ground the responses in your custom data.
24+
This part one shows you how to enhance a basic chat application by adding [retrieval augmented generation (RAG)](../concepts/retrieval-augmented-generation.md) to ground the responses in your custom data.
2525

2626
In this part one, you learn how to:
2727

@@ -34,14 +34,15 @@ In this part one, you learn how to:
3434

3535
## Prerequisites
3636

37+
> [!IMPORTANT]
38+
> You must have the necessary permissions to add role assignments in your Azure subscription. Granting permissions by role assignment is only allowed by the **Owner** of the specific Azure resources. You might need to ask your IT admin for help with completing the [assign access](#configure-access-for-the-azure-ai-search-service) section.
39+
3740
- You need to complete the [Build a custom chat app in Python using the prompt flow SDK quickstart](../quickstarts/get-started-code.md) to set up your environment.
3841

3942
> [!IMPORTANT]
4043
> This tutorial builds on the code and environment you set up in the quickstart.
4144
42-
- You need a local copy of product data. The [Azure-Samples/rag-data-openai-python-promptflow repository on GitHub](https://github.com/Azure-Samples/rag-data-openai-python-promptflow/) contains sample retail product information that's relevant for this tutorial scenario. Clone the repository or [download the example Contoso Trek retail product data in a ZIP file](https://github.com/Azure-Samples/rag-data-openai-python-promptflow/raw/main/tutorial/data.zip) to your local machine.
43-
44-
- You must have the necessary permissions to add role assignments in your Azure subscription. Granting permissions by role assignment is only allowed by the **Owner** of the specific Azure resources. You might need to ask your IT admin for help with completing the [assign access](#configure-access-for-the-azure-ai-search-service) section.
45+
- You need a local copy of product data. The [Azure-Samples/rag-data-openai-python-promptflow repository on GitHub](https://github.com/Azure-Samples/rag-data-openai-python-promptflow/) contains sample retail product information that's relevant for this tutorial scenario. [Download the example Contoso Trek retail product data in a ZIP file](https://github.com/Azure-Samples/rag-data-openai-python-promptflow/raw/main/tutorial/data.zip) to your local machine.
4546

4647
## Application code structure
4748

@@ -110,7 +111,7 @@ AZURE_OPENAI_CONNECTION_NAME=<your AIServices or Azure OpenAI connection name>
110111

111112
## Deploy an embedding model
112113

113-
For the RAG capability, we need to be able to embed the search query to search the Azure AI Search index we create.
114+
For the [retrieval augmented generation (RAG)](../concepts/retrieval-augmented-generation.md) capability, we need to be able to embed the search query to search the Azure AI Search index we create.
114115

115116
1. Deploy an Azure OpenAI embedding model. Follow the [deploy Azure OpenAI models guide](../how-to/deploy-models-openai.md) and deploy the **text-embedding-ada-002** model. Use the same **AIServices** or **Azure OpenAI** connection that you used [to deploy the chat model](../quickstarts/get-started-playground.md#deploy-a-chat-model).
116117
2. Add embedding model environment variables in your *.env* file. For the *AZURE_OPENAI_EMBEDDING_DEPLOYMENT* value, enter the name of the embedding model that you deployed.
@@ -119,14 +120,16 @@ For the RAG capability, we need to be able to embed the search query to search t
119120
AZURE_OPENAI_EMBEDDING_DEPLOYMENT=embedding_model_deployment_name
120121
```
121122
123+
For more information about the embedding model, see the [Azure OpenAI Service embeddings documentation](../../ai-services/openai/how-to/embeddings.md).
124+
122125
## Create an Azure AI Search index
123126
124127
The goal with this RAG-based application is to ground the model responses in your custom data. You use an Azure AI Search index that stores vectorized data from the embeddings model. The search index is used to retrieve relevant documents based on the user's question.
125128
126129
You need an Azure AI Search service and connection in order to create a search index.
127130
128131
> [!NOTE]
129-
> Creating an Azure AI Search service and subsequent search indexes has associated costs. You can see details about pricing and pricing tiers for the Azure AI Search service on the creation page, to confirm cost before creating the resource.
132+
> Creating an [Azure AI Search service](../../search/index.yml) and subsequent search indexes has associated costs. You can see details about pricing and pricing tiers for the Azure AI Search service on the creation page, to confirm cost before creating the resource.
130133
131134
### Create an Azure AI Search service
132135
@@ -148,7 +151,7 @@ Otherwise, you can create an Azure AI Search service using the [Azure portal](ht
148151
## [Azure CLI](#tab/cli)
149152
150153
1. Open a terminal on your local machine.
151-
1. Type `az` and then enter to verify that the Azure CLI tool is installed. If it's installed, a help menu with `az` commands appears. If you get an error, make sure you followed the [steps for installing the Azure CLI in the quickstart](../quickstarts/get-started-code.md#install-the-azure-cli-and-login).
154+
1. Type `az` and then enter to verify that the Azure CLI tool is installed. If it's installed, a help menu with `az` commands appears. If you get an error, make sure you followed the [steps for installing the Azure CLI in the quickstart](../quickstarts/get-started-code.md#install-the-azure-cli-and-sign-in).
152155
1. Follow the steps to create an Azure AI Search service using the [`az search service create`](../../search/search-manage-azure-cli.md#create-or-delete-a-service) command.
153156
154157
---

articles/ai-studio/tutorials/copilot-sdk-evaluate-deploy.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Evaluate and deploy a RAG-based copilot with the prompt flow SDK. T
55
manager: scottpolly
66
ms.service: azure-ai-studio
77
ms.topic: tutorial
8-
ms.date: 7/18/2024
8+
ms.date: 8/6/2024
99
ms.reviewer: lebaro
1010
ms.author: sgilley
1111
author: sdgilley
@@ -18,9 +18,6 @@ In this [Azure AI Studio](https://ai.azure.com) tutorial, you use the prompt flo
1818

1919
This tutorial is part two of a two-part tutorial.
2020

21-
> [!TIP]
22-
> This tutorial is based on code in the sample repo for a [copilot application that implements RAG](https://github.com/Azure-Samples/rag-data-openai-python-promptflow).
23-
2421
In this part two, you learn how to:
2522

2623
> [!div class="checklist"]
@@ -69,7 +66,7 @@ Now define an evaluation script that will:
6966
- Load the sample `.jsonl` dataset.
7067
- Generate a target function wrapper around our copilot logic.
7168
- Run the evaluation, which takes the target function, and merges the evaluation dataset with the responses from the copilot.
72-
- Generate a set of GPT-assisted metrics (Relevance, Groundedness, and Coherence) to evaluate the quality of the copilot responses.
69+
- Generate a set of GPT-assisted metrics (relevance, groundedness, and coherence) to evaluate the quality of the copilot responses.
7370
- Output the results locally, and logs the results to the cloud project.
7471

7572
The script allows you to review the results locally, by outputting the results in the command line, and to a json file.
@@ -327,5 +324,5 @@ To avoid incurring unnecessary Azure costs, you should delete the resources you
327324
328325
## Related content
329326
330-
> [!div class="nextstepaction"]
331-
> [Learn more about prompt flow](../how-to/prompt-flow.md)
327+
- [Learn more about prompt flow](../how-to/prompt-flow.md)
328+
- For a sample copilot application that implements RAG, see [Azure-Samples/rag-data-openai-python-promptflow](https://github.com/Azure-Samples/rag-data-openai-python-promptflow)

articles/ai-studio/tutorials/deploy-chat-web-app.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The steps in this tutorial are:
3737

3838
- An [Azure AI Search service connection](../how-to/connections-add.md#create-a-new-connection) to index the sample product and customer data.
3939

40-
- You need at least one file to upload that contains example data. To complete this tutorial, use the product information samples from the [Azure-Samples/aistudio-python-quickstart-sample repository on GitHub](https://github.com/Azure-Samples/aistudio-python-quickstart-sample/tree/main/data). Specifically, the [product_info_11.md](https://github.com/Azure-Samples/aistudio-python-quickstart-sample/blob/main/data/3-product-info/product_info_11.md) contains product information about the TrailWalker hiking shoes that's relevant for this tutorial example. You can download the file or copy its contents to a file named `product_info_11.md` on your local computer.
40+
- You need a local copy of product data. The [Azure-Samples/rag-data-openai-python-promptflow repository on GitHub](https://github.com/Azure-Samples/rag-data-openai-python-promptflow/) contains sample retail product information that's relevant for this tutorial scenario. Specifically, the `product_info_11.md` file contains product information about the TrailWalker hiking shoes that's relevant for this tutorial example. [Download the example Contoso Trek retail product data in a ZIP file](https://github.com/Azure-Samples/rag-data-openai-python-promptflow/raw/main/tutorial/data.zip) to your local machine.
4141

4242
## Add your data and try the chat model again
4343

0 commit comments

Comments
 (0)