Update From Short-Term to Mid-Term Memory
STM · recent turns
queue of pages · FIFO
oldest page spills · match score
MTM · topic folders
pages by topic · heat · evict
heat > τ · promote
LPM · persona
user · agent
retrieve
all three tiers → prompt
generate
LLM → answer → new page
STM · fixed-length queue of 7 pages
oldest ← · · · → newest
p2
squirrels
week 1
p3
ran laps
week 1
p4
movie
week 2
p5
cinema
week 2
p6
pasta
week 3
p7
gym
week 3
p8
flight
week 3
queue is full (7 / 7)
MTM · topic folders (segments)
folder A · wetland park outing
summary: a visit to the wetland park, beautiful scenery
keywords K = { park, wetland, scenery, visit }
p1
only the page that left the queue so far
folder B · work deadlines (before week 1)
summary: a report due at the end of the month
keywords K = { report, deadline, work, month }
p−4
p−3
p9
the park?
week 4
push
p2
squirrels
FIFO · the oldest page leaves the queue
and moves to mid-term memory
match score F = cos( e
folder
, e
page
) + Jaccard( K
folder
, K
page
)
embedding similarity + keyword overlap |K∩K| / |K∪K| · join when F > θ = 0.6
p2 vs folder A:
0.74 + 0.33 = 1.07
p2 vs folder B:
0.08 + 0.00 = 0.08
F = 1.07
F = 0.08
p2
> θ → join A
LLM refreshes folder summary + keywords
otherwise · new folder
no folder with F > θ → the page opens a folder of its own,
with its own LLM summary and keyword set
(p1 opened folder A this way one turn earlier, when p8 arrived)
FIFO
out of the 7-page queue ·
match score
F > θ joins a topic folder, otherwise a new folder
◂
▸
15 / 25