pub struct RetrievalOrchestrator { /* private fields */ }Expand description
Retrieval pipeline orchestrator.
Coordinates stage execution with:
- Dependency resolution via topological sort
- Parallel execution of independent stages
- Backtracking support for incremental retrieval
- Configurable failure policies
- Pilot integration for intelligent navigation
§Example
ⓘ
let orchestrator = RetrievalOrchestrator::new()
.stage(AnalyzeStage::new())
.stage(PlanStage::new())
.stage(SearchStage::new())
.stage(JudgeStage::new())
.with_pilot(pilot)
.with_max_backtracks(3);
let response = orchestrator.execute(tree, query, options).await?;Implementations§
Source§impl RetrievalOrchestrator
impl RetrievalOrchestrator
Sourcepub fn stage<S>(self, stage: S) -> Selfwhere
S: RetrievalStage + 'static,
pub fn stage<S>(self, stage: S) -> Selfwhere
S: RetrievalStage + 'static,
Add a stage to the pipeline.
Dependencies are read from the stage’s depends_on() method.
Sourcepub fn with_pilot(self, pilot: Arc<dyn Pilot>) -> Self
pub fn with_pilot(self, pilot: Arc<dyn Pilot>) -> Self
Add Pilot for navigation guidance during backtracking.
When set, the Pilot will be consulted during backtracking to provide intelligent guidance on alternative search paths.
Sourcepub fn with_max_backtracks(self, n: usize) -> Self
pub fn with_max_backtracks(self, n: usize) -> Self
Set maximum number of backtracks allowed.
Sourcepub fn with_max_iterations(self, n: usize) -> Self
pub fn with_max_iterations(self, n: usize) -> Self
Set maximum total iterations.
Sourcepub async fn execute(
&mut self,
tree: Arc<DocumentTree>,
query: &str,
options: RetrieveOptions,
) -> Result<RetrieveResponse>
pub async fn execute( &mut self, tree: Arc<DocumentTree>, query: &str, options: RetrieveOptions, ) -> Result<RetrieveResponse>
Execute the retrieval pipeline.
Sourcepub fn stage_names(&self) -> Result<Vec<&str>>
pub fn stage_names(&self) -> Result<Vec<&str>>
Get list of stage names in execution order.
Sourcepub fn get_execution_groups(&self) -> Result<Vec<ExecutionGroup>>
pub fn get_execution_groups(&self) -> Result<Vec<ExecutionGroup>>
Get execution groups for visualization.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RetrievalOrchestrator
impl !RefUnwindSafe for RetrievalOrchestrator
impl Send for RetrievalOrchestrator
impl Sync for RetrievalOrchestrator
impl Unpin for RetrievalOrchestrator
impl UnsafeUnpin for RetrievalOrchestrator
impl !UnwindSafe for RetrievalOrchestrator
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