Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions responsible_ai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,26 @@ This repository contains pre-built examples to help customers get started with R

## Contents

- [bedrock-guardrails](./bedrock-guardrails) - Examples highlighting how Amazon Bedrock Guardrails can be used.
- [tdd-guardrail](./tdd-guardrails) - Explore a solution that automates building guardrails using a test-driven development approach.
### [bedrock-guardrails](./bedrock-guardrails)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit concerned that this added detail makes the doc more effort to maintain, while still not being complete (what about the 4 other folders?)

Suggest to include entries for the other folders under responsible-ai, and consider whether the value-maintenance trade-off is good for listing every notebook vs giving general folder-level bullets as before.


Examples highlighting how Amazon Bedrock Guardrails can be used to implement safeguards for generative AI applications.

| Notebook | Description |
|----------|-------------|
| [guardrails-api.ipynb](./bedrock-guardrails/guardrails-api.ipynb) | Create, update, version, and test guardrails using the Bedrock Python SDK. Covers topic policies, content filters, word filters, PII detection, and contextual grounding. |
| [bedrock_guardrails_apply_guardrail_api.ipynb](./bedrock-guardrails/bedrock_guardrails_apply_guardrail_api.ipynb) | Use the ApplyGuardrail API to evaluate text independently of model invocation. Demonstrates topic-based blocking and contextual grounding for hallucination detection. |
| [Apply_Guardrail_with_Streaming_and_Long_Context.ipynb](./bedrock-guardrails/Apply_Guardrail_with_Streaming_and_Long_Context.ipynb) | Apply guardrails with streaming responses and long-context documents, including chunked evaluation strategies. |
| [Guardrails with LangChain.ipynb](./bedrock-guardrails/Guardrails%20with%20LangChain.ipynb) | Integrate Bedrock Guardrails with LangChain chat chains and tool-calling agents. |
| [guardrails_image_content_filters_api.ipynb](./bedrock-guardrails/guardrails_image_content_filters_api.ipynb) | Configure and test image content filters to detect harmful visual content (violence, hate, etc.) using the Converse API and ApplyGuardrail API. Also demonstrates guardrails with image generation models. |

### [tdd-guardrail](./tdd-guardrail)

A test-driven development approach to iteratively building and improving guardrails using automated evaluations.

| Notebook | Description |
|----------|-------------|
| [testing_refactoring_guardrails.ipynb](./tdd-guardrail/testing_refactoring_guardrails.ipynb) | Build a guardrail, create a test suite, evaluate results, then use an LLM to iteratively refine the guardrail's denied topics based on test failures — demonstrating measurable improvement over iterations. |

## Contributing

We welcome community contributions! Please ensure your sample aligns with [AWS best practices](https://aws.amazon.com/architecture/well-architected/), and please update the **Contents** section of this README file with a link to your sample, along with a description.
We welcome community contributions! Please ensure your sample aligns with [AWS best practices](https://aws.amazon.com/architecture/well-architected/), and please update the **Contents** section of this README file with a link to your sample, along with a description.
Loading