Skip to content

Commit 86f4fd9

Browse files
committed
incorporate feedback from customers
1 parent df29e32 commit 86f4fd9

File tree

3 files changed

+24
-23
lines changed

3 files changed

+24
-23
lines changed

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
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.
@@ -62,9 +63,9 @@ To grant yourself access to the Azure AI Services resource that you're using:
6263

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

65-
## Install the Azure CLI and login
66+
## Install the Azure CLI and sign in
6667

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.
68+
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.
6869

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

9091
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.
9192

92-
After you install the Azure CLI, login using the ``az login`` command and sign-in using the browser:
93+
After you install the Azure CLI, sign in using the ``az login`` command and sign-in using the browser:
9394
```
9495
az login
9596
```
@@ -131,7 +132,7 @@ source .venv/bin/activate
131132

132133
---
133134

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.
135+
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.
135136

136137
> [!NOTE]
137138
> You can use the ```deactivate``` command to exit the python virtual environment, and can later reactivate it when needed.
@@ -181,7 +182,7 @@ Your AI services endpoint and deployment name are required to call the Azure Ope
181182
182183
## Create a basic chat prompt and app
183184
184-
First create a prompt template file, for this we'll use **Prompty** which is the prompt template format supported by prompt flow.
185+
First create a **Prompty** file, which is the prompt template format supported by prompt flow.
185186
186187
Create a ```chat.prompty``` file and copy the following code into it:
187188
@@ -350,4 +351,4 @@ For more information on how to use prompt flow evaluators, including how to make
350351
## Next step
351352

352353
> [!div class="nextstepaction"]
353-
> [Augment the model with data for retrieval augmented generation (RAG)](../tutorials/copilot-sdk-build-rag.md)
354+
> [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: 11 additions & 8 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

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)

0 commit comments

Comments
 (0)