Skip to main content

Module semantic

Module semantic 

Source
Expand description

High-level semantic memory orchestrator.

SemanticMemory is the primary entry point used by zeph-core. It wires together crate::store::SqliteStore (relational persistence) and crate::embedding_store::EmbeddingStore (Qdrant vector index) into a single object with remember / recall / summarize operations.

§Construction

Use SemanticMemory::new for the default 0.7/0.3 vector/keyword weights, or SemanticMemory::with_qdrant_ops inside AppBuilder to share a single gRPC channel across all subsystems.

§Hybrid recall

Recall uses reciprocal-rank fusion of BM25 (SQLite FTS5) and cosine-similarity (Qdrant) results, with optional temporal decay, MMR diversity reranking, and per-tier score boosts.

Re-exports§

pub use persona::PersonaExtractionConfig;
pub use persona::contains_self_referential_language;
pub use persona::extract_persona_facts;
pub use trajectory::TrajectoryEntry;
pub use trajectory::TrajectoryExtractionConfig;
pub use trajectory::extract_trajectory_entries;
pub use tree_consolidation::TreeConsolidationConfig;
pub use tree_consolidation::TreeConsolidationResult;
pub use tree_consolidation::run_tree_consolidation_sweep;
pub use tree_consolidation::start_tree_consolidation_loop;

Modules§

persona
Persona fact extraction from conversation history (#2461).
trajectory
Trajectory-informed memory extraction (#2498).
tree_consolidation
TiMem temporal-hierarchical memory tree consolidation (#2262).

Structs§

BackfillProgress
Progress state for embed backfill.
EmbedContext
Tool execution metadata stored as Qdrant payload fields alongside embeddings.
ExtractionResult
Result returned from extract_and_store, combining stats with entity IDs needed for linking.
ExtractionStats
Stats returned from a completed extraction.
GraphExtractionConfig
Config for the spawned background extraction task.
LinkingStats
Stats returned from a completed note-linking pass.
NoteLinkingConfig
Runtime config for A-MEM dynamic note linking.
RecalledMessage
SemanticMemory
High-level semantic memory orchestrator combining SQLite and Qdrant.
SessionSummaryResult
StructuredSummary
Summary
WriteBuffer
Session-scoped write buffer.

Enums§

BufferedWrite
A single buffered write operation waiting to be flushed to the store.

Functions§

apply_mmr
apply_temporal_decay
build_summarization_prompt
extract_and_store
Extract entities and edges from content and persist them to the graph store.
link_memory_notes
Link newly extracted entities to semantically similar entities in the graph.

Type Aliases§

PostExtractValidator
Callback type for post-extraction validation.