graphiti-core 0.21.0rc7__py3-none-any.whl → 0.21.0rc8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of graphiti-core might be problematic. Click here for more details.
- graphiti_core/utils/bulk_utils.py +4 -3
- graphiti_core/utils/maintenance/edge_operations.py +17 -1
- {graphiti_core-0.21.0rc7.dist-info → graphiti_core-0.21.0rc8.dist-info}/METADATA +1 -1
- {graphiti_core-0.21.0rc7.dist-info → graphiti_core-0.21.0rc8.dist-info}/RECORD +6 -6
- {graphiti_core-0.21.0rc7.dist-info → graphiti_core-0.21.0rc8.dist-info}/WHEEL +0 -0
- {graphiti_core-0.21.0rc7.dist-info → graphiti_core-0.21.0rc8.dist-info}/licenses/LICENSE +0 -0
|
@@ -433,14 +433,15 @@ async def dedupe_edges_bulk(
|
|
|
433
433
|
dedupe_tuples: list[tuple[EpisodicNode, EntityEdge, list[EntityEdge]]] = []
|
|
434
434
|
for i, edges_i in enumerate(extracted_edges):
|
|
435
435
|
existing_edges: list[EntityEdge] = []
|
|
436
|
-
for
|
|
437
|
-
if i == j:
|
|
438
|
-
continue
|
|
436
|
+
for edges_j in extracted_edges:
|
|
439
437
|
existing_edges += edges_j
|
|
440
438
|
|
|
441
439
|
for edge in edges_i:
|
|
442
440
|
candidates: list[EntityEdge] = []
|
|
443
441
|
for existing_edge in existing_edges:
|
|
442
|
+
# Skip self-comparison
|
|
443
|
+
if edge.uuid == existing_edge.uuid:
|
|
444
|
+
continue
|
|
444
445
|
# Approximate BM25 by checking for word overlaps (this is faster than creating many in-memory indices)
|
|
445
446
|
# This approach will cast a wider net than BM25, which is ideal for this use case
|
|
446
447
|
if (
|
|
@@ -232,6 +232,22 @@ async def resolve_extracted_edges(
|
|
|
232
232
|
edge_types: dict[str, type[BaseModel]],
|
|
233
233
|
edge_type_map: dict[tuple[str, str], list[str]],
|
|
234
234
|
) -> tuple[list[EntityEdge], list[EntityEdge]]:
|
|
235
|
+
# Fast path: deduplicate exact matches within the extracted edges before parallel processing
|
|
236
|
+
seen: dict[tuple[str, str, str], EntityEdge] = {}
|
|
237
|
+
deduplicated_edges: list[EntityEdge] = []
|
|
238
|
+
|
|
239
|
+
for edge in extracted_edges:
|
|
240
|
+
key = (
|
|
241
|
+
edge.source_node_uuid,
|
|
242
|
+
edge.target_node_uuid,
|
|
243
|
+
_normalize_string_exact(edge.fact),
|
|
244
|
+
)
|
|
245
|
+
if key not in seen:
|
|
246
|
+
seen[key] = edge
|
|
247
|
+
deduplicated_edges.append(edge)
|
|
248
|
+
|
|
249
|
+
extracted_edges = deduplicated_edges
|
|
250
|
+
|
|
235
251
|
driver = clients.driver
|
|
236
252
|
llm_client = clients.llm_client
|
|
237
253
|
embedder = clients.embedder
|
|
@@ -465,7 +481,7 @@ async def resolve_extracted_edge(
|
|
|
465
481
|
|
|
466
482
|
# Prepare context for LLM
|
|
467
483
|
related_edges_context = [
|
|
468
|
-
{'id':
|
|
484
|
+
{'id': i, 'fact': edge.fact} for i, edge in enumerate(related_edges)
|
|
469
485
|
]
|
|
470
486
|
|
|
471
487
|
invalidation_edge_candidates_context = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: graphiti-core
|
|
3
|
-
Version: 0.21.
|
|
3
|
+
Version: 0.21.0rc8
|
|
4
4
|
Summary: A temporal graph building library
|
|
5
5
|
Project-URL: Homepage, https://help.getzep.com/graphiti/graphiti/overview
|
|
6
6
|
Project-URL: Repository, https://github.com/getzep/graphiti
|
|
@@ -64,18 +64,18 @@ graphiti_core/search/search_utils.py,sha256=ak1aBeKNuxS7szydNHwva2ABWSRlQ0S_v8ZO
|
|
|
64
64
|
graphiti_core/telemetry/__init__.py,sha256=5kALLDlU9bb2v19CdN7qVANsJWyfnL9E60J6FFgzm3o,226
|
|
65
65
|
graphiti_core/telemetry/telemetry.py,sha256=47LrzOVBCcZxsYPsnSxWFiztHoxYKKxPwyRX0hnbDGc,3230
|
|
66
66
|
graphiti_core/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
67
|
-
graphiti_core/utils/bulk_utils.py,sha256=
|
|
67
|
+
graphiti_core/utils/bulk_utils.py,sha256=7qjoqRxY9dFrj16iBMPMtkilxUH26dRuX6NaDaqL82E,20346
|
|
68
68
|
graphiti_core/utils/datetime_utils.py,sha256=J-zYSq7-H-2n9hYOXNIun12kM10vNX9mMATGR_egTmY,1806
|
|
69
69
|
graphiti_core/utils/maintenance/__init__.py,sha256=vW4H1KyapTl-OOz578uZABYcpND4wPx3Vt6aAPaXh78,301
|
|
70
70
|
graphiti_core/utils/maintenance/community_operations.py,sha256=XMiokEemn96GlvjkOvbo9hIX04Fea3eVj408NHG5P4o,11042
|
|
71
71
|
graphiti_core/utils/maintenance/dedup_helpers.py,sha256=B7k6KkB6Sii8PZCWNNTvsNiy4BNTNWpoLeGgrPLq6BE,9220
|
|
72
|
-
graphiti_core/utils/maintenance/edge_operations.py,sha256=
|
|
72
|
+
graphiti_core/utils/maintenance/edge_operations.py,sha256=H8HF4AzUH6J0eKYNIyxB50-px6IV0QqLzABrZ6a46Dc,25319
|
|
73
73
|
graphiti_core/utils/maintenance/graph_data_operations.py,sha256=42icj3S_ELAJ-NK3jVS_rg_243dmnaZOyUitJj_uJ-M,6085
|
|
74
74
|
graphiti_core/utils/maintenance/node_operations.py,sha256=TKpXPtnTVxxan8I1xQyVkGn3zyRdb_Q00cgUpLcloig,16860
|
|
75
75
|
graphiti_core/utils/maintenance/temporal_operations.py,sha256=IIaVtShpVkOYe6haxz3a1x3v54-MzaEXG8VsxFUNeoY,3582
|
|
76
76
|
graphiti_core/utils/maintenance/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
77
77
|
graphiti_core/utils/ontology_utils/entity_types_utils.py,sha256=4eVgxLWY6Q8k9cRJ5pW59IYF--U4nXZsZIGOVb_yHfQ,1285
|
|
78
|
-
graphiti_core-0.21.
|
|
79
|
-
graphiti_core-0.21.
|
|
80
|
-
graphiti_core-0.21.
|
|
81
|
-
graphiti_core-0.21.
|
|
78
|
+
graphiti_core-0.21.0rc8.dist-info/METADATA,sha256=CXKBnA11FdR52aRDYAt3bGCQYp7oRPChGXZ-K4ZuCR8,27084
|
|
79
|
+
graphiti_core-0.21.0rc8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
80
|
+
graphiti_core-0.21.0rc8.dist-info/licenses/LICENSE,sha256=KCUwCyDXuVEgmDWkozHyniRyWjnWUWjkuDHfU6o3JlA,11325
|
|
81
|
+
graphiti_core-0.21.0rc8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|