After you create a guardrail, a working draft (DRAFT
)
version is available. The working draft is a version of the guardrail that you can
continually edit and iterate upon until you reach a satisfactory configuration for your use
case. You can test and benchmark the working draft or other versions of the guardrail to
ensure that the configurations meet your use-case requirements. Edit configurations in the working draft
and test different prompts to see how well the guardrail evaluates and intercepts the
prompts or responses.
When you are satisfied with the configuration, you can then create a version of the guardrail, which acts as a snapshot of the configurations of the working draft when you create the version. You can use versions to streamline guardrails deployment to production applications every time you make modifications to your guardrails. Any changes to the working draft or a new version created will not be reflected in your generative AI application until you specifically use the new version in the application.
To test a guardrail to see if blocks harmful content
-
Sign in to the AWS Management Console using an IAM role with Amazon Bedrock permissions, and open the Amazon Bedrock console at https://console.aws.amazon.com/bedrock/
. -
Choose Guardrails from the left navigation pane. Then, select a guardrail in the Guardrails section.
-
A test window appears on the right. You have the following options in the test window:
-
By default, the working draft of the guardrail is used in the test window. To test a different version of the guardrail, choose Working draft at the top of the test window and then select the version.
-
To select a model, choose Select model. After you make a choice, select Apply. To change the model, choose Change.
-
Enter a prompt in the Prompt box.
-
To elicit a model response, select Run.
-
The model returns a response in the Final response box (that may be modified by the guardrail). If the guardrail blocks or filters the prompt or model response, a message appears under Guardrail check that informs you how many violations the guardrail detected.
-
To view the topics or harmful categories in the prompt or response that were recognized and allowed past the filter or blocked by it, select View trace.
-
Use the Prompt and Model response tabs to view the topics or harmful categories that were filtered or blocked by the guardrail.
-
You can also test the guardrail in the Text playground. Select the playground and select the Guardrail in the Configurations pane before testing prompts.