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/ai-foundry/how-to/flow-develop.md
+19-18Lines changed: 19 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ ms.custom:
10
10
- ignite-2024
11
11
- hub-only
12
12
ms.topic: how-to
13
-
ms.date: 01/10/2025
13
+
ms.date: 09/03/2025
14
14
ms.reviewer: none
15
15
ms.author: lagayhar
16
16
author: lgayhardt
@@ -47,7 +47,7 @@ In this article, you learn how to create and develop your first prompt flow in A
47
47
- Use the **Add role assignment** page to add yourself as a member.
48
48
- Select **Review + assign** to review the assignment.
49
49
- Select **Review + assign** to assign the role.
50
-
50
+
51
51
## Create and develop your Prompt flow
52
52
53
53
You can create a flow by either cloning the samples available in the gallery or creating a flow from scratch. If you already have flow files in local or file share, you can also import the files to create a flow.
@@ -66,12 +66,12 @@ To create a prompt flow from the gallery in Azure AI Foundry portal:
66
66
:::image type="content" source="../media/prompt-flow/create-standard-flow.png" alt-text="Screenshot of selecting and creating a standard flow." lightbox="../media/prompt-flow/create-standard-flow.png":::
67
67
68
68
1. The prompt flow authoring page opens. Select **Start compute session** to have a compute session running for the flow.
69
-
1. You can start authoring your flow now. By default you see a sample flow. This example flow has nodes for the LLM and Python tools.
69
+
1. You can start authoring your flow now. By default you see a sample flow. This example flow has nodes for the LLM and Python tools.
70
70
71
71
:::image type="content" source="../media/prompt-flow/create-flow-in-out.png" alt-text="Screenshot of flow input and output on the edit prompt flow page." lightbox="../media/prompt-flow/create-flow-in-out.png":::
72
72
73
73
> [!NOTE]
74
-
> The graph view for visualization only. It shows the flow structure you're developing. You cannot edit the graph view directly, but you can zoom in, zoom out, and scroll. You can select a node in the graph view to highlight and navigate to the node in the tool edit view.
74
+
> The graph view for visualization only. It shows the flow structure you're developing. You can't edit the graph view directly, but you can zoom in, zoom out, and scroll. You can select a node in the graph view to highlight and navigate to the node in the tool edit view.
75
75
76
76
1. Optionally, you can add more tools to the flow. The visible tool options are **LLM**, **Prompt**, and **Python**. To view more tools, select **+ More tools**.
77
77
@@ -129,17 +129,24 @@ If the condition isn't met, the node is skipped. The node status is shown as "By
129
129
130
130
You can test the flow in two ways:
131
131
132
-
- Run **single node**.
133
-
- To run a single node, select the **Run icon** on a node in the default view. Once running is completed, you can quickly check result in **node output section**.
134
-
132
+
- Run single node:
133
+
- To run a single node, select the **Run**icon on a node in the default view. Once running is completed, you can quickly check result in node *Outputs* section.
134
+
n
135
135
:::image type="content" source="../media/prompt-flow/node-card-run.png" alt-text="Screenshot shows the run button in the node card.":::
136
136
137
-
- Run **the whole flow**.
138
-
- To run the whole flow, select the **Run button** at the right top.
137
+
- Run the whole flow:
138
+
- To run the whole flow, select the **Run** button at the right top.
139
139
140
140
#### View test result and trace (preview)
141
141
142
-
For the whole flow run, after you execute the flow, you can see the run status in the run banner. Then you can select **View trace** to view the trace for checking the result and observing the flow execution, where you can see the input and output of the whole flow and each node, along with more detailed information for debugging. It's available during the running and after the run is completed.
142
+
Tracing is disabled by default, to enable tracing you need to set the environment variable `PF_DISABLE_TRACING` to `false`. One way you can do this is by adding the following to the python node:
143
+
144
+
```python
145
+
import os
146
+
os.environ["PF_DISABLE_TRACING"] ="false"
147
+
```
148
+
149
+
For the whole flow run, after you execute the flow, you can see the run status in the run banner. To view the trace for checking the result and observing the flow execution, you can select **View outputs** and then select the **trace** tab. You can see the input and output of the whole flow and each node, along with more detailed information for debugging. It's available during the running and after the run is completed.
143
150
144
151
##### Understand the trace view
145
152
@@ -152,12 +159,6 @@ Select the **Trace** tab on the Outputs screen to see a graph that provides info
152
159
>
153
160
> To learn more about span types, see [Trace span](https://microsoft.github.io/promptflow/reference/trace-span-spec-reference.html).
154
161
155
-
After the flow run is completed, for checking the results, you can select the **View test results** button to check all historical run records in a list. By default, the run records created in the last 7 days are displayed. You can select the **Filter** to change the condition.
156
-
157
-
:::image type="content" source="../media/prompt-flow/authoring-test-result.png" alt-text="Screenshot of flow test result."lightbox="../media/prompt-flow/authoring-test-result.png":::
158
-
159
-
You can also select on the **Name** of the run record to view the detailed information in trace view.
160
-
161
162
## Develop a chat flow
162
163
163
164
Chat flow is designed for conversational application development, building upon the capabilities of standard flow and providing enhanced support for chat inputs/outputs and chat history management. With chat flow, you can easily create a chatbot that handles chat input and output.
@@ -172,7 +173,7 @@ The most important elements that differentiate a chat flow from a standard flow
172
173
-**Chat history**: Chat history is the record of all interactions between the user and the chatbot, including both user inputs and AI-generated outputs. Maintaining chat history is essential for keeping track of the conversation context and ensuring the AI can generate contextually relevant responses.
173
174
-**Chat output**: Chat output refers to the AI-generated messages that are sent to the user in response to their inputs. Generating contextually appropriate and engaging chat output is vital for a positive user experience.
174
175
175
-
A chat flow can have multiple inputs, chat history and chat input are **required** in chat flow.
176
+
A chat flow can have multiple inputs, chat history, and chat input are **required** in chat flow.
176
177
177
178
- In the chat flow inputs section, a flow input can be marked as chat input. Then you can fill the chat input value by typing in the chat box.
178
179
- Prompt flow can help user to manage chat history. The `chat_history` in the Inputs section is reserved for representing Chat history. All interactions in the chat box, including user chat inputs, generated chat outputs, and other flow inputs and outputs, are automatically stored in chat history. User can't manually set the value of `chat_history` in the Inputs section. It's structured as a list of inputs and outputs:
@@ -207,7 +208,7 @@ A chat flow can have multiple inputs, chat history and chat input are **required
207
208
```
208
209
209
210
> [!NOTE]
210
-
> The capability to automatically save or manage chat history is a feature on the authoring page when conducting tests in the chat box. For batch runs, it's necessary for users to include the chat history within the batch run dataset. If there's no chat history available for testing, simply set the chat_history to an empty list `[]` within the batch run dataset.
211
+
> The capability to automatically save or manage chat history is a feature on the authoring page when conducting tests in the chat box. For batch runs, it's necessary for users to include the chat history within the batch run dataset. If there's no chat history available for testing, set the chat_history to an empty list `[]` within the batch run dataset.
0 commit comments