LightMem icon indicating copy to clipboard operation
LightMem copied to clipboard

feature question: memory update

Open Arashimu opened this issue 8 months ago • 5 comments

Does it support automatic replacement of outdated or incorrect information during memory updates.

Arashimu avatar Mar 30 '26 08:03 Arashimu

Yes, automatic updates are performed during the offline update stage.

JizhanFang avatar Mar 30 '26 13:03 JizhanFang

hi do you have any other questions?

zxlzr avatar Apr 05 '26 02:04 zxlzr

hi do you have any other questions?你好,你还有其他问题吗?

I know LightMem can update automatically, but what I'm more interested in is whether it updates old historical memories when it updates. For example, if there was a fact A saved in memory before, but it was later discovered that fact A was incorrect and fact B was correct, will fact B be used to replace the contextual memory where fact A was originally located.

Arashimu avatar Apr 05 '26 02:04 Arashimu

Great question!

LightMem's offline update mechanism (construct_update_queue_all_entries + offline_update_all_entries) handles exactly this scenario. When fact B (newer) is found to contradict fact A (older), the LLM evaluates both and takes one of three actions:

  • Delete – If B directly contradicts A, the old entry is removed from the vector store.
  • Update – If B refines or enriches A, A's content is merged with the new information.
  • Ignore – If A and B are unrelated, no action is taken.

Caveats to be aware of:

This only updates the extracted memory facts in the vector store, the raw original conversation context is not retroactively rewritten.

More robust conflict detection is something we're actively considering for future improvements.

Xubqpanda avatar Apr 05 '26 04:04 Xubqpanda

Thanks

Arashimu avatar Apr 07 '26 01:04 Arashimu