john-jac opened a new pull request, #66035:
URL: https://github.com/apache/airflow/pull/66035

   ## What
   Add an operator to create Amazon Bedrock guardrails for implementing safety 
controls in generative AI applications.
   
   ## Use Case
   Teams deploying LLM-powered applications need to enforce content safety 
policies (block hate speech, filter PII, deny off-topic discussions) as part of 
their deployment pipeline. A guardrail is created with content filters and 
topic policies, then associated with the Bedrock model. Having this in a DAG 
makes safety policy changes versioned, auditable, and promotable through 
dev/staging/prod:
   
   ```
   create_guardrail >> configure_model_endpoint >> run_eval_tests >> notify_team
   ```
   
   The `create_guardrail` API creates a DRAFT version that is immediately 
usable — no separate version step needed for dev/test workflows.
   
   ## How
   - New `BedrockCreateGuardrailOperator` using `AwsBaseOperator[BedrockHook]` 
pattern
   - Supports content filters, denied topics, word filters, PII masking, and 
contextual grounding
   - Idempotent: `if_exists="skip"` handles `ConflictException`
   - Uses `prune_dict` for clean kwargs building
   - Returns the guardrail ID
   
   ## Files
   - `operators/bedrock_guardrail.py` — operator
   - `test_bedrock_guardrail.py` — unit tests (4 tests)
   - `example_bedrock_guardrail.py` — system test with teardown
   - `bedrock_guardrail.rst` — docs
   - `provider.yaml` + `get_provider_info.py` — updated
   
   ## Testing
   - Unit tests: 4 passed
   - mypy: no issues
   - Static checks: 43 passed, 0 PR-related failures
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to