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/machine-learning/how-to-retrieval-augmented-generation-cloud-to-local.md
+16-13Lines changed: 16 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ ms.topic: conceptual
9
9
author: lgayhardt
10
10
ms.author: lagayhar
11
11
ms.reviewer: chenlujiao
12
-
ms.date: 10/08/2024
12
+
ms.date: 10/10/2024
13
13
ms.custom:
14
14
- prompt-flow
15
15
- ignite-2023
@@ -27,11 +27,10 @@ In this article, you learn how to transition RAG flows from your Azure Machine L
27
27
28
28
## Prerequisites
29
29
30
-
To complete the procedures in this article, you need the following prerequisites:
31
-
32
30
- Python 3.9 or above installed locally.
33
-
- The `promptflow` SDK and `promptflow-tools` installed by running `pip install promptflow promptflow-tools`.
34
-
- The `promptflow-vectordb` tool installed by running `pip install promptflow-vectordb`.
31
+
32
+
- The `promptflow` SDK and `promptflow-tools` packages installed by running `pip install promptflow promptflow-tools`.
33
+
- The `promptflow-vectordb` tool installed by running `pip install promptflow-vectordb[azure]`.
35
34
36
35
- Visual Studio Code with the **Python** and **Prompt flow** extensions installed.
37
36
@@ -43,11 +42,13 @@ To complete the procedures in this article, you need the following prerequisites
43
42
44
43
## Create the prompt flow
45
44
46
-
This tutorial uses the sample **Q&A on Your Data** RAG prompt flow. This flow contains a **lookup** node that uses the vector index lookup tool to search questions from the indexed docs. The index docs are stored in the workspace storage blob.
45
+
This tutorial uses the sample **Q&A on Your Data** RAG prompt flow, which contains a **lookup** node that uses the vector index lookup tool to search questions from the indexed docs stored in the workspace storage blob.
47
46
48
47
1. On the **Connections** tab of the Azure Machine Learning studio **Prompt flow** page, [set up a connection](prompt-flow/get-started-prompt-flow.md#set-up-connection) to your Azure OpenAI resource if you don't already have one.
49
48
50
-
1. Select **Create** on the Azure Machine Learning studio **Prompt flow** page, and on the **Create a new flow** screen, select **Clone** on the **Q&A on Your Data** tile to clone the prompt flow.
49
+
1. On the Azure Machine Learning studio **Prompt flow** page, select **Create**.
50
+
51
+
1. On the **Create a new flow** screen, select **Clone** on the **Q&A on Your Data** tile to clone the example prompt flow.
51
52
52
53
The cloned flow opens in the authoring interface.
53
54
@@ -71,14 +72,16 @@ This tutorial uses the sample **Q&A on Your Data** RAG prompt flow. This flow co
71
72
72
73
## Work with the flow in VS Code
73
74
74
-
The rest of this article details how to use the VS Code Prompt flow extension to edit the flow. If you don't want to use the Prompt flow extension, you can open the unzipped folder in any integrated development environment (IDE) and use the CLI to edit the files. For more information, see the [Prompt flow quick start](https://microsoft.github.io/promptflow/how-to-guides/quick-start.html#quick-start).
75
+
The rest of this article details how to use the VS Code Prompt flow extension to edit the flow. If you don't want to use the Prompt flow extension, you can open the unzipped folder in any integrated development environment (IDE) and use the CLI to edit the files. For more information, see [Prompt flow quick start](https://microsoft.github.io/promptflow/how-to-guides/quick-start.html#quick-start).
75
76
76
77
1. In VS Code with the Prompt flow extension enabled, open the unzipped prompt flow folder.
77
78
78
79
1. Select the **Prompt flow** icon in the left menu to open the Prompt flow management pane.
79
80
80
81
:::image type="content" source="./media/how-to-retrieval-augmented-generation-cloud-to-local/vs-code-extension-toolbar.png" alt-text="Screenshot of the prompt flow VS Code extension icon in the VS Code left menu.":::
81
82
83
+
1. If necessary, select **Install dependencies** and make sure the correct Python interpreter is selected and the **promptflow** and **promptflow-tools** packages are installed.
84
+
82
85
### Create the connections
83
86
84
87
To use the vector index lookup tool locally, you need to create the same connections to the vector index service as you did in the cloud.
@@ -93,21 +96,20 @@ To use the vector index lookup tool locally, you need to create the same connect
93
96
94
97
1. Select the **Create connection** link at the bottom of the file. The app runs to create the connection. When prompted, enter the API key for your connection in the terminal.
95
98
96
-
> [!NOTE]
97
-
> You might also need to create a new Azure AI Search connection for the new version of the local vector index lookup tool to use. For more information, see [Index Lookup tool for Azure Machine Learning (Preview)](prompt-flow/tools-reference/index-lookup-tool.md) and [Package tool isn't found error](prompt-flow/tools-reference/troubleshoot-guidance.md#package-tool-isnt-found-error-occurs-when-you-update-the-flow-for-a-code-first-experience).
99
+
1. Also create a new Azure AI Search connection for the new version of the local vector index lookup tool to use. For more information, see [Index Lookup tool for Azure Machine Learning (Preview)](prompt-flow/tools-reference/index-lookup-tool.md) and [Package tool isn't found error](prompt-flow/tools-reference/troubleshoot-guidance.md#package-tool-isnt-found-error-occurs-when-you-update-the-flow-for-a-code-first-experience).
98
100
99
101
### Check the files
100
102
101
103
1. Open the *flow.dag.yaml* file and select the **Visual editor** link at the top of the file.
102
104
103
105
:::image type="content" source="./media/how-to-retrieval-augmented-generation-cloud-to-local/visual-editor.png" alt-text="Screenshot of the flow dag yaml file with the visual editor highlighted in VS Code." lightbox = "./media/how-to-retrieval-augmented-generation-cloud-to-local/visual-editor.png":::
104
106
105
-
1. In the visual editor version of *flow.dag.yaml*, scroll to the **lookup** node, which consumes the vector index lookup tool in this flow. Check the path of your indexed docs you specify. All publicly accessible paths are supported.
107
+
1. In the visual editor version of *flow.dag.yaml*, scroll to the **lookup** node, which consumes the vector index lookup tool in this flow. Under **mlindex_content**, check the paths and connections for your **embeddings** and **index**.
106
108
107
-
:::image type="content" source="./media/how-to-retrieval-augmented-generation-cloud-to-local/search-blob.png" alt-text="Screenshot of search question from indexed docs node in VS Code showing the inputs.":::
109
+
:::image type="content" source="./media/how-to-retrieval-augmented-generation-cloud-to-local/search-blob.png" alt-text="Screenshot of indexed docs node in VS Code showing the inputs.":::
108
110
109
111
> [!NOTE]
110
-
> If your indexed docs are a data asset in your workspace, local consumption requires Azure authentication. Make sure you're signed in to Azure and connected to your Azure Machine Learning workspace.
112
+
> If your indexed docs are a data asset in your workspace, local consumption requires Azure authentication. Make sure you're signed in to the correct Azure tenant and connected to your Azure Machine Learning workspace.
111
113
112
114
1. Select the **Edit** icon in the **queries** input box, which opens the raw *flow.dag.yaml* file to the `lookup` node definition.
113
115
@@ -137,4 +139,5 @@ For more information about batch run and evaluation, see [Submit flow run to Azu
137
139
138
140
-[Get started with prompt flow](prompt-flow/get-started-prompt-flow.md)
139
141
-[Create a vector index in an Azure Machine Learning prompt flow (preview)](how-to-create-vector-index.md)
142
+
-[Index Lookup tool for Azure AI Studio](/azure/ai-studio/how-to/prompt-flow-tools/index-lookup-tool)
140
143
-[Integrate prompt flow with LLM-based application DevOps](prompt-flow/how-to-integrate-with-llm-app-devops.md)
0 commit comments