AWS Guardrails

AWS Guardrails protection mechanisms provide configurable safeguards to help safely build generative AI applications at scale. They use automatic reasoning to help prevent factual errors caused by hallucinations. They can block over 85% of unwanted and harmful content. They filter more than 75% of hallucinated responses from RAG and summarization use-case models.

AWS Guardrails features include

  • Content filtering (preventing sexual/offensive, violent, etc.)

  • Preventing going off-topic

  • Word blocking

  • Sensitive data removal

  • Hallucination prevention

Operation step instructions

Step 1: Configure Config (name, description, what message to return if blocked)

Other case settings

Step 2: Set content filtering (User Input, Assistant Response)

You can specify harm levels, and even include incoming Images

Other case settings

Step 3: Reject topics to prevent going off-topic

You can add descriptions, definitions, and provide examples to prevent off-topic generation

Other case settings

Step 4: Strict word blocking (forbid swearing or mentioning XXX)

Example: If you don't want the model to mention Voldemort, add a word; multiple words can be provided at once (csv, txt, ctrl + c).

Other case settings

Step 5: Sensitive data (PII) blocking and regex replacement

Several patterns are preset, such as: credit card, license plate, national ID number, etc.

Other case settings

Regex replacement can be used in the AI assistant's replies to replace unwanted structures with desired regular expressions.

Step 6: Prevent hallucinations, and block replies based on a relevance threshold

Other case settings

Last updated

Was this helpful?