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/prompt-flow/get-started-prompt-flow.md
+23-21Lines changed: 23 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,17 +49,17 @@ A connection helps securely store and manage secret keys or other sensitive cred
49
49
50
50
:::image type="content" source="./media/get-started-prompt-flow/create-aoai-connection.png" alt-text="Screenshot of the chat playground showing the Key and Endpoint for an Azure OpenAI resource." lightbox = "./media/get-started-prompt-flow/create-aoai-connection.png":::
51
51
52
-
For more information about Microsoft Entra ID authentication, see [How to configure Azure OpenAI Service with Microsoft Entra ID authentication](/azure/ai-services/openai/how-to/managed-identity).
52
+
For information about Microsoft Entra ID authentication, see [How to configure Azure OpenAI Service with Microsoft Entra ID authentication](/azure/ai-services/openai/how-to/managed-identity).
53
53
54
54
1. After you fill out all fields, select **Save** to create the connection.
55
55
56
-
1. The connection must be associated with a deployment before you can create and run the LLM nodes in the example flow. To create the deployment, see [Deploy a model](/azure/ai-services/openai/how-to/create-resource#deploy-a-model).
56
+
1. The connection must be associated with a deployment before you can run the LLM nodes in the example flow. To create the deployment, see [Deploy a model](/azure/ai-services/openai/how-to/create-resource#deploy-a-model).
57
57
58
58
## Create and develop your prompt flow
59
59
60
60
In the **Flows** tab of the **Prompt flow** home page, select **Create** to create the prompt flow. The **Create a new flow** page shows flow types you can create, built-in samples you can clone to create a flow, and ways to import a flow.
61
61
62
-
### Clone from sample
62
+
### Clone from a sample
63
63
64
64
In the **Explore gallery**, you can browse the built-in samples and select **View detail** on any tile to preview whether it's suitable for your scenario.
65
65
@@ -69,11 +69,11 @@ To clone the sample, select **Clone** on the **Web Classification** tile.
69
69
70
70
:::image type="content" source="./media/get-started-prompt-flow/sample-in-gallery.png" alt-text="Screenshot of create from galley highlighting web classification." lightbox = "./media/get-started-prompt-flow/sample-in-gallery.png":::
71
71
72
-
The **Clone flow** pane shows the location to store your flow within your workspace fileshare storage. You can customize the folder name if you want. Then select **Clone**.
72
+
The **Clone flow** pane shows the location to store your flow within your workspace fileshare storage. You can customize the folder if you want. Then select **Clone**.
73
73
74
-
The clone flow authoring page opens. You can select the **Edit** pencil icon to edit flow details like name, description, and tags.
74
+
The cloned flow opens in the authoring UI. You can select the **Edit** pencil icon to edit flow details like name, description, and tags.
75
75
76
-
### Start compute session
76
+
### Start the compute session
77
77
78
78
A compute session is necessary for flow execution. The compute session manages the computing resources required for the application to run, including a Docker image that contains all necessary dependency packages.
79
79
@@ -83,11 +83,11 @@ On the flow authoring page, start a compute session by selecting **Start compute
83
83
84
84
### Inspect the flow authoring page
85
85
86
-
While the compute session is starting, take a look at the parts of the flow authoring page.
86
+
The compute session can take a few minutes to start. While the compute session is starting, view the parts of the flow authoring page.
87
87
88
-
- The **Flow** or *flatten* view on the left side of the page is the main working area, where you can author the flow by adding nodes, editing and running nodes inline, or editing the prompt. In the **Inputs** and **Outputs** sections, you can view, add, and edit inputs and outputs.
88
+
- The **Flow** or *flatten* view on the left side of the page is the main working area, where you can author the flow by adding or removing nodes, editing and running nodes inline, or editing prompts. In the **Inputs** and **Outputs** sections, you can view, add or remove, and edit inputs and outputs.
89
89
90
-
The inputs and outputs are already set when you clone a flow. The flow input schema for the Web Classification sample is `name: url; type: string`, a URL of string type. You can change the preset input value to another value manually, for example `https://www.imdb.com`.
90
+
When you cloned the current Web Classification sample, the inputs and outputs were already set. The input schema for the flow is `name: url; type: string`, a URL of string type. You can change the preset input value to another value like `https://www.imdb.com` manually.
91
91
92
92
-**Files** at top right shows the folder and file structure of the flow. Each flow folder contains a *flow.dag.yaml* file, source code files, and system folders. You can create, upload, or download files for testing, deployment, or collaboration.
93
93
@@ -101,7 +101,9 @@ For this sample, the input is a URL to classify. The flow uses a Python script t
101
101
102
102
### Set up LLM nodes
103
103
104
-
For each LLM node, you need to select a **Connection** to set the LLM API keys. Depending on the connection type, you must select a **deployment_name** or a model from the dropdown list. For an Azure OpenAI connection, you must select a deployment. If you don't have a deployment, create one in the Azure OpenAI portal by following instructions at [Deploy a model](/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal#deploy-a-model).
104
+
For each LLM node, you need to select a **Connection** to set the LLM API keys. Select your Azure OpenAI connection.
105
+
106
+
Depending on the connection type, you must select a **deployment_name** or a model from the dropdown list. For an Azure OpenAI connection, select a deployment. If you don't have a deployment, create one in the Azure OpenAI portal by following instructions at [Deploy a model](/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal#deploy-a-model).
105
107
106
108
>[!NOTE]
107
109
>If you use an OpenAI connection rather than an Azure OpenAI connection, you need to select a model rather than a deployment in the **Connection** field.
@@ -110,9 +112,9 @@ For this example, make sure the API type is **chat**, because the provided promp
110
112
111
113
:::image type="content" source="./media/get-started-prompt-flow/select-a-connection.png" alt-text="Screenshot of Web classification showing the connection dropdown." lightbox = "./media/get-started-prompt-flow/select-a-connection.png":::
112
114
113
-
Set up connections for both LLM nodes in the flow, **summarize_text_content** and **classify_with_llm**.
115
+
Set up connections for both of the LLM nodes in the flow, **summarize_text_content** and **classify_with_llm**.
114
116
115
-
### Run single node
117
+
### Run a single node
116
118
117
119
To test and debug a single node, select the **Run** icon at the top of a node in the **Flow** view. You can expand **Inputs** and change the flow input URL to test the node behavior for different URLs.
118
120
@@ -126,15 +128,15 @@ Run **fetch_text_content_from_url** and then run **summarize_text_content** to c
126
128
127
129
### Run the whole flow
128
130
129
-
To test and debug the whole flow, select **Run** at the top of the screen. You can expand **Inputs** and change the flow input URL to test how the flow behaves for different URLs.
131
+
To test and debug the whole flow, select **Run** at the top of the screen. You can change the flow input URL to test how the flow behaves for different URLs.
130
132
131
133
:::image type="content" source="./media/get-started-prompt-flow/run-flow.png" alt-text="Screenshot of Web classification showing a whole run and highlighting the run button." lightbox = "./media/get-started-prompt-flow/run-flow.png":::
132
134
133
135
Check the run status and output of each node.
134
136
135
-
### Check flow output
137
+
### View flow outputs
136
138
137
-
You can also set flow output to check outputs of multiple nodes in one place. Flow output helps you:
139
+
You can also set flow outputs to check outputs of multiple nodes in one place. Flow outputs help you:
138
140
139
141
- Check bulk test results in a single table.
140
142
- Define evaluation interface mapping.
@@ -156,19 +158,19 @@ In the cloned sample, the **category** and **evidence** flow outputs are already
156
158
157
159
## Test and evaluate
158
160
159
-
After the flow runs successfully with a single row of data, test whether it performs well with a large set of data. You can run a bulk test and choose some evaluation methods, and then check the results.
161
+
After the flow runs successfully with a single row of data, test whether it performs well with a large set of data. You can run a bulk test and optionally add an evaluation flow, and then check the results.
160
162
161
163
You need to prepare test data first. Azure Machine Learning supports CSV, TSV, and JSONL file formats for data.
162
164
163
165
- Go to GitHub and download [data.csv](https://github.com/Azure/azureml-assets/blob/main/assets/promptflow/data/web-classification/data.csv), the golden dataset for the Web Classification sample.
164
166
165
-
Use the **Batch run & Evaluate** wizard to submit a batch run and optionally to select an evaluation method. Evaluation methods are also flows, which use Python or LLM to calculate metrics like accuracy and relevance score.
167
+
Use the **Batch run & Evaluate** wizard to configure and submit a batch run and optionally an evaluation method. Evaluation methods are also flows, which use Python or LLM to calculate metrics like accuracy and relevance score.
166
168
167
169
1. Select **Evaluate** from the top menu of your flow authoring page.
168
170
169
171
1. On the **Basic settings** screen, change the **Run display name** if desired, add an optional **Run description** and **Tags**, and then select **Next**.
170
172
171
-
1. On the **Batch run settings** screen of the **Batch run & Evaluate** wizard, select **Add new data**. On the **Add data** screen, provide a **Name** for the dataset, select **Browse** to upload the *data.csv* file you downloaded, and then select **Add**.
173
+
1. On the **Batch run settings** screen, select **Add new data**. On the **Add data** screen, provide a **Name** for the dataset, select **Browse** to upload the *data.csv* file you downloaded, and then select **Add**.
172
174
173
175
After you upload the data, or if your workspace has another dataset you want to use, search for and choose the dataset from the dropdown list to preview the first five rows.
174
176
@@ -186,7 +188,7 @@ Use the **Batch run & Evaluate** wizard to submit a batch run and optionally to
186
188
187
189
:::image type="content" source="./media/get-started-prompt-flow/accuracy-configure.png" alt-text="Screenshot of Web classification showing the batch run and evaluate on the evaluation settings." lightbox = "./media/get-started-prompt-flow/accuracy-configure.png":::
188
190
189
-
1. Select **Review + submit** and then select **Submit** to submit a batch run and the selected evaluation.
191
+
1. Select **Review + submit** and then select **Submit** to submit a batch run and the selected evaluation method.
190
192
191
193
### Check results
192
194
@@ -230,11 +232,11 @@ Put the URL you want to test in the input box, and select **Test**. You see the
230
232
231
233
## Clean up resources
232
234
233
-
To conserve compute resources and charges, you can stop your compute session if you're not going to use it anymore right now. Select the running session and then select **Stop compute session**.
235
+
To conserve compute resources and costs, you can stop your compute session if you're done using it for now. Select the running session and then select **Stop compute session**.
234
236
235
237
You can also stop a compute instance by selecting **Compute** from the studio left navigation, selecting your compute instance in the **Compute instances** list, and selecting **Stop**.
236
238
237
-
If you don't plan to use any of the resources that you created in this tutorial, you can delete them so you don't incur any charges. In the Azure portal, search for and select **Resource groups**. Select the resource group from the list, and then select **Delete resource group** from the top menu on the resource group's page.
239
+
If you don't plan to use any of the resources that you created in this tutorial, you can delete them so they don't incur charges. In the Azure portal, search for and select **Resource groups**. From the list, select the resource group that contains the resources you created, and then select **Delete resource group** from the top menu on the resource group page.
0 commit comments