Prompt flows for Amazon Bedrock - Amazon Bedrock

Prompt flows for Amazon Bedrock

Note

Prompt flows is in preview and is subject to change.

Prompt flows for Amazon Bedrock offers the ability for you to use supported foundation models (FMs) to build workflows by linking prompts, foundational models, and other AWS services to create end-to-end solutions.

With prompt flows, you can quickly build complex generative AI workflows using a visual builder, easily integrate with Amazon Bedrock offerings such as FMs, knowledge bases, and other AWS services such as AWS Lambda by transferring data between them, and deploying immutable workflows to move from testing to production in few clicks.

To see quotas for prompt flows, see Prompt flows quotas.

The following are some example tasks that you can build a prompt flow for in Amazon Bedrock:

  • Create and send an email invite – Create a prompt flow connecting a prompt node, knowledge base node, and Lambda 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 prompt flow queries a knowledge base to look up the email addresses of John Smith's extended team, and then sends the input to a Lambda 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 prompt 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.

  • Generate reports – Build a prompt flow to generate metrics for top products. The prompt flow looks for the sales metrics in a database, aggregates the metrics, generates a summary report for top product purchases, and publishes the report on the specified portal.

  • Ingest data from a specified dataset – Provide a prompt such as the following: Start ingesting new datasets added after 3/31 and report failures. The prompt flow starts preparing data for ingestion and keeps reporting on the status. After the data preparation is complete, the prompt flow starts the ingestion process filtering the failed data. After data ingestion is complete, the prompt flow summarizes the failures and publishes a failure report.

Flows for Amazon Bedrock makes it easy for you link foundation models (FMs), prompts, and other AWS services to quickly create, test, and run your prompt flows. You can manage prompt flows using the visual builder in the Amazon Bedrock console or through the APIs.

The general steps for creating, testing, and deploying a prompt flow are as follows:

Create the prompt flow:
  1. Specify a prompt flow name, description, and appropriate IAM permissions.

  2. Design your prompt flow by deciding the nodes you want to use.

  3. Create or define all the resources you require for each node. For example, if you are planning to use an AWS Lambda function, define the functions you need for the node to complete its task.

  4. Add nodes to your prompt flow, configure them, and create connections between the nodes by linking the output of a node to the input of another node in the prompt flow.

Test the prompt flow:
  1. Prepare the prompt flow, so that the latest changes apply to the working draft of the prompt flow, a version of the prompt flow that you can use to iteratively test and update your prompt flow

  2. Test the prompt flow by invoking it with sample inputs to see the outputs it yields.

  3. When you're satisfied with a prompt flow's configuration, you can create a snapshot of it by publishing a version. The version preserves prompt flow definition as it exists at the time of the creation. Versions are immutable because they act as a snapshot of the prompt flow at the time it was created.

Deploy the prompt flow
  1. Create an alias that points to the version of your prompt flow that you want to use in your application.

  2. Set up your application to make InvokeFlow requests to the alias. If you need to revert to an older version or upgrade to a newer one, you can change the routing configuration of the alias.