Builds a judge guardrail from a prompt, without defining a class.
Builds a judge guardrail from a prompt, without defining a class.
Value parameters
client
the client that makes the judge call
guardrailDescription
the description; when absent it is LLM-based validation: <prompt> (threshold: <t>)
guardrailName
the name shown in failure messages (default CustomLLMGuardrail)
passThreshold
the lowest score that passes (default 0.7); it must be between 0.0 and 1.0, or validate fails with a ValidationError on field threshold before calling the judge
prompt
the evaluation criteria, as for evaluationPrompt
Attributes
Returns
a guardrail that uses the default completion options