Settings

Theme

Show HN: Union-find for chatbot memory instead of flat compaction

june.kim

1 points by kimjune01 5 days ago · 0 comments · 1 min read

Reader

Every chatbot handles context overflow the same way — summarize everything into one block and throw away the sources. I replaced that with a union-find forest: messages merge into clusters, each cluster has its own summary, and you can trace any summary back to the messages that produced it.

Ran seven trials against flat summarization. UF led by 15-18pp on fact recall in every trial. One hit significance (p=0.039), the rest are directional. The interesting finding: flat summaries drop "footnote" facts (cron schedules, webhook paths) because they compete against headline facts for space. Per-cluster summaries don't have that pressure.

Code and trial logs: https://github.com/kimjune01/union-find-compaction

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection