graphiti icon indicating copy to clipboard operation
graphiti copied to clipboard

BUG: `retrieve_episodes` always return no results

Open zshaoz opened this issue 7 months ago • 2 comments

What you were trying to do when you encountered the bug I have populated the graph database through adding new episodes. I have confirmed that the relevant nodes and edges are successfully create. So, i attempted to fetch the recent few episodes through retrieve_episodes. See code block:

    episodes = await graphiti.retrieve_episodes(
        reference_time=datetime.now(),
        group_ids=[group_id],
    )

What you expected to happen Return the last_n episodic nodes.

What actually happened No episodic nodes returned.

A code sample or test case that demonstrates the issue

    episodes = await graphiti.retrieve_episodes(
        reference_time=datetime.now(),
        group_ids=[group_id],
    )

episodes shows an empty list.

zshaoz avatar May 27 '25 05:05 zshaoz

I already have the solution at hand. On line: https://github.com/getzep/graphiti/blob/main/graphiti_core/utils/maintenance/graph_data_operations.py#L143 Simple change $reference_time to datetime($reference_time) would fix the issue.

zshaoz avatar May 27 '25 05:05 zshaoz

I already have the solution at hand. On line: https://github.com/getzep/graphiti/blob/main/graphiti_core/utils/maintenance/graph_data_operations.py#L143 Simple change $reference_time to datetime($reference_time) would fix the issue.

Why not PR it if it's a fix?

TheEpTic avatar May 30 '25 18:05 TheEpTic

Have you confirmed that you are using the correct group_id?

prasmussen15 avatar Jun 13 '25 15:06 prasmussen15

datetime($reference_time) is not required as Neo4j does an implicit conversion.

danielchalef avatar Jun 13 '25 16:06 danielchalef

@prasmussen15 Yes, I am using the correct group_id.

zshaoz avatar Jun 16 '25 15:06 zshaoz

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

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

@zshaoz 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]

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

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

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

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