gemini_memory_rs/retrieval/
mod.rs

1//! Preparing memory context before the model asks for it.
2//!
3//! The pipeline runs entirely off the response path: a plan is derived from the
4//! transcript, queries are fused, and a budgeted snapshot is frozen into state.
5//! When the `recall_context` tool call arrives, serving it is a state read.
6
7pub mod assembler;
8pub mod deterministic;
9pub mod embedding;
10pub mod extractor;
11pub mod fusion;
12pub mod plan;
13pub mod retriever;
14pub mod semantic;
15pub mod snapshot;
16pub mod vocabulary;
17
18pub use assembler::ContextAssembler;
19pub use deterministic::{DeterministicPlanner, KnownEntities, RetrievalSignal};
20pub use embedding::{embedding_text, frontmatter_prose, predicate_line};
21pub use extractor::{
22    BoundedPlanExtractor, DeterministicPlanExtractor, RETRIEVAL_PLAN_INSTRUCTION,
23    RetrievalExtractionContext, RetrievalPlanExtractor, context_for, retrieval_plan_schema,
24};
25pub use fusion::{FusedCandidate, RRF_K, reciprocal_rank_fusion};
26pub use plan::{RetrievalEntity, RetrievalIntent, RetrievalPlan, TemporalConstraint, limits};
27pub(crate) use retriever::non_topical_terms;
28pub use retriever::{
29    IndexHandle, LocalMemoryRetriever, MemoryRetriever, RetrievalBudget, RetrievalRequest,
30    SemanticFallback,
31};
32pub use semantic::{Embedder, PrecomputedSemanticIndex, RERANK_DEPTH, StaticEmbedder};
33pub use snapshot::{
34    PreparedMemorySnapshot, RetrievedMemory, SNAPSHOT_TTL_SECONDS, estimate_tokens, fuse_snapshots,
35};
36pub use vocabulary::{DEFAULT_LIMIT as MEMORY_MAP_LIMIT, memory_map, memory_map_with_limit};