pub struct LlmAsJudge { /* private fields */ }Expand description
Evaluator that uses an LLM to judge agent responses.
Sends the actual and expected invocations to an LLM along with a rubric, and parses the score from the LLM’s response.
Implementations§
Source§impl LlmAsJudge
impl LlmAsJudge
Sourcepub fn new(llm: Arc<dyn BaseLlm>, config: LlmAsJudgeConfig) -> Self
pub fn new(llm: Arc<dyn BaseLlm>, config: LlmAsJudgeConfig) -> Self
Create a new LLM-as-judge evaluator.
Trait Implementations§
Source§impl Evaluator for LlmAsJudge
impl Evaluator for LlmAsJudge
Source§fn evaluate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
actual: &'life1 [Invocation],
expected: Option<&'life2 [Invocation]>,
) -> Pin<Box<dyn Future<Output = Result<EvalResult, EvalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn evaluate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
actual: &'life1 [Invocation],
expected: Option<&'life2 [Invocation]>,
) -> Pin<Box<dyn Future<Output = Result<EvalResult, EvalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Evaluate agent invocations. Read more
Auto Trait Implementations§
impl Freeze for LlmAsJudge
impl !RefUnwindSafe for LlmAsJudge
impl Send for LlmAsJudge
impl Sync for LlmAsJudge
impl Unpin for LlmAsJudge
impl !UnwindSafe for LlmAsJudge
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