One Belief Per Fact: Building Agent Memory for Users Who Change Their Minds
Описание и применение
Система памяти агента теперь хранит одну актуальную версию каждой фактической информации, сохраняя историю и помечая конфликты, что устраняет неоднозначные ответы при изменении мнения пользователя.
Задача
Agent memory systems often store multiple contradictory facts per user, leading to ambiguous or conflicting responses when a user changes their mind across sessions.
Результат
The system now returns a single, up‑to‑date belief per fact, with a clear version chain and conflict flag, eliminating ambiguous responses and enabling auditability.
Рабочий процесс
- 1. Capture raw episodic log after each session.
- 2. Asynchronously project log entries into typed, self‑contained fact sentences using an LLM.
- 3. Embed only the fact sentence text into a vector table; store metadata (key, version, provenance, flags) separately.
- 4. On write, fetch existing belief by stable key, compare new fact with LLM to decide SAME/UPDATE/CONFLICT.
- 5. For SAME: append session to provenance; for UPDATE: archive old, write new with current:true; for CONFLICT: archive old, write new with current:true, set contradiction flag.
- 6. On read, embed query sentence, perform vector search, filter results by current:true to surface the latest belief.
- 7. If a conflict flag is present, downstream agents can alert or handle accordingly.
- 8. Preserve history for audit and potential rollback.
- 9. (Future) Mark multi‑valued fact types to append rather than overwrite.
Доказательства
The first cut of the semantic tier keyed facts by session. Every session inserted new rows, so after a handful of sessions there were six copies of Priya's risk tolerance, some of them contradicting each other, and no notion of "current."
The update procedure is search-then-decide. When the projector extracts a new fact, it first fetches the existing belief under that key, then an LLM compares old against new and returns exactly one of three verdicts: SAME, UPDATE, CONFLICT.
When a CONFLICT is detected, three things happen at once, and the design is deliberately not "silently overwrite."
- Дата записи: 2026-09-22T17:30:49.026Z