Skip to main content

SufficiencyChecker

Trait SufficiencyChecker 

Source
pub trait SufficiencyChecker: Send + Sync {
    // Required methods
    fn check(
        &self,
        query: &str,
        content: &str,
        token_count: usize,
    ) -> SufficiencyLevel;
    fn name(&self) -> &str;
}
Expand description

Trait for sufficiency checking strategies.

Required Methods§

Source

fn check( &self, query: &str, content: &str, token_count: usize, ) -> SufficiencyLevel

Check if the collected content is sufficient to answer the query.

§Arguments
  • query - The original query
  • content - The collected content so far
  • token_count - Approximate token count of content
§Returns

A SufficiencyLevel indicating whether to continue retrieving.

Source

fn name(&self) -> &str

Get the name of this checker.

Implementors§