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
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
+
In this quickstart, we walk you through setting up your local development environment with the Azure AI Foundry 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.
20
20
21
21
## Prerequisites
22
22
@@ -93,4 +93,4 @@ python chat.py
93
93
## Next step
94
94
95
95
> [!div class="nextstepaction"]
96
-
> [Add data and use retrieval augmented generation (RAG) to build a custom chat app](../tutorials/copilot-sdk-build-rag.md)
96
+
> [Add data and use retrieval augmented generation (RAG) to build a custom chat app](../tutorials/copilot-sdk-create-resources.md)
Copy file name to clipboardExpand all lines: articles/ai-studio/tutorials/copilot-sdk-build-rag.md
+41-9Lines changed: 41 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,19 @@
1
1
---
2
-
title: "Part 2: Build a custom chat app with the Azure AI Foundry SDK"
2
+
title: "Part 2: Build a ca custom knowledge retrieval (RAG) app with the Azure AI Foundry SDK"
3
3
titleSuffix: Azure AI Studio
4
4
description: Learn how to build a RAG-based chat app using the Azure AI Foundry SDK. This tutorial is part 2 of a 3-part tutorial series.
5
5
manager: scottpolly
6
6
ms.service: azure-ai-studio
7
7
ms.topic: tutorial
8
-
ms.date: 11/03/2024
8
+
ms.date: 11/11/2024
9
9
ms.reviewer: lebaro
10
10
ms.author: sgilley
11
11
author: sdgilley
12
12
ms.custom: [copilot-learning-hub]
13
13
#customer intent: As a developer, I want to learn how to use the prompt flow SDK so that I can build a RAG-based chat app.
14
14
---
15
15
16
-
# Tutorial: Part 2 - Build a custom chat application with the Azure AI Foundry SDK
16
+
# Tutorial: Part 2 - Build a custom knowledge retrieval (RAG) app with the Azure AI Foundry SDK
17
17
18
18
In this tutorial, you use the Azure AI Foundry SDK (and other libraries) to build, configure, evaluate, and deploy a chat app for your retail company called Contoso Trek. Your retail company specializes in outdoor camping gear and clothing. The chat app should answer questions about your products and services. For example, the chat app can answer questions such as "which tent is the most waterproof?" or "what is the best sleeping bag for cold weather?".
19
19
@@ -49,8 +49,21 @@ The search index is used to store vectorized data from the embeddings model. The
49
49
50
50
1. Create the file **create_search_index.py** in your main folder (that is, the same directory where you placed your **assets** folder, not inside the **assets** folder).
51
51
1. Copy and paste the following code into your **create_search_index.py** file.
52
+
1. Add the code to import the required libraries, create a project client, and configure some settings:
1. From your console, log in to your Azure account and follow instructions for authenticating your account:
56
69
@@ -71,15 +84,25 @@ The search index is used to store vectorized data from the embeddings model. The
71
84
72
85
## <a name="get-documents"></a> Get product documents
73
86
74
-
Next, you create a script to get product documents from the search index. The script uses the Azure AI SDK to query the search index for documents that match a user's question.
87
+
Next, you create a script to get product documents from the search index. The script queries the search index for documents that match a user's question.
75
88
76
89
### Create script to get product documents
77
90
78
91
When the chat gets a request, it searches through your data to find relevant information. This script uses the Azure AI SDK to query the search index for documents that match a user's question. It then returns the documents to the chat app.
79
92
80
-
Create the **get_product_documents.py** file in your main directory. Copy and paste the following code into the file.
93
+
1. Create the **get_product_documents.py** file in your main directory. Copy and paste the following code into the file.
94
+
95
+
1. Start with code to import the required libraries, create a project client, and configure settings:
@@ -103,9 +126,18 @@ Next you create custom code to add retrieval augmented generation (RAG) capabili
103
126
104
127
### Create a chat script with RAG capabilities
105
128
106
-
In your main folder, create a new file called **chat_with_products.py**. This script uses the Azure AI SDK to retrieve product documents and generate a response to a user's question.
129
+
1. In your main folder, create a new file called **chat_with_products.py**. This script retrieves product documents and generates a response to a user's question.
130
+
1. Add the code to import the required libraries, create a project client, and configure settings:
Copy file name to clipboardExpand all lines: articles/ai-studio/tutorials/copilot-sdk-create-resources.md
+12-6Lines changed: 12 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,21 @@
1
1
---
2
-
title: "Part 1: Create resources to build a custom chat app"
2
+
title: "Part 1: Set up project and development environment to build a a custom knowledge retrieval (RAG) app"
3
3
titleSuffix: Azure AI Studio
4
4
description: Build a custom chat app using the Azure AI Foundry SDK. Part 1 of a 3-part tutorial series, which shows how to create the resources you'll need for parts 2 and 3.
5
5
manager: scottpolly
6
6
ms.service: azure-ai-studio
7
7
ms.topic: tutorial
8
-
ms.date: 11/03/2024
8
+
ms.date: 11/11/2024
9
9
ms.reviewer: lebaro
10
10
ms.author: sgilley
11
11
author: sdgilley
12
12
#customer intent: As a developer, I want to learn how to use the prompt flow SDK so that I can build a RAG-based chat app.
13
13
---
14
14
15
-
# Tutorial: Part 1 - Create resources for building a custom chat application with the Azure AI Foundry SDK
15
+
# Tutorial: Part 1 - Set up project and development environment to build a custom knowledge retrieval (RAG) app with the Azure AI Foundry SDK
16
16
17
17
18
-
In this tutorial, you use the Azure AI SDK (and other libraries) to build, configure, evaluate, and deploy a chat app for your retail company called Contoso Trek. Your retail company specializes in outdoor camping gear and clothing. The chat app should answer questions about your products and services. For example, the chat app can answer questions such as "which tent is the most waterproof?" or "what is the best sleeping bag for cold weather?".
18
+
In this tutorial, you use the Azure AI Foundry SDK (and other libraries) to build, configure, evaluate, and deploy a chat app for your retail company called Contoso Trek. Your retail company specializes in outdoor camping gear and clothing. The chat app should answer questions about your products and services. For example, the chat app can answer questions such as "which tent is the most waterproof?" or "what is the best sleeping bag for cold weather?".
19
19
20
20
This tutorial is part one of a three-part tutorial. This part one gets you ready to write code in part two and evaluate your chat app in part three. In this part, you:
21
21
@@ -95,10 +95,16 @@ In the Azure AI Studio, check for an Azure AI Search connected resource.
95
95
96
96
## Install packages
97
97
98
-
* Install `azure-ai-projects`(preview) and `azure-ai-inference` (preview), along with other required packages.
98
+
Install `azure-ai-projects`(preview) and `azure-ai-inference` (preview), along with other required packages.
99
+
100
+
1. First, create a file named **requirements.txt** in your project folder. Add the following packages to the file:
0 commit comments