graphiti icon indicating copy to clipboard operation
graphiti copied to clipboard

How to forget knowledge?

Open kryyyyyy opened this issue 4 months ago • 5 comments

As more and more knowledge is added, it seems that the only option is to add an invalid_at attribute to some invalid edges.

As the graph continues to expand, is there an effective way to control its size? Perhaps some edges or nodes that have not been accessed for a long time can be deleted?

Limit the size of the graph while accurately capturing user interests.

kryyyyyy avatar Aug 26 '25 07:08 kryyyyyy

Two approaches:

  • Run a process that deletes old edges (and possibly nodes). You can filter search and retrieval by created_at or valid_at or even invalid_at dates.
  • Retain the data in the graph, but filter your search queries as above.

danielchalef avatar Aug 26 '25 21:08 danielchalef

Thank you for your reply.

Setting invalid_at does indeed allow direct soft deletion of edges. However, the key challenge lies in how to filter out the edges to be deleted.

An agent's memory should not grow indefinitely. It should forget some unimportant knowledge over time (that may introduce noise during retrieval) and consistently align with knowledge relevant to the user's interests.

This is an interesting and challenging task.

kryyyyyy avatar Aug 27 '25 09:08 kryyyyyy

@kryyyyyy Is this still relevant? Please confirm within 14 days or this issue will be closed.

claude[bot] avatar Oct 06 '25 00:10 claude[bot]

@kryyyyyy Is this still an issue? Please confirm within 14 days or this issue will be closed.

claude[bot] avatar Oct 22 '25 00:10 claude[bot]

@kryyyyyy Is this still relevant? Please confirm within 14 days or this issue will be closed.

claude[bot] avatar Nov 17 '25 00:11 claude[bot]