pub struct IdentityReranker;Expand description
No-op Reranker: returns the first top_k candidates in the
order the underlying VectorStore produced them, copying the
retrieval score into RerankedDocument::rerank_score so
downstream consumers see a uniform shape.
Trait Implementations§
Source§impl Clone for IdentityReranker
impl Clone for IdentityReranker
Source§fn clone(&self) -> IdentityReranker
fn clone(&self) -> IdentityReranker
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IdentityReranker
impl Debug for IdentityReranker
Source§impl Default for IdentityReranker
impl Default for IdentityReranker
Source§fn default() -> IdentityReranker
fn default() -> IdentityReranker
Returns the “default value” for a type. Read more
Source§impl Reranker for IdentityReranker
impl Reranker for IdentityReranker
Source§fn rerank<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_query: &'life1 str,
candidates: Vec<Document>,
top_k: usize,
_ctx: &'life2 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<RerankedDocument>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn rerank<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_query: &'life1 str,
candidates: Vec<Document>,
top_k: usize,
_ctx: &'life2 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<RerankedDocument>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Re-order (and optionally trim) the candidate list, attaching
a reranker-specific score to each survivor. The returned
Vec MUST contain only documents from the input candidates
— rerankers cannot fabricate new content.impl Copy for IdentityReranker
Auto Trait Implementations§
impl Freeze for IdentityReranker
impl RefUnwindSafe for IdentityReranker
impl Send for IdentityReranker
impl Sync for IdentityReranker
impl Unpin for IdentityReranker
impl UnsafeUnpin for IdentityReranker
impl UnwindSafe for IdentityReranker
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