pub struct AdaptiveRetriever { /* private fields */ }Expand description
Adaptive retrieval system that selects strategies based on query analysis
Implementations§
Source§impl AdaptiveRetriever
impl AdaptiveRetriever
Sourcepub fn new(
config: AdaptiveConfig,
_vector_index: VectorIndex,
_knowledge_graph: KnowledgeGraph,
_document_trees: HashMap<String, DocumentTree>,
) -> Result<Self>
pub fn new( config: AdaptiveConfig, _vector_index: VectorIndex, _knowledge_graph: KnowledgeGraph, _document_trees: HashMap<String, DocumentTree>, ) -> Result<Self>
Create a new adaptive retriever
Sourcepub fn retrieve(
&mut self,
query: &str,
query_analysis: &QueryAnalysisResult,
max_results: usize,
) -> Result<AdaptiveRetrievalResult>
pub fn retrieve( &mut self, query: &str, query_analysis: &QueryAnalysisResult, max_results: usize, ) -> Result<AdaptiveRetrievalResult>
Perform adaptive retrieval based on query analysis
Sourcepub fn get_statistics(&self) -> AdaptiveRetrieverStatistics
pub fn get_statistics(&self) -> AdaptiveRetrieverStatistics
Get adaptive retrieval statistics
Auto Trait Implementations§
impl Freeze for AdaptiveRetriever
impl RefUnwindSafe for AdaptiveRetriever
impl Send for AdaptiveRetriever
impl Sync for AdaptiveRetriever
impl Unpin for AdaptiveRetriever
impl UnsafeUnpin for AdaptiveRetriever
impl UnwindSafe for AdaptiveRetriever
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