Skip to main content

Module score

Module score 

Source
Expand description

v0.4.0 (P1-4) — pluggable score lanes for hybrid recall fusion.

The default Mnemo recall fuses four signals: vector similarity, BM25 lexical, recency, and (new in v0.4.0) Ebbinghaus-style decay with reinforcement. Each signal is a ScoreLane that maps a candidate memory to a f32 in [0.0, 1.0]. The fusion sums the lanes with operator-tuned weights:

score = 0.55 * vector
      + 0.20 * bm25
      + 0.15 * recency
      + 0.10 * decay

Letta-protocol mode (LettaProtocolMode) skips the decay lane so parity with Letta’s published numbers is preserved.

Re-exports§

pub use decay::DecayLane;
pub use decay::DecayParams;
pub use decay::decay_weight;

Modules§

decay
Ebbinghaus-style decay-curve scoring (v0.4.0 P1-4).

Structs§

ScoreContext
Context the recall path threads through to every lane. Holds per-query state (current time, agent’s recent activity) so a lane can use it without re-querying storage.

Constants§

DEFAULT_BM25_WEIGHT
DEFAULT_DECAY_WEIGHT
DEFAULT_RECENCY_WEIGHT
DEFAULT_VECTOR_WEIGHT
Default v0.4.0 fusion weights. Tuned against the bundled LongMemEval_M sample so the bench gate doesn’t regress.

Traits§

ScoreLane
One scoring signal. Implementations are stateless or hold cheap configuration; the recall path holds them as Arc<dyn ScoreLane>.

Functions§

fuse_default
Sum the four lane signals using the v0.4.0 default weights. Operators that override weights via RecallRequest.hybrid_weights build their own fuse_weighted call site.
fuse_weighted