graphiti-core 0.11.4__py3-none-any.whl → 0.11.5__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.

@@ -77,11 +77,6 @@ def node(context: dict[str, Any]) -> list[Message]:
77
77
  duplicate_entity_id should be set to -1.
78
78
 
79
79
  Also return the most complete name for the entity.
80
-
81
- Guidelines:
82
- 1. Entities with the same name should be considered duplicates
83
- 2. Duplicate entities may refer to the same real-world entity even if names differ. Use context clues from the MESSAGES
84
- to determine if the NEW ENTITY represents a duplicate entity of one of the EXISTING ENTITIES.
85
80
  """,
86
81
  ),
87
82
  ]
@@ -34,8 +34,10 @@ from graphiti_core.prompts.extract_nodes import (
34
34
  ExtractedEntity,
35
35
  MissedEntities,
36
36
  )
37
+ from graphiti_core.search.search import search
38
+ from graphiti_core.search.search_config import SearchResults
39
+ from graphiti_core.search.search_config_recipes import NODE_HYBRID_SEARCH_RRF
37
40
  from graphiti_core.search.search_filters import SearchFilters
38
- from graphiti_core.search.search_utils import get_relevant_nodes
39
41
  from graphiti_core.utils.datetime_utils import utc_now
40
42
 
41
43
  logger = logging.getLogger(__name__)
@@ -227,13 +229,23 @@ async def resolve_extracted_nodes(
227
229
  entity_types: dict[str, BaseModel] | None = None,
228
230
  ) -> tuple[list[EntityNode], dict[str, str]]:
229
231
  llm_client = clients.llm_client
230
- driver = clients.driver
231
232
 
232
- # Find relevant nodes already in the graph
233
- existing_nodes_lists: list[list[EntityNode]] = await get_relevant_nodes(
234
- driver, extracted_nodes, SearchFilters()
233
+ search_results: list[SearchResults] = await semaphore_gather(
234
+ *[
235
+ search(
236
+ clients=clients,
237
+ query=node.name,
238
+ query_vector=node.name_embedding,
239
+ group_ids=[node.group_id],
240
+ search_filter=SearchFilters(),
241
+ config=NODE_HYBRID_SEARCH_RRF,
242
+ )
243
+ for node in extracted_nodes
244
+ ]
235
245
  )
236
246
 
247
+ existing_nodes_lists: list[list[EntityNode]] = [result.nodes for result in search_results]
248
+
237
249
  resolved_nodes: list[EntityNode] = await semaphore_gather(
238
250
  *[
239
251
  resolve_extracted_node(
@@ -282,6 +294,7 @@ async def resolve_extracted_node(
282
294
  'id': i,
283
295
  'name': node.name,
284
296
  'entity_types': node.labels,
297
+ 'summary': node.summary,
285
298
  },
286
299
  **node.attributes,
287
300
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: graphiti-core
3
- Version: 0.11.4
3
+ Version: 0.11.5
4
4
  Summary: A temporal graph building library
5
5
  License: Apache-2.0
6
6
  Author: Paul Paliychuk
@@ -31,7 +31,7 @@ graphiti_core/models/nodes/node_db_queries.py,sha256=AQgRGVO-GgFWfLq1G6k8s86WItw
31
31
  graphiti_core/nodes.py,sha256=_V1KkM31MEVv688ovXlXmBVeibm20d8FEps5jMDPlp0,17774
32
32
  graphiti_core/prompts/__init__.py,sha256=EA-x9xUki9l8wnu2l8ek_oNf75-do5tq5hVq7Zbv8Kw,101
33
33
  graphiti_core/prompts/dedupe_edges.py,sha256=q60fqIjFQlOzOeL7Y35gwABWQBqKkMarBQBok1pj1C4,3409
34
- graphiti_core/prompts/dedupe_nodes.py,sha256=viIfdCJ-KwJ72fSd9TMzR9nBQ8G4bV4cgHmPk3-cryQ,4464
34
+ graphiti_core/prompts/dedupe_nodes.py,sha256=hdeBMkSL1Ixt-Pu89PIDCoLvyc0zy2uX3kp4MzY2kzI,4138
35
35
  graphiti_core/prompts/eval.py,sha256=gnBQTmwsCl3Qvwpcm7aieVszzo6y1sMCUT8jQiKTvvE,5317
36
36
  graphiti_core/prompts/extract_edge_dates.py,sha256=3Drs3CmvP0gJN5BidWSxrNvLet3HPoTybU3BUIAoc0Y,4218
37
37
  graphiti_core/prompts/extract_edges.py,sha256=uSoQS32rpUzQJGEhayErMdj72rocGdqVq54Macjf7po,5102
@@ -56,11 +56,11 @@ graphiti_core/utils/maintenance/__init__.py,sha256=vW4H1KyapTl-OOz578uZABYcpND4w
56
56
  graphiti_core/utils/maintenance/community_operations.py,sha256=aLMfQ5l8PkNJY3ugqV6UOMG74aI6L9Zz2zFiLBsnKvM,10155
57
57
  graphiti_core/utils/maintenance/edge_operations.py,sha256=xfYo49ufpJmGG6sinMxwRwGx83swADoE40m8bp3gC30,14418
58
58
  graphiti_core/utils/maintenance/graph_data_operations.py,sha256=BIJKc8tbvU4IjWxLgeotw57b1eE3Iw8YtV74j6eo4RQ,7493
59
- graphiti_core/utils/maintenance/node_operations.py,sha256=JMHQUO3beoGnSwxI4_BSNCWi-FkbeFJjNyv60HUjPww,15088
59
+ graphiti_core/utils/maintenance/node_operations.py,sha256=9pvAEoVIiT_RpRJYvZpvSobP2_oq-37IdHRHRcmVO1Q,15559
60
60
  graphiti_core/utils/maintenance/temporal_operations.py,sha256=mJkw9xLB4W2BsLfC5POr0r-PHWL9SIfNj_l_xu0B5ug,3410
61
61
  graphiti_core/utils/maintenance/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
62
  graphiti_core/utils/ontology_utils/entity_types_utils.py,sha256=QJX5cG0GSSNF_Mm_yrldr69wjVAbN_MxLhOSznz85Hk,1279
63
- graphiti_core-0.11.4.dist-info/LICENSE,sha256=KCUwCyDXuVEgmDWkozHyniRyWjnWUWjkuDHfU6o3JlA,11325
64
- graphiti_core-0.11.4.dist-info/METADATA,sha256=9RLaTlVrMvQKyqjpbyWLvTPQ514DhFrqVmgo5hZYJPE,15348
65
- graphiti_core-0.11.4.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
66
- graphiti_core-0.11.4.dist-info/RECORD,,
63
+ graphiti_core-0.11.5.dist-info/LICENSE,sha256=KCUwCyDXuVEgmDWkozHyniRyWjnWUWjkuDHfU6o3JlA,11325
64
+ graphiti_core-0.11.5.dist-info/METADATA,sha256=VW8Ca8H_RpAoQ232EdjNLl6AlMzjWCUkqUY8bXp_k-A,15348
65
+ graphiti_core-0.11.5.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
66
+ graphiti_core-0.11.5.dist-info/RECORD,,