pub struct ReciprocalRankFusion {
pub embedding_weight: Option<f32>,
pub text_weight: Option<f32>,
pub k: Option<i32>,
}Expand description
Configuration for reciprocal rank fusion (RRF) reranking.
Fields§
§embedding_weight: Option<f32>Weight for embedding (dense) search results. Between 0 and 1, defaults to 0.5.
text_weight: Option<f32>Weight for keyword (sparse) search results. Between 0 and 1, defaults to 0.5.
k: Option<i32>The RRF constant k used in the reciprocal rank fusion formula. Defaults to 60.
Trait Implementations§
Source§impl Clone for ReciprocalRankFusion
impl Clone for ReciprocalRankFusion
Source§fn clone(&self) -> ReciprocalRankFusion
fn clone(&self) -> ReciprocalRankFusion
Returns a duplicate of the value. Read more
1.0.0 · 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 ReciprocalRankFusion
impl Debug for ReciprocalRankFusion
Source§impl Default for ReciprocalRankFusion
impl Default for ReciprocalRankFusion
Source§fn default() -> ReciprocalRankFusion
fn default() -> ReciprocalRankFusion
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ReciprocalRankFusion
impl<'de> Deserialize<'de> for ReciprocalRankFusion
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ReciprocalRankFusion
impl PartialEq for ReciprocalRankFusion
Source§impl Serialize for ReciprocalRankFusion
impl Serialize for ReciprocalRankFusion
impl StructuralPartialEq for ReciprocalRankFusion
Auto Trait Implementations§
impl Freeze for ReciprocalRankFusion
impl RefUnwindSafe for ReciprocalRankFusion
impl Send for ReciprocalRankFusion
impl Sync for ReciprocalRankFusion
impl Unpin for ReciprocalRankFusion
impl UnwindSafe for ReciprocalRankFusion
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