pub struct MemoryObservation {Show 19 fields
pub observation_id: ObservationId,
pub session_id: SessionId,
pub turn_id: TurnId,
pub subject: EntityRef,
pub predicate: CanonicalPredicate,
pub value: MemoryValue,
pub canonical_statement: String,
pub kind: MemoryKind,
pub explicitness: Explicitness,
pub confidence: f32,
pub persistence: ProposedPersistence,
pub temporal_scope: TemporalScope,
pub valid_from: Option<DateTime<Utc>>,
pub expected_expiry: Option<DateTime<Utc>>,
pub transcript_evidence: TranscriptEvidence,
pub speaker_attribution: SpeakerAttribution,
pub sensitivity: SensitivityClass,
pub mutation_intent: Option<MutationIntent>,
pub search_terms: Vec<String>,
}Expand description
A structured interpretation of one specific user statement.
An observation is evidence, not a fact. It becomes a fact only after consolidation and reconciliation accept it.
Fields§
§observation_id: ObservationIdIdentifier for this observation.
session_id: SessionIdLogical session it was drawn from.
turn_id: TurnIdTurn it was drawn from.
subject: EntityRefWho or what the statement is about.
predicate: CanonicalPredicateCanonical predicate.
value: MemoryValueValue side of the triple.
canonical_statement: StringOne-sentence natural-language rendering.
kind: MemoryKindProposed memory kind.
explicitness: ExplicitnessHow directly it was stated.
confidence: f32Extractor confidence in [0, 1].
persistence: ProposedPersistenceProposed retention.
temporal_scope: TemporalScopeExpected temporal scope.
valid_from: Option<DateTime<Utc>>When the fact started holding, if stated.
expected_expiry: Option<DateTime<Utc>>When the fact is expected to stop holding.
transcript_evidence: TranscriptEvidenceThe transcript span this was drawn from.
speaker_attribution: SpeakerAttributionWho said it.
sensitivity: SensitivityClassPrivacy classification.
mutation_intent: Option<MutationIntent>Whether this observation is a memory command rather than a statement.
search_terms: Vec<String>Terms a user might later search this fact by, in any language they use.
Lexical retrieval can only match words that are present. A fact stored as “The user is vegetarian” is unreachable from “mera khaana ka preference kya hai” — the languages share no token — unless the fact carries the vocabulary the question will use. This is that vocabulary.
Implementations§
Source§impl MemoryObservation
impl MemoryObservation
Sourcepub fn fingerprint(&self) -> FactFingerprint
pub fn fingerprint(&self) -> FactFingerprint
The fingerprint this observation would produce.
Trait Implementations§
Source§impl Clone for MemoryObservation
impl Clone for MemoryObservation
Source§fn clone(&self) -> MemoryObservation
fn clone(&self) -> MemoryObservation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MemoryObservation
impl Debug for MemoryObservation
Source§impl<'de> Deserialize<'de> for MemoryObservation
impl<'de> Deserialize<'de> for MemoryObservation
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>,
Source§impl JsonSchema for MemoryObservation
impl JsonSchema for MemoryObservation
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more