getzep / graphiti

Build and query dynamic, temporally-aware Knowledge Graphs
https://help.getzep.com/graphiti
Apache License 2.0
1.4k stars 75 forks source link

Bulk add nodes and edges #205

Closed prasmussen15 closed 3 weeks ago

prasmussen15 commented 3 weeks ago

[!IMPORTANT] Enhance graph database operations with bulk node and edge processing and introduce parallel runtime support for improved performance.

  • Behavior:
    • Add group_id parameter to add_episode in graphiti.py.
    • Replace individual node and edge saves with add_nodes_and_edges_bulk() in graphiti.py.
    • Introduce USE_PARALLEL_RUNTIME in helpers.py for parallel query execution.
  • Database Queries:
    • Add bulk save queries EPISODIC_EDGE_SAVE_BULK and ENTITY_EDGE_SAVE_BULK in edge_db_queries.py.
    • Add bulk save queries EPISODIC_NODE_SAVE_BULK and ENTITY_NODE_SAVE_BULK in node_db_queries.py.
  • Search Utilities:
    • Use USE_PARALLEL_RUNTIME to conditionally apply parallel runtime in search_utils.py.
    • Reduce MAX_QUERY_LENGTH to 32 in search_utils.py.
  • Utilities:
    • Add add_nodes_and_edges_bulk() and add_nodes_and_edges_bulk_tx() in bulk_utils.py for batch processing of nodes and edges.

This description was created by Ellipsis for 6f9d003d58feb9161423acf8b5309a485160404c. It will automatically update as commits are pushed.