You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-studio/includes/chat-with-data.md
+2-6Lines changed: 2 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ ms.date: 5/21/2024
10
10
ms.custom: include, build-2024
11
11
---
12
12
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.
14
14
15
15
> [!IMPORTANT]
16
16
> 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
36
36
37
37
1. Select **Upload** > **Upload files** to browse your local files.
38
38
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.
40
40
41
41
1. Select **Upload** to upload the file to your Azure Blob storage account. Then select **Next**.
42
42
@@ -63,8 +63,4 @@ Follow these steps to add your data in the chat playground to help the assistant
63
63
64
64
:::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":::
65
65
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
-
70
66
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.
Copy file name to clipboardExpand all lines: articles/ai-studio/includes/deploy-chat-model.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,15 +6,15 @@ ms.reviewer: eur
6
6
ms.author: eric-urban
7
7
ms.service: azure-ai-studio
8
8
ms.topic: include
9
-
ms.date: 5/21/2024
9
+
ms.date: 8/8/2024
10
10
ms.custom: include, build-2024
11
11
---
12
12
13
13
Follow these steps to deploy an Azure OpenAI chat model for your copilot.
14
14
15
15
1. Sign in to [Azure AI Studio](https://ai.azure.com) and go to the **Home** page.
16
16
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**.
18
18
19
19
:::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":::
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.
19
20
20
21
## Prerequisites
21
22
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
+
22
26
Before you can follow this quickstart, create the resources that you need for your application:
23
27
- An [AI Studio hub](../how-to/create-azure-ai-resource.md) for connecting to external resources.
24
28
- A [project](../how-to/create-projects.md) for organizing your project artifacts and sharing traces and evaluation runs.
25
29
- A [deployed Azure OpenAI](../how-to/deploy-models-openai.md) chat model (gpt-35-turbo or gpt-4)
26
30
27
31
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.
28
32
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
-
31
33
## Grant access to call Azure OpenAI Service using your identity
32
34
33
35
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:
62
64
63
65
1. Continue through the wizard and select **Review + assign** to add the role assignment.
64
66
65
-
## Install the Azure CLI and login
67
+
## Install the Azure CLI and sign in
66
68
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.
68
70
69
71
In most cases you can install the Azure CLI from your terminal using the following command:
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.
91
93
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:
93
95
```
94
96
az login
95
97
```
@@ -131,7 +133,7 @@ source .venv/bin/activate
131
133
132
134
---
133
135
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.
135
137
136
138
> [!NOTE]
137
139
> 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
181
183
182
184
## Create a basic chat prompt and app
183
185
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.
185
187
186
188
Create a ```chat.prompty``` file and copy the following code into it:
187
189
@@ -350,4 +352,4 @@ For more information on how to use prompt flow evaluators, including how to make
350
352
## Next step
351
353
352
354
> [!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)
Copy file name to clipboardExpand all lines: articles/ai-studio/tutorials/copilot-sdk-build-rag.md
+12-9Lines changed: 12 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: Learn how to build a RAG-based copilot using the prompt flow SDK.
5
5
manager: scottpolly
6
6
ms.service: azure-ai-studio
7
7
ms.topic: tutorial
8
-
ms.date: 7/18/2024
8
+
ms.date: 8/6/2024
9
9
ms.reviewer: lebaro
10
10
ms.author: sgilley
11
11
author: sdgilley
@@ -19,9 +19,9 @@ In this [Azure AI Studio](https://ai.azure.com) tutorial, you use the prompt flo
19
19
This tutorial is part one of a two-part tutorial.
20
20
21
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).
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.
23
23
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.
25
25
26
26
In this part one, you learn how to:
27
27
@@ -34,14 +34,15 @@ In this part one, you learn how to:
34
34
35
35
## Prerequisites
36
36
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
+
37
40
- 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.
38
41
39
42
> [!IMPORTANT]
40
43
> This tutorial builds on the code and environment you set up in the quickstart.
41
44
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.
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.
114
115
115
116
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).
116
117
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
For more information about the embedding model, see the [Azure OpenAI Service embeddings documentation](../../ai-services/openai/how-to/embeddings.md).
124
+
122
125
## Create an Azure AI Search index
123
126
124
127
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.
125
128
126
129
You need an Azure AI Search service and connection in order to create a search index.
127
130
128
131
> [!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.
130
133
131
134
### Create an Azure AI Search service
132
135
@@ -148,7 +151,7 @@ Otherwise, you can create an Azure AI Search service using the [Azure portal](ht
148
151
## [Azure CLI](#tab/cli)
149
152
150
153
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).
152
155
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.
Copy file name to clipboardExpand all lines: articles/ai-studio/tutorials/copilot-sdk-evaluate-deploy.md
+4-7Lines changed: 4 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: Evaluate and deploy a RAG-based copilot with the prompt flow SDK. T
5
5
manager: scottpolly
6
6
ms.service: azure-ai-studio
7
7
ms.topic: tutorial
8
-
ms.date: 7/18/2024
8
+
ms.date: 8/6/2024
9
9
ms.reviewer: lebaro
10
10
ms.author: sgilley
11
11
author: sdgilley
@@ -18,9 +18,6 @@ In this [Azure AI Studio](https://ai.azure.com) tutorial, you use the prompt flo
18
18
19
19
This tutorial is part two of a two-part tutorial.
20
20
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
-
24
21
In this part two, you learn how to:
25
22
26
23
> [!div class="checklist"]
@@ -69,7 +66,7 @@ Now define an evaluation script that will:
69
66
- Load the sample `.jsonl` dataset.
70
67
- Generate a target function wrapper around our copilot logic.
71
68
- 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.
73
70
- Output the results locally, and logs the results to the cloud project.
74
71
75
72
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
327
324
328
325
## Related content
329
326
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)
Copy file name to clipboardExpand all lines: articles/ai-studio/tutorials/deploy-chat-web-app.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ The steps in this tutorial are:
37
37
38
38
- An [Azure AI Search service connection](../how-to/connections-add.md#create-a-new-connection) to index the sample product and customer data.
39
39
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.
0 commit comments