-
Notifications
You must be signed in to change notification settings - Fork 166
Description
Proposed Content
I see we have documentation for using Guardrails, and for Observing by triggering the same guardrail "again"
I would like to proce that we have examples of how to fully observe when a guardrail is triggered directly from bedrock, something we can only see in the raw responses.
Location
https://strandsagents.com/latest/documentation/docs/user-guide/safety-security/guardrails/?h=guar
Rationale
An user should be able to have some sort of middleware after a guardrail is triggered (hopefully with a dedicated hook) so that I can register custom metrics with proper labels for each metric with possibly the following labels:
"policy_type": policy_type,
"policy_name": "tbd",
"filter_type": "tbd",
"pii_type": "tbd",
"word_type": "tbd",
"match": "tbd",
User should also be ale to create custom opentelemetry spans from this hook/callback.
I'm not sure if such hook is available, so I had to inject some magic directly on bedrock client in order to intercept the response.
Content Outline (Optional)
No response
References
No response