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
+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
@@ -27,16 +27,16 @@ In this article, you learn how to transition RAG flows from your Azure Machine L
27
27
28
28
## Prerequisites
29
29
30
-
- Python 3.9 or above installed locally.
30
+
- Python installed locally
31
31
32
-
- The `promptflow` SDK and `promptflow-tools` packages installed by running<br>`pip install promptflow promptflow-tools`.
33
-
- The `promptflow-vectordb` tool installed by running<br>`pip install promptflow-vectordb`.
32
+
- The **promptflow** SDK and **promptflow-tools** packages installed by running<br>`pip install promptflow promptflow-tools`
33
+
- The **promptflow-vectordb** tool installed by running<br>`pip install promptflow-vectordb`
34
34
35
-
- Visual Studio Code with the **Python** and **Prompt flow** extensions installed.
35
+
- Visual Studio Code with the **Python** and **Prompt flow** extensions installed
36
36
37
37
:::image type="content" source="./media/how-to-retrieval-augmented-generation-cloud-to-local/vs-code-extension.png" alt-text="Screenshot of the prompt flow VS Code extension in the marketplace.":::
38
38
39
-
- An [Azure OpenAI account resource](/azure/ai-services/openai/how-to/create-resource#create-a-resource) that has [model deployments](/azure/ai-services/openai/how-to/create-resource#deploy-a-model) for both **chat** and **text-embedding-ada**.
39
+
- An [Azure OpenAI account resource](/azure/ai-services/openai/how-to/create-resource#create-a-resource) that has [model deployments](/azure/ai-services/openai/how-to/create-resource#deploy-a-model) for both **chat** and **text-embedding-ada**
40
40
41
41
- A [vector index created](how-to-create-vector-index.md) in Azure Machine Learning studio for the example prompt flow to use.
42
42
@@ -80,7 +80,7 @@ The rest of this article details how to use the VS Code Prompt flow extension to
80
80
81
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.":::
82
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.
83
+
1.Select **Install dependencies**in the management pane and make sure the correct Python interpreter is selected, and the **promptflow** and **promptflow-tools** packages are installed.
84
84
85
85
### Create the connections
86
86
@@ -96,7 +96,7 @@ To use the vector index lookup tool locally, you need to create the same connect
96
96
97
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.
98
98
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).
99
+
1.If you used an Azure AI Search index as the data source for your vector index, also create a new Azure AI Search connection for 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).
100
100
101
101
### Check the files
102
102
@@ -117,13 +117,16 @@ To use the vector index lookup tool locally, you need to create the same connect
117
117
118
118
:::image type="content" source="./media/how-to-retrieval-augmented-generation-cloud-to-local/search-tool.png" alt-text="Screenshot of the tool section of the lookup node.":::
119
119
120
-
1. Scroll to the **generate_prompt_context** node, and in the raw *flow.dag.yaml* file, select the **Open code file** link.
120
+
>[!NOTE]
121
+
>If you have any issues with the local `promptflow_vectordb` tool, see [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) and [Migrate from legacy tools to the Index Lookup tool](/azure/ai-studio/how-to/prompt-flow-tools/index-lookup-tool#migrate-from-legacy-tools-to-the-index-lookup-tool) for troubleshooting.
122
+
123
+
1. Scroll to the **generate_prompt_context** node, and in the raw *flow.dag.yaml* file, select the **Open code file** link.
121
124
122
125
1. In the Python code file, make sure the package name of the vector tool is `promptflow_vectordb`.
123
126
124
127
:::image type="content" source="./media/how-to-retrieval-augmented-generation-cloud-to-local/generate-node.png" alt-text="Screenshot of the Python code file with the vector tool package name highlighted.":::
125
128
126
-
1. Scroll to the **answer_the_question_with_context** node and make sure the connection is the same as the local connection you created. Check the **deployment_name**, which is the model you use here for the embedding.
129
+
1. Scroll to the **answer_the_question_with_context** node and make sure it uses the local connection you created. Check the **deployment_name**, which is the model you use here for the embedding.
127
130
128
131
:::image type="content" source="./media/how-to-retrieval-augmented-generation-cloud-to-local/answer-connection.png" alt-text="Screenshot of answer the question with context node with the connection highlighted.":::
0 commit comments