Skip to content

Commit c75b512

Browse files
committed
changes
1 parent bf082d2 commit c75b512

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

articles/machine-learning/how-to-retrieval-augmented-generation-cloud-to-local.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.topic: conceptual
99
author: lgayhardt
1010
ms.author: lagayhar
1111
ms.reviewer: chenlujiao
12-
ms.date: 10/08/2024
12+
ms.date: 10/10/2024
1313
ms.custom:
1414
- prompt-flow
1515
- ignite-2023
@@ -27,11 +27,10 @@ In this article, you learn how to transition RAG flows from your Azure Machine L
2727
2828
## Prerequisites
2929

30-
To complete the procedures in this article, you need the following prerequisites:
31-
3230
- 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]`.
3534

3635
- Visual Studio Code with the **Python** and **Prompt flow** extensions installed.
3736

@@ -43,11 +42,13 @@ To complete the procedures in this article, you need the following prerequisites
4342

4443
## Create the prompt flow
4544

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.
4746

4847
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.
4948

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.
5152

5253
The cloned flow opens in the authoring interface.
5354

@@ -71,14 +72,16 @@ This tutorial uses the sample **Q&A on Your Data** RAG prompt flow. This flow co
7172

7273
## Work with the flow in VS Code
7374

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).
7576

7677
1. In VS Code with the Prompt flow extension enabled, open the unzipped prompt flow folder.
7778

7879
1. Select the **Prompt flow** icon in the left menu to open the Prompt flow management pane.
7980

8081
:::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.":::
8182

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+
8285
### Create the connections
8386

8487
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
9396

9497
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.
9598

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).
98100

99101
### Check the files
100102

101103
1. Open the *flow.dag.yaml* file and select the **Visual editor** link at the top of the file.
102104

103105
:::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":::
104106

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**.
106108

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.":::
108110

109111
> [!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.
111113
112114
1. Select the **Edit** icon in the **queries** input box, which opens the raw *flow.dag.yaml* file to the `lookup` node definition.
113115

@@ -137,4 +139,5 @@ For more information about batch run and evaluation, see [Submit flow run to Azu
137139

138140
- [Get started with prompt flow](prompt-flow/get-started-prompt-flow.md)
139141
- [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)
140143
- [Integrate prompt flow with LLM-based application DevOps](prompt-flow/how-to-integrate-with-llm-app-devops.md)
2.49 KB
Loading

0 commit comments

Comments
 (0)