graphiti/graphiti_core/utils
Daniel Chalef 160a8a1310 fix: Prevent duplicate edge facts within same episode
This fixes three related bugs that allowed verbatim duplicate edge facts:

1. Fixed LLM deduplication: Changed related_edges_context to use integer
   indices instead of UUIDs, matching the EdgeDuplicate model expectations.

2. Fixed batch deduplication: Removed episode skip in dedupe_edges_bulk
   that prevented comparing edges from the same episode. Added self-comparison
   guard to prevent edge from comparing against itself.

3. Added fast-path deduplication: Added exact string matching before parallel
   processing in resolve_extracted_edges to catch within-episode duplicates
   early, preventing race conditions where concurrent edges can't see each other.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-30 20:34:17 -07:00
..
maintenance fix: Prevent duplicate edge facts within same episode 2025-09-30 20:34:17 -07:00
ontology_utils move summary out of attribute extraction (#792) 2025-07-31 12:15:21 -04:00
__init__.py refactor: use utc_now() for consistent UTC datetime handling (#234) 2024-12-09 10:36:04 -08:00
bulk_utils.py fix: Prevent duplicate edge facts within same episode 2025-09-30 20:34:17 -07:00
datetime_utils.py Add support for Kuzu as the graph driver (#799) 2025-08-27 11:45:21 -04:00