pub struct Judgement {
pub rubric_assignment: Option<RubricAssignment>,
pub annotation: HashMap<String, Value>,
pub passed: Option<bool>,
pub confidence: Option<f64>,
pub source: Option<String>,
pub judged_at: Option<String>,
}Expand description
A complete judgement including rubric assignment and annotations.
Fields§
§rubric_assignment: Option<RubricAssignment>The rubric-based evaluation.
annotation: HashMap<String, Value>Free-form annotations.
passed: Option<bool>Overall pass/fail determination.
confidence: Option<f64>Confidence in the judgement (0-1).
source: Option<String>Source of the judgement (e.g., “verifier”, “human”, “model”).
judged_at: Option<String>Timestamp of when judgement was made.
Implementations§
Source§impl Judgement
impl Judgement
Sourcepub fn with_rubric_assignment(self, assignment: RubricAssignment) -> Judgement
pub fn with_rubric_assignment(self, assignment: RubricAssignment) -> Judgement
Set the rubric assignment.
Sourcepub fn with_annotation(self, key: impl Into<String>, value: Value) -> Judgement
pub fn with_annotation(self, key: impl Into<String>, value: Value) -> Judgement
Add an annotation.
Sourcepub fn with_passed(self, passed: bool) -> Judgement
pub fn with_passed(self, passed: bool) -> Judgement
Set passed status.
Sourcepub fn with_confidence(self, confidence: f64) -> Judgement
pub fn with_confidence(self, confidence: f64) -> Judgement
Set confidence.
Sourcepub fn with_source(self, source: impl Into<String>) -> Judgement
pub fn with_source(self, source: impl Into<String>) -> Judgement
Set source.
Sourcepub fn total_score(&self) -> Option<f64>
pub fn total_score(&self) -> Option<f64>
Get the total score from the rubric assignment.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Judgement
impl<'de> Deserialize<'de> for Judgement
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Judgement, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Judgement, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Judgement
impl Serialize for Judgement
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for Judgement
impl RefUnwindSafe for Judgement
impl Send for Judgement
impl Sync for Judgement
impl Unpin for Judgement
impl UnwindSafe for Judgement
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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>
Wrap the input message
T in a tonic::Request