Include guardrails in your flow in Amazon Bedrock - Amazon Bedrock

Include guardrails in your flow in Amazon Bedrock

Amazon Bedrock Flows integrates with Amazon Bedrock Guardrails to let you identify and block or filter unwanted content in your flow. To learn how to apply guardrails to supported node types in a flow, see the following table:

Node type Console API
Prompt node When you create or update a flow, select the prompt node and specify the guardrail in the Configure section. When you define the prompt node in the nodes field in a CreateFlow or UpdateFlow request, include a guardrailConfiguration field in the PromptFlowNodeConfiguration.
Knowledge base node When you create or update a flow, select the knowledge base node and specify the guardrail in the Configure section. You can only include a guardrail when generating responses based on retrieved results. When you define the knowledge base node in the nodes field in a CreateFlow or UpdateFlow request, include a guardrailConfiguration field in the KnowledgeBaseFlowNodeConfiguration. You can only include a guardrail when using RetrieveAndGenerate so you must include a modelId.

For more information about guardrails, see Stop harmful content in models using Amazon Bedrock Guardrails.

For more information about node types, see Node types in flow.