pub struct RerankCandidate {
pub id: Vec<u8>,
pub text: String,
pub score: f32,
pub metadata: Value,
}Expand description
One pre-rerank candidate. The operator hydrates the chunk text BEFORE
calling the reranker (see lunaris_retrieve::hydrate::partial_hydrate_text)
so the cross-encoder can pair-encode (query, doc.text) for scoring.
score is the upstream operator’s score — the reranker REPLACES this with
its own logit so downstream .top(n) ranks by cross-encoder relevance.
Fields§
§id: Vec<u8>Backend-issued id (the same id bytes that came from the upstream RawHit).
text: StringChunk body — required for cross-encoder pair scoring. Empty string is allowed (the model will produce a low score, the cull is downstream).
score: f32Upstream operator’s score. The reranker REPLACES this with its own logit on return.
metadata: ValueFree-form metadata carried from the upstream RawHit; the reranker passes it through unchanged.
Trait Implementations§
Source§impl Clone for RerankCandidate
impl Clone for RerankCandidate
Source§fn clone(&self) -> RerankCandidate
fn clone(&self) -> RerankCandidate
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 RerankCandidate
impl Debug for RerankCandidate
Source§impl<'de> Deserialize<'de> for RerankCandidate
impl<'de> Deserialize<'de> for RerankCandidate
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RerankCandidate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RerankCandidate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for RerankCandidate
impl Serialize for RerankCandidate
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for RerankCandidate
impl RefUnwindSafe for RerankCandidate
impl Send for RerankCandidate
impl Sync for RerankCandidate
impl Unpin for RerankCandidate
impl UnsafeUnpin for RerankCandidate
impl UnwindSafe for RerankCandidate
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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