Interface TypedFact

A typed fact in the Hindsight memory schema. Carries narrative text, embedding, temporal envelope, participants, reasoning markers, extracted entities, and a confidence score in [0, 1]. Confidence defaults to 1.0 for World/Experience/Observation facts; the Opinion bank stores (text, confidence, timestamp) tuples per §2.2.

interface TypedFact {
    id: string;
    bank: "WORLD" | "EXPERIENCE" | "OPINION" | "OBSERVATION";
    text: string;
    embedding: number[];
    temporal: FactTemporal;
    participants: Participant[];
    reasoningMarkers: string[];
    entities: string[];
    confidence: number;
    metadata?: Record<string, unknown>;
}

Properties

id: string

Stable unique identifier. Convention: <sessionId>-fact-<index>.

bank: "WORLD" | "EXPERIENCE" | "OPINION" | "OBSERVATION"

Bank assignment from the LLM extractor's fact-type classification.

text: string

Narrative text of the fact, post-coreference resolution.

embedding: number[]

Embedding vector. TypedNetworkObserver creates each fact with an empty array, and nothing in this package fills it.

temporal: FactTemporal

Temporal envelope (occurrence interval + mention timestamp).

participants: Participant[]

Named participants and their roles.

reasoningMarkers: string[]

Verbatim reasoning markers preserved from the source content ("because", "since", "therefore", etc.). Used downstream to extract causal edges.

entities: string[]

Named entities mentioned in the fact (proper nouns, products, places).

confidence: number

Confidence ∈ [0, 1]. 1.0 for non-Opinion facts; LLM-output for Opinion.

metadata?: Record<string, unknown>

Optional auxiliary metadata (source ID, conversation turn index, etc.).