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

Bug: creating a guardrail with Content policy sets all filters to high #4436

Open
1 task
dannielvieira-hotmart opened this issue Feb 11, 2025 · 2 comments
Open
1 task
Assignees
Labels
bedrock bug This issue is a confirmed bug. p2 This is a standard priority issue service-api This issue is caused by the service API, not the SDK implementation.

Comments

@dannielvieira-hotmart
Copy link

dannielvieira-hotmart commented Feb 11, 2025

Describe the bug

When creating a Guardrail with a Content policy, setting desired filter to their level results in a Content policy with all filter set to high even though the request didn't specify that.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

Expected the guardrail created to set filters that wasnt passed on the request to None.

Current Behavior

Guardrail created with all filters not declared on request set to high

Reproduction Steps

bedrock.create_guardrail(
    name='testing_bug_on_gd_version_1_36',
    contentPolicyConfig={
        'filtersConfig': [
            {
                'type': 'SEXUAL',
                'inputStrength': 'MEDIUM',
                'outputStrength': 'MEDIUM'
            },
            {
                'type': 'VIOLENCE',
                'inputStrength': 'MEDIUM',
                'outputStrength': 'MEDIUM'
            },
        ]
    },
    blockedInputMessaging='string',
    blockedOutputsMessaging='string'
)

--> Visit Bedrock on Console:

Image

Possible Solution

If a filter is not defined, set it as None.

Additional Information/Context

No response

SDK version used

1.36.17

Environment details (OS name and version, etc.)

Mac OS M1 Sonoma 14.7.2

@dannielvieira-hotmart dannielvieira-hotmart added bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged. labels Feb 11, 2025
@khushail khushail added bedrock p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Feb 11, 2025
@khushail khushail self-assigned this Feb 11, 2025
@khushail khushail added the investigating This issue is being investigated and/or work is in progress to resolve the issue. label Feb 11, 2025
@khushail
Copy link

khushail commented Feb 12, 2025

Hi @dannielvieira-hotmart , thanks for reporting this issue.

I tried to repro this with the given code and can see that some configurations like Prompt filters and hate filters were automatically set to High -

Image

This might be an issue on the Service side as I did not see any defaults being mentioned in the API doc -https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GuardrailContentFilterConfig.html

I would file a ticket with the Bedrock team and share the updates.

Thanks

Internal Ticket :P200373051

@khushail khushail added service-api This issue is caused by the service API, not the SDK implementation. and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Feb 12, 2025
@dannielvieira-hotmart
Copy link
Author

Hi @khushail , thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bedrock bug This issue is a confirmed bug. p2 This is a standard priority issue service-api This issue is caused by the service API, not the SDK implementation.
Projects
None yet
Development

No branches or pull requests

2 participants