pub struct LlmJudge { /* private fields */ }Expand description
A configured LLM-as-judge. Cheap to clone (Arc inside).
Implementations§
Source§impl LlmJudge
impl LlmJudge
Sourcepub fn new(llm: Arc<dyn BaseLlm>, rubric: impl Into<String>) -> Self
pub fn new(llm: Arc<dyn BaseLlm>, rubric: impl Into<String>) -> Self
Create a judge for the given rubric (the condition that is a violation).
Sourcepub fn with_context(self, label: &'static str) -> Self
pub fn with_context(self, label: &'static str) -> Self
Include a context/reference block in the judge prompt, under label
(e.g. “CONTEXT” for grounding, “REFERENCE ANSWER” for semantic match).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LlmJudge
impl !RefUnwindSafe for LlmJudge
impl Send for LlmJudge
impl Sync for LlmJudge
impl Unpin for LlmJudge
impl !UnwindSafe for LlmJudge
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