Amazon Bedrock Studio, renamed to Amazon Bedrock IDE, is now available in Amazon SageMaker Unified Studio. Amazon Bedrock Studio will be available until February 28, 2025. You may access existing workspaces in this previous version through February 28, 2025, but you may not create new workspaces. To access the enhanced GA version of Amazon Bedrock Studio with additional features and capabilities, you can create a new Amazon SageMaker Unified Studio domain. To learn about Amazon Bedrock Studio IDE, see the documentation.
Create a guardrail component
You can create a guardrail as a component in a Amazon Bedrock Studio project. You can then add the guardrail component to a chat app. You can also create a guardrail component while you are creating a chat app. For an example, see Add a guardrail to your chat app.
Warning
The name and description of a guardrail component are visible to all members of the Amazon Bedrock Studio 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 guardrail component
-
Open your Amazon Bedrock Studio workspace.
-
Make sure that you are in Build mode, by choosing Build at the top right of the page.
-
In the Project dropdown list, choose the project that you want to add a guardrail to.
-
In the Components section, choose Create component and then Guardrail. The Create guardrail pane is shown.
-
For Guardrail name. enter a name for the guardrail.
-
For Guardrail description enter a description for the guardrail.
-
In Content filters do the following.
Select Enable content filters to turn on content filtering.
For Filter for prompts, choose the filters that you want to apply to prompts. For more information, see Content filters.
-
If you want the filter to apply to responses that the model generates, select Apply the same filters for responses.
In Blocked messsaging do the following:
-
For Blocked messaging for prompts enter a message to display when the guardrail blocks content in the prompt.
-
If you want to show a different message when the guardrail blocks content from a model's response, do the following:
Clear Apply the same message for blocked responses.
For Blocked messaging for responses, enter a message to display when the guardrail blocks content in the response from the model.
-
-
Add a denied topic filter by doing the following:
-
Choose Use advanced features.
-
Choose Denied topics.
-
Choose Add topic.
-
For Name, enter a name for the filter.
-
For Definition for topic, enter a definition for the content that you want to deny.
-
(Optional) To help guide the guardrail, do the folllowing:
Choose Sample phrases - optional.
For Sample phrases, enter a phrase.
-
Choose Add phrase.
Add up to four more phrases by repeating the previous two steps.
Choose Save.
For information about denied topics, see Denied topics.
-
-
Choose Create to create the guardrail.
-
Add the guardrail component to a chat app by doing Add a guardrail component to a chat app.