Create a prompt with Prompt Management - Amazon Bedrock Studio

Amazon Bedrock Studio is in preview release and is subject to change.

Create a prompt with Prompt Management

When you create a prompt, you select a model for it and can modify inference parameters. To adjust the prompt for different use cases, you can include up to 5 variables.

You define variables in a prompt by surrounding them in double curly braces {{variable}}. For example, the following prompt defines two variables, topic and location.

Generate a playlist of songs about {{topic}}. Make sure each song is by artists from {{location}}.

When you run the prompt, you supply values for the variables. Bedrock Studio fills the prompt with the variable values and then passes the prompt to the model. For example, if you supply a topic value of castle and a location value of Wales, the model generates a playlist of songs about castles by Welsh artists.

You initially create a draft of your prompt. You can then test your prompt by inputing test values for the variables and running the prompt. These values are only for temporary testing and aren't saved to your prompt.

When you are ready, you can create a version of your prompt for use in a Prompt Flows app. You can create multiple versions of a prompt, but you can only edit the latest version. When you delete a prompt, it deletes all versions of the prompt.

Warning

The name and description of a prompt are visible to all members of the Amazon Bedrock workspace. We recommend that you don't store sensitive data in these two fields. Project-based access control ensures only authorized members of a project can edit the name, description, and other fields in the project.

To create a prompt
  1. Open your Amazon Bedrock Studio workspace.

  2. Make sure that you are in Build mode, by choosing Build at the top right of the page.

  3. In the Project dropdown list, choose the project that you want to use or create a new project.

  4. Open the navigation pane by choosing the menu at the top left of the page.

  5. In Project details choose Prompts.

  6. Choose Create prompt to start creating a prompt.

  7. Choose the prompt name (Untitled Prompt-nnnn) and enter a name for the prompt.

  8. In the Configs section, do the following:

    1. For Model, select the model that you want to use.

    2. (Optional) In Parameters, set the inference parameters values that you want to use. If you don't make changes, the prompt uses the default values for the model. For more information, see Influence model responses with inference parameters.

    3. (Optional) In Prompt details enter a description for your prompt.

  9. In the center pane, enter Generate a playlist of songs about {{topic}}. Make sure each song is by artists from {{location}}. in the Prompt message text box.

  10. (Optional) Choose Save draft to save a draft of your prompt.

  11. Test your prompt in the right pane by doing the following:

    1. For Test variable values, enter the following values for your prompt variables.

      • topic– Enter castles.

      • location– Enter Wales.

    2. Choose Run to test your prompt. You should see your prompt, with populated variables, in the Test section. Bedrock Studio displays the response from the model underneath your prompt.

    3. (Optional) Choose Reset to clear previously shown test results.

    4. Continue to make changes to the prompt and variables until you are satisfied with the results. You can choose Reset to clear previously shown test results.

  12. When you are ready, choose Create version to create a version of your prompt. If the button is disabled, wait until Bedrock Studio completes saving the prompt, which should take up to a minute.

  13. Add your prompt to a Prompt Flows app.