pub enum EvalScorer {
LlmJudge {
model: String,
rubric: String,
min_score: u8,
},
Assertion {
checks: Vec<String>,
},
Latency {
threshold_ms: u64,
},
Cost {
threshold_usd: f64,
},
Custom {
module: String,
kwargs: Value,
},
}Expand description
A scorer within an Eval node.
Variants§
LlmJudge
LLM-as-judge: sends output to a model with a rubric, expects a score 1-5.
Fields
Assertion
Deterministic Python expressions evaluated against the output.
Latency
Ensures node execution completed within a latency threshold.
Cost
Ensures the execution cost is within budget.
Custom
Custom Python scorer loaded via entry point or module path.
Trait Implementations§
Source§impl Clone for EvalScorer
impl Clone for EvalScorer
Source§fn clone(&self) -> EvalScorer
fn clone(&self) -> EvalScorer
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 EvalScorer
impl Debug for EvalScorer
Source§impl<'de> Deserialize<'de> for EvalScorer
impl<'de> Deserialize<'de> for EvalScorer
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 EvalScorer
impl RefUnwindSafe for EvalScorer
impl Send for EvalScorer
impl Sync for EvalScorer
impl Unpin for EvalScorer
impl UnsafeUnpin for EvalScorer
impl UnwindSafe for EvalScorer
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