Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Guardrails for Amazon Bedrock #520

Merged
merged 38 commits into from
Oct 10, 2024

Conversation

fsatsuki
Copy link
Contributor

@fsatsuki fsatsuki commented Sep 5, 2024

Issue #, if available:
#289

Description of changes:
Implement content filters and contextual grounding checks for Guardrails for Amazon Bedrock.

It will delete the S3bucket that stores the documents you have been using until now and re-create it in BedrockRegion.Because Knowledge base and Guardrails must run in the same region.
Parameters of Guardrails are stored in the Dynamodb.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@fsatsuki fsatsuki changed the title Feature/guardrails feat: Guardrails for Amazon Bedrock Sep 5, 2024
@statefb statefb self-requested a review September 5, 2024 00:44
@statefb
Copy link
Contributor

statefb commented Sep 5, 2024

memo: We don't have backward compatibility due to the regional change of document bucket. If user include this PR, existing bucket likely be lost. Consider to re-create this PR to merge v2 branch, not v1.

Copy link
Contributor

@statefb statefb left a comment

Choose a reason for hiding this comment

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

ありがとうございます!コメントがやや多くて恐縮ですが、お手隙の際ご対応よろしくお願いします!

サマリ:

BE

  • 「ガードレール削除」の削除
  • Decimalではなく floatの利用
  • is_guardrail_enabledの削除
  • get_guardrailの削除

FE

  • Expandableではなくグルーピング
  • 説明文章

backend/app/bedrock.py Outdated Show resolved Hide resolved
backend/app/bedrock.py Outdated Show resolved Hide resolved
backend/app/guardrails.py Outdated Show resolved Hide resolved
backend/app/repositories/custom_bot.py Outdated Show resolved Hide resolved
backend/app/repositories/models/custom_bot_guardrails.py Outdated Show resolved Hide resolved
cdk/lib/bedrock-custom-bot-stack.ts Outdated Show resolved Hide resolved
cdk/lib/constructs/auth.ts Show resolved Hide resolved
frontend/src/i18n/en/index.ts Outdated Show resolved Hide resolved
@statefb statefb merged commit 101dc79 into aws-samples:v1 Oct 10, 2024
6 checks passed
@statefb statefb deleted the feature/guardrails branch October 10, 2024 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants