pub struct LlmJudge { /* private fields */ }Expand description
LLM-based sufficiency judge.
Uses an LLM to determine if the collected content is sufficient to answer the query.
Implementations§
Source§impl LlmJudge
impl LlmJudge
Sourcepub fn with_config(
client: Box<dyn LlmJudgeClient>,
config: &SufficiencyConfig,
) -> Self
pub fn with_config( client: Box<dyn LlmJudgeClient>, config: &SufficiencyConfig, ) -> Self
Create a new LLM judge with configuration.
Sourcepub fn with_confidence_threshold(self, threshold: f32) -> Self
pub fn with_confidence_threshold(self, threshold: f32) -> Self
Set confidence threshold.
Sourcepub async fn check_async(
&self,
query: &str,
content: &str,
_token_count: usize,
) -> SufficiencyLevel
pub async fn check_async( &self, query: &str, content: &str, _token_count: usize, ) -> SufficiencyLevel
Check sufficiency asynchronously.
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 UnsafeUnpin 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
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 more