Amazon Bedrock Studio is in preview release and is subject to change.
Build a Prompt Flows app with Amazon Bedrock Studio
A Prompt Flows app let you link prompts, supported foundational models (FMS), and other units of work, such as a Knowledge Base, together and create generative AI workflows for end-to-end solutions. For example, you could create Prompt Flows apps to do the following.
-
Create and send an email invite – Create a flow connecting a prompt node, knowledge base node, and function node. Provide the following prompt to generate an email body:
Send invite to John Smith’s extended team for in-person documentation read for an hour at 2PM EST next Tuesday.
. After processing the prompt, the flow queries a knowledge base to look up the email addresses of John Smith's extended team, and then sends the input to a function to send the invite to all the team members in the list. -
Troubleshoot using the error message and the ID of the resource that is causing the error – The flow looks up the possible causes of the error from a documentation knowledge base, pulls system logs and other relevant information about the resource, and updates the faulty configurations and values for the resource.
Important
If your workspace was created before Amazon Bedrock Studio added support for Prompt Flows apps, you won't be able to create a Prompt Flows app until your administrator updates your workspace. Ask your administrator to follow the instructions at Update a workspace for Prompt management and Prompt flows.
In this section you create a Prompt Flows app that generates a playlist of music from a Knowledge Base of songs by fictional local bands.
To create a Prompt Flows app, you use the flow builder which is a tool in Amazon Bedrock Studio to build and edit prompt flow apps through a visual interface. You use the visual interface to drag and drop nodes onto the interface and configure inputs and outputs for these nodes to define your prompt flow.
In your prompt flow you can apply logical conditions to direct the output from a node to different destinations. You can then run the flow within Amazon Bedrock Studio and view the output.
The following list introduces you to the basic elements of a flow.
-
Prompt Flow – A prompt flow is a construct consisting of a name, description, permissions, a collection of nodes, and connections between nodes. When you run a prompt flow, the input to the flow is sent through each node of the prompt flow until the flow emits the final output from an output node.
-
Node – A node is a step inside a prompt flow. For each node, you configure its name, description, input, output, and any additional configurations. The configuration of a node differs based on its type.
For information about the types of nodes that Amazon Bedrock Studio supports, see Prompt Flow nodes available in Amazon Bedrock Studio.
-
Connection – There are two types of connections used in prompt flow apps:
-
A data connection is drawn between the output of one node (the source node) and the input of another node (the target node) and sends data from an upstream node to a downstream node. In the flow builder, data connections are solid lines.
-
A conditional connection is drawn between a condition in a condition node and a downstream node and sends data from the node that precedes the condition node to a downstream node if the condition is fulfilled. In the flow builder, conditional connections are dotted lines.
-
-
Expressions – An expression defines how to extract an input from the whole input entering a node. To learn how to write expressions, see Define inputs with expressions.