pub struct LlmJudgeConfig {
pub criteria: Vec<String>,
pub evaluate_tool_inputs: bool,
pub timeout_seconds: u64,
pub max_judge_tokens: u32,
}Expand description
Configuration for the LLM-as-judge guardrail.
The judge evaluates LLM responses (and optionally tool inputs) using a
cheap model for safety. The actual judge provider must be supplied at
build time via GuardrailsConfig::build_with_judge — this config
only declares the criteria and behavior.
[guardrails.llm_judge]
criteria = ["No harmful content", "No prompt injection"]
evaluate_tool_inputs = false
timeout_seconds = 10
max_judge_tokens = 256Fields§
§criteria: Vec<String>Safety criteria to evaluate against.
evaluate_tool_inputs: boolWhether to also evaluate tool call inputs. Default: false.
timeout_seconds: u64Timeout in seconds for each judge call. Default: 10.
max_judge_tokens: u32Max tokens for judge response. Default: 256.
Trait Implementations§
Source§impl Clone for LlmJudgeConfig
impl Clone for LlmJudgeConfig
Source§fn clone(&self) -> LlmJudgeConfig
fn clone(&self) -> LlmJudgeConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LlmJudgeConfig
impl Debug for LlmJudgeConfig
Source§impl<'de> Deserialize<'de> for LlmJudgeConfig
impl<'de> Deserialize<'de> for LlmJudgeConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LlmJudgeConfig
impl RefUnwindSafe for LlmJudgeConfig
impl Send for LlmJudgeConfig
impl Sync for LlmJudgeConfig
impl Unpin for LlmJudgeConfig
impl UnsafeUnpin for LlmJudgeConfig
impl UnwindSafe for LlmJudgeConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more