pub struct MultiQueryConfig {
pub num_queries: usize,
pub k_per_query: usize,
pub final_k: usize,
pub prompt_template: String,
}Expand description
MultiQueryRetriever configuration
Fields§
§num_queries: usizeNumber of generated queries
k_per_query: usizeNumber of documents returned per query
final_k: usizeNumber of documents returned in the final result
prompt_template: StringThe query-generation prompt
Implementations§
Source§impl MultiQueryConfig
impl MultiQueryConfig
Sourcepub fn with_num_queries(self, n: usize) -> Self
pub fn with_num_queries(self, n: usize) -> Self
Sets the number of generated queries
Sourcepub fn with_k_per_query(self, k: usize) -> Self
pub fn with_k_per_query(self, k: usize) -> Self
Sets the number of documents returned per query
Sourcepub fn with_final_k(self, k: usize) -> Self
pub fn with_final_k(self, k: usize) -> Self
Sets the number of documents returned in the final result
Sourcepub fn with_prompt(self, prompt: impl Into<String>) -> Self
pub fn with_prompt(self, prompt: impl Into<String>) -> Self
Sets the query-generation prompt
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MultiQueryConfig
impl RefUnwindSafe for MultiQueryConfig
impl Send for MultiQueryConfig
impl Sync for MultiQueryConfig
impl Unpin for MultiQueryConfig
impl UnsafeUnpin for MultiQueryConfig
impl UnwindSafe for MultiQueryConfig
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