pub enum Scorer {
Contains {
text: String,
weight: f64,
},
NotContains {
text: String,
weight: f64,
},
Regex {
pattern: String,
weight: f64,
},
ToolCalled {
tool: String,
min: u32,
weight: f64,
},
ToolNotCalled {
tool: String,
weight: f64,
},
ToolCallCount {
min: Option<u32>,
max: Option<u32>,
weight: f64,
},
TurnsWithin {
max: u32,
weight: f64,
},
FileContains {
path: String,
text: String,
weight: f64,
},
JsonSchema {
schema: Value,
weight: f64,
},
CitationFaithful {
min_citations: u32,
pass_threshold: f64,
weight: f64,
},
CitationJudged {
rubric: Option<String>,
model_id: Option<ModelId>,
pass_threshold: f64,
weight: f64,
},
}Expand description
A scoring rule applied to eval case output.
Variants§
Contains
Final assistant message contains substring.
NotContains
Final assistant message does NOT contain substring.
Regex
Final assistant message matches regex pattern.
ToolCalled
Agent called named tool at least min times.
ToolNotCalled
Agent did NOT call named tool.
ToolCallCount
Total tool calls within range.
TurnsWithin
Completed within N turns.
FileContains
Session filesystem file contains substring.
JsonSchema
Final assistant message parses as JSON matching schema.
CitationFaithful
Citation faithfulness: the answer’s citations (see specs/citations.md)
must cover the claim and be verified as supported. Scored from the
TextAnnotations on the final message — pair with the
citation_verification capability so verdicts are present.
Fields
CitationJudged
Citation faithfulness judged by an LLM: each cited claim/source pair is
graded by a model, so the eval works even without the
citation_verification capability. See specs/citations.md.
Fields
Implementations§
Source§impl Scorer
impl Scorer
Sourcepub fn kind(&self) -> &'static str
pub fn kind(&self) -> &'static str
Stable kind tag for this scorer, matching the serde type discriminant.
Scores are persisted as an ordered Vec<Score> that carries no scorer
identity, so consumers that need a name (e.g. dataset export) join this
positionally against the case’s scorers. Keep this exhaustive so adding
a variant forces a decision here.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Scorer
impl<'de> Deserialize<'de> for Scorer
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>,
Auto Trait Implementations§
impl Freeze for Scorer
impl RefUnwindSafe for Scorer
impl Send for Scorer
impl Sync for Scorer
impl Unpin for Scorer
impl UnsafeUnpin for Scorer
impl UnwindSafe for Scorer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request