pub struct RecallQuery {
pub query_text: String,
pub top_k: usize,
pub step_context: Option<DecisionStep>,
pub tenant_scope: Option<String>,
}Expand description
A query for semantic recall.
Fields§
§query_text: StringThe text to find similar items for
top_k: usizeNumber of candidates to return
step_context: Option<DecisionStep>Optional step context for filtering
tenant_scope: Option<String>Optional tenant scope
Implementations§
Source§impl RecallQuery
impl RecallQuery
Sourcepub fn new(query_text: impl Into<String>, top_k: usize) -> RecallQuery
pub fn new(query_text: impl Into<String>, top_k: usize) -> RecallQuery
Create a new recall query.
Sourcepub fn with_step_context(self, step: DecisionStep) -> RecallQuery
pub fn with_step_context(self, step: DecisionStep) -> RecallQuery
Add step context filter.
Sourcepub fn with_tenant_scope(self, tenant: impl Into<String>) -> RecallQuery
pub fn with_tenant_scope(self, tenant: impl Into<String>) -> RecallQuery
Add tenant scope filter.
Sourcepub fn query_hash(&self) -> String
pub fn query_hash(&self) -> String
Compute a deterministic hash of this query for provenance tracking.
Trait Implementations§
Source§impl Clone for RecallQuery
impl Clone for RecallQuery
Source§fn clone(&self) -> RecallQuery
fn clone(&self) -> RecallQuery
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 RecallQuery
impl Debug for RecallQuery
Source§impl<'de> Deserialize<'de> for RecallQuery
impl<'de> Deserialize<'de> for RecallQuery
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RecallQuery, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RecallQuery, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for RecallQuery
impl Serialize for RecallQuery
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 RecallQuery
impl RefUnwindSafe for RecallQuery
impl Send for RecallQuery
impl Sync for RecallQuery
impl Unpin for RecallQuery
impl UnsafeUnpin for RecallQuery
impl UnwindSafe for RecallQuery
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