pub struct PipelineRetriever { /* private fields */ }Expand description
Pipeline-based retriever using the stage architecture.
This retriever uses the new pipeline architecture with:
- Analyze stage: Query complexity and keyword extraction
- Plan stage: Strategy and algorithm selection
- Search stage: Tree traversal
- Evaluate stage: Sufficiency checking
§Example
ⓘ
let retriever = PipelineRetriever::new()
.with_llm_client(llm_client);
let response = retriever.retrieve(&tree, "query", &options).await?;Implementations§
Source§impl PipelineRetriever
impl PipelineRetriever
Sourcepub fn with_llm_client(self, client: LlmClient) -> Self
pub fn with_llm_client(self, client: LlmClient) -> Self
Add LLM client for enhanced retrieval.
Sourcepub fn with_max_backtracks(self, n: usize) -> Self
pub fn with_max_backtracks(self, n: usize) -> Self
Set maximum backtracks for incremental retrieval.
Sourcepub fn with_max_iterations(self, n: usize) -> Self
pub fn with_max_iterations(self, n: usize) -> Self
Set maximum total iterations.
Sourcepub fn with_content_config(self, config: ContentAggregatorConfig) -> Self
pub fn with_content_config(self, config: ContentAggregatorConfig) -> Self
Set content aggregator configuration.
When enabled, the Evaluate stage uses precision-focused content aggregation with relevance scoring and token budget control.
Trait Implementations§
Source§impl Clone for PipelineRetriever
impl Clone for PipelineRetriever
Source§impl Default for PipelineRetriever
impl Default for PipelineRetriever
Source§impl Retriever for PipelineRetriever
impl Retriever for PipelineRetriever
Source§fn retrieve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tree: &'life1 DocumentTree,
query: &'life2 str,
options: &'life3 RetrieveOptions,
) -> Pin<Box<dyn Future<Output = RetrieverResult<RetrieveResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn retrieve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tree: &'life1 DocumentTree,
query: &'life2 str,
options: &'life3 RetrieveOptions,
) -> Pin<Box<dyn Future<Output = RetrieverResult<RetrieveResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Retrieve relevant content for the given query. Read more
Source§fn supports_options(&self, _options: &RetrieveOptions) -> bool
fn supports_options(&self, _options: &RetrieveOptions) -> bool
Check if this retriever supports the given options. Read more
Source§fn estimate_cost(
&self,
tree: &DocumentTree,
options: &RetrieveOptions,
) -> CostEstimate
fn estimate_cost( &self, tree: &DocumentTree, options: &RetrieveOptions, ) -> CostEstimate
Estimate the cost of a retrieval operation. Read more
Auto Trait Implementations§
impl Freeze for PipelineRetriever
impl !RefUnwindSafe for PipelineRetriever
impl Send for PipelineRetriever
impl Sync for PipelineRetriever
impl Unpin for PipelineRetriever
impl UnsafeUnpin for PipelineRetriever
impl !UnwindSafe for PipelineRetriever
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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