Hacker News new | ask | show | jobs
by TXTOS 346 days ago
Semantic Tree Memory

We actually serialize the tree as a compact JSON-like structure right in the TXT file—each node gets a header like #NODE:id and indented subtrees. When you reload, TXT OS parses those markers back into your LLM’s memory map. No external DB needed—just plain text you can copy-paste between sessions.

--- When kbtest Fires

Internally it tracks our ΔS metric (semantic tension). Once ΔS crosses a preset threshold, kbtest prints a warning and automatically rolls you back to the last “safe” tree checkpoint. That means you lose only the bad branch, not your entire session. Think of it like an undo button for hallucinations.

--- Performance on LLaMA-2-13B

Benchmarks were on GPT-4, but on a 13B model you’ll see roughly a 10–15% token-generation slow-down thanks to the extra parsing and boundary checks. In practice that’s about +2 ms per token, which most folks find an acceptable trade-off for the added stability.

Hope that clears things up—let me know if you hit any weird edge cases!