graphiti/graphiti_core/utils/maintenance
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
..
__init__.py Gemini support (#324) 2025-04-06 09:27:04 -07:00
community_operations.py Add support for Kuzu as the graph driver (#799) 2025-08-27 11:45:21 -04:00
dedup_helpers.py Refactor batch deduplication logic to enhance node resolution and track duplicate pairs (#929) (#936) 2025-09-26 08:40:18 -07:00
edge_operations.py fix: Prevent duplicate edge facts within same episode 2025-09-30 20:34:17 -07:00
graph_data_operations.py OpenSearch updates (#906) 2025-09-14 01:43:37 -04:00
node_operations.py Fix index out of range errors in LLM deduplication responses (#939) 2025-09-26 14:57:48 -07:00
temporal_operations.py ensure ascii default to false (#817) 2025-08-08 11:20:02 -04:00
utils.py chore: Fix packaging (#38) 2024-08-25 10:07:50 -07:00