Implement common utilities for guardrails #1022
lordofthejars
started this conversation in
Ideas
Replies: 1 comment 2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I expect a lot of boilerplate code on guardrails in several projects, for example, validate that the output is a JSON, or that the JSON follows a JSON schema, or the same for YAML. For sanitizing output, for example, the output is a JSON, but at the end, it has some markdown characters, even though we explicitly said to the model to not do it.
So maybe we could implement a new module (or a package into core) where we offer some standalone classes for some of these common features:
These are the first things that come to my mind but I am sure there can be more.
Maybe the module could be called
guardrail-json
anotherguardrail-yaml
,guardrail-prompt-injection
,... so they are only the utilities, everyone is free to use them or not, but at least we'll help users to not repeat the same checks over and over again.Beta Was this translation helpful? Give feedback.
All reactions