pub struct ProvenanceTracker { /* private fields */ }Expand description
Provenance tracker for embeddings
Implementations§
Source§impl ProvenanceTracker
impl ProvenanceTracker
Sourcepub fn track_embedding(&self, metadata: EmbeddingMetadata) -> Result<()>
pub fn track_embedding(&self, metadata: EmbeddingMetadata) -> Result<()>
Track a new embedding
Sourcepub fn update_embedding(
&self,
cid: Cid,
new_cid: Cid,
change_log: impl Into<String>,
) -> Result<()>
pub fn update_embedding( &self, cid: Cid, new_cid: Cid, change_log: impl Into<String>, ) -> Result<()>
Update embedding metadata (creates new version)
Sourcepub fn get_metadata(&self, cid: &Cid) -> Option<EmbeddingMetadata>
pub fn get_metadata(&self, cid: &Cid) -> Option<EmbeddingMetadata>
Get embedding metadata
Sourcepub fn get_version_history(&self, cid: &Cid) -> Option<VersionHistory>
pub fn get_version_history(&self, cid: &Cid) -> Option<VersionHistory>
Get version history
Sourcepub fn get_audit_log(&self, cid: &Cid) -> Vec<AuditLogEntry>
pub fn get_audit_log(&self, cid: &Cid) -> Vec<AuditLogEntry>
Get audit log entries for a CID
Sourcepub fn get_full_audit_log(&self) -> Vec<AuditLogEntry>
pub fn get_full_audit_log(&self) -> Vec<AuditLogEntry>
Get all audit log entries (for compliance/export)
Sourcepub fn log_query(&self, query_cid: Cid, result_cids: &[Cid]) -> Result<()>
pub fn log_query(&self, query_cid: Cid, result_cids: &[Cid]) -> Result<()>
Log a query operation
Sourcepub fn explain_result(
&self,
query_embedding: &[f32],
result_cid: &Cid,
result_embedding: &[f32],
score: f32,
) -> SearchExplanation
pub fn explain_result( &self, query_embedding: &[f32], result_cid: &Cid, result_embedding: &[f32], score: f32, ) -> SearchExplanation
Generate explanation for a search result
Sourcepub fn stats(&self) -> ProvenanceStats
pub fn stats(&self) -> ProvenanceStats
Get statistics about tracked embeddings
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProvenanceTracker
impl !RefUnwindSafe for ProvenanceTracker
impl Send for ProvenanceTracker
impl Sync for ProvenanceTracker
impl Unpin for ProvenanceTracker
impl !UnwindSafe for ProvenanceTracker
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.