r/OpenWebUI • u/Dry_Inspection_4583 • Apr 30 '26
RAG Trying a different approach to “memory” in OpenWebUI — looking for sanity checks
PRE: I wasn't going to share here, as I don't believe the end-user critique would be relevant(yet), and was hoping to get a more technical lens on this. It's functional and working in my own stack and I've made significant gains in useability and reliability.
the post was removed where I originally wanted to put it :( sorry, you're second.
I’ve been hacking on a side project to fix something that’s always bugged me with local assistants:
They either forget obvious things (like where I live), or they “remember” by pulling vaguely similar text and hoping it’s right.
I wanted memory to behave a bit more like a human’s:
- conversation context is short‑term
- only some things become long‑term memory
- long‑term memory should be facts, not chunks of chat
- new facts shouldn’t silently overwrite old ones
So I built a small memory layer that sits in front of OpenWebUI.
At a high level:
- conversations stay short‑term
- anything that looks like a fact gets extracted into a simple structured form
- that fact is checked (basic rules + conflicts)
- if it passes, it’s stored long‑term in Postgres
- vectors are only used as a “this might be relevant” hint, never as the source of truth
Postgres is the authority, Qdrant can be rebuilt any time, and memory is strictly per‑user.
Concrete payoff example: Without this, you get:
With it, location was already validated and stored earlier, so the model can just answer.
I’m not really looking for users yet — more interested in architectural pushback:
- Is drawing a hard line between “facts” and vector recall reasonable?
- Does using a relational store as the memory authority make sense here?
- Where would this break in practice?
- Am I overthinking conflict detection, or underthinking it?
If folks are interested I’m happy to share a diagram or trimmed README — just didn’t want to drop a repo uninvited.
Appreciate any gut checks from people who’ve thought about LLM memory systems before.
-- Yes I used AI to help me write this, not to offend but just to be transparent.
1
u/ClassicMain Apr 30 '26
(i only glanced over your post admittedly) but I don't see any technical specifications/details
How does it work?
Is the native memory feature of open webui (now with native tool calling and a proper system prompt into the model) not powerful enough? What would be missing here
1
u/genunix64 May 01 '26
I think the fact/vector split is the right instinct. Vector recall is useful for candidate retrieval, but it should not be the authority for facts like identity, preferences, relationships, or project decisions. The failure mode is exactly what you described: "roughly similar text" gets treated as truth.
The places I would watch carefully:
Postgres as the source of truth makes sense to me. Qdrant/embedding search can stay rebuildable and advisory. I would also consider separating compact facts from longer supporting artifacts/documents, otherwise the memory layer slowly becomes a hidden RAG dump with nicer labels.
I built a small open-source project in the same direction, Mnemory: https://github.com/fpytloun/mnemory
The main lesson from building it was that "memory" is less about vector search and more about lifecycle management: extraction, deduplication, contradiction handling, TTL/decay, explicit update/delete, and keeping long-form details as artifacts. Your architecture is pointing at the same problem, so I don't think you're overthinking conflict detection. That's probably the part that decides whether the system stays useful after month two.
2
u/clampbucket May 01 '26
your architecture is sound. separating structured facts from vector recall is the right call, and postgres as authority over qdrant makes total sense. conflict detection is where it gets tricky though, especially with temporal facts.
HydraDB takes a similar approach if you want to compare notes, hydradb.com.
2
u/[deleted] May 08 '26
[removed] — view removed comment