Deleting Data from the Graph
Delete an Edge
Here’s how to delete an edge from a graph:
Note that when you delete an edge, it never deletes the associated nodes, even if it means there will be a node with no edges.
Delete a Node
Here’s how to delete a node from a graph:
Deleting a node will also delete all edges connected to that node. This is a cascading delete operation - the node and all its relationships are permanently removed from the graph.
Delete an Episode
Deleting an episode does not regenerate the names or summaries of nodes shared with other episodes. This episode information may still exist within these nodes. If an episode invalidates a fact, and the episode is deleted, the fact will remain marked as invalidated.
When you delete an episode, it will delete all the edges associated with it, and it will delete any nodes that are only attached to that episode. Nodes that are also attached to another episode will not be deleted.
Here’s how to delete an episode from a graph:
Delete a Thread
Deleting a thread removes all episodes associated with that thread. This triggers a cascading effect on the graph.
When a thread is deleted, each associated episode is removed. For each episode:
- Edges are deleted if they were created by that specific episode
- Nodes are deleted only if no other episodes reference them
This design preserves graph integrity. If multiple conversations mention the same entity or establish the same relationship, deleting one thread will not remove data that other threads contributed to the graph.
Here’s how to delete a thread: