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

Move redaction to pii guardrails as a parameter #891

Closed
VisargD opened this issue Jan 26, 2025 · 0 comments · Fixed by #889
Closed

Move redaction to pii guardrails as a parameter #891

VisargD opened this issue Jan 26, 2025 · 0 comments · Fixed by #889
Assignees
Labels

Comments

@VisargD
Copy link
Collaborator

VisargD commented Jan 26, 2025

Instead of redaction being handled by a separate hook type (mutator), it should be moved as a parameter to the existing guardrail hook type. If the redact flag is true, then the handler will redact and update the context of the HookSpan. There are a few reasons to do this:

  • Integrations like Bedrock allow you to configure multiple checks (such as word filters, content filters, and PII redaction) within a single guardrail. If redaction was a separate hook, it would require two separate guardrails (one for redaction and one for other checks), which could feel a bit redundant. This is just one example, and there could be many more use cases where this becomes a problem in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant