Reference
Memory organization and evidence notes¶
Behavior¶
Organization policy |
LongMemEval observation |
Reading |
|---|---|---|
Recency + importance + BM25 relevance |
Evidence recall@10 |
Relevance dominates under the measured |
A-MEM link thresholds |
Precision |
Broad linking finds evidence and creates many weak links |
Chain-of-Note source choice |
Gold-judgment component check |
Add a measured classifier before making an answer-quality claim |
Actual LongMemEval retrieval differences
Question ID |
Type |
Gold sessions |
Gold ranks |
Recall-all@5 |
|---|---|---|---|---|
|
Single-session user |
1 |
|
1.0 |
|
Multi-session |
4 |
|
0.0 |
The second case retrieves one supporting session near the top. The complete
evidence set remains missing. Recall-any records the early hit, so inspect
Recall-all for this failure.
The functions link related notes and rank memories for recall. Another function decides whether retrieved evidence can support an answer.
How it works¶
Note evolution applies a link threshold and a stricter metadata-evolution threshold to caller-supplied similarities. Salience exponentially decays recency, min-max normalizes recency, importance, and relevance over the candidate set, then returns every weighted contribution. Evidence-note decisions validate per-document relevance and answer support before choosing retrieved evidence, explicitly allowed parametric knowledge, or unknown.
Papers
A-MEM: dynamic note evolutionGenerative Agents: recency, importance, and relevanceChain-of-Note: sequential evidence decisions
from mari_kit.knowledge import (
MemorySignal, plan_note_evolution, rank_salient_memories,
)
from mari_kit.verification import (
EvidenceNote, decide_from_evidence_notes,
)
evolution = plan_note_evolution(new_note.id, similarity_by_note_id,
link_threshold=0.72, evolution_threshold=0.91)
salient = rank_salient_memories([
MemorySignal(memory_id=m.id, hours_since_access=hours_since(m.last_accessed),
importance=importance(m), relevance=relevance(query, m)) for m in memories
], recency_decay=0.995, limit=20)
decision = decide_from_evidence_notes([
EvidenceNote(document_id=n.document_id, relevant=n.relevant,
supports_answer=n.supports_answer) for n in model_notes
])
Authorize the candidate set before ranking or note linking. Min-max normalization is relative to that set, so adding candidates can change existing scores. Treat salience as a ranking signal within one query. Similarity-based links propose related notes. Source agreement and independent corroboration require separate evidence checks.
For cached note metadata or summaries, declare source membership, source revisions, and model configuration through the shared dependency planner. Preserve exact evidence bindings even when an unchanged text representation is reusable.