graphiti icon indicating copy to clipboard operation
graphiti copied to clipboard

neo4j.exceptions.CypherTypeError:

Open tom1978 opened this issue 8 months ago • 2 comments

Environment: 1、neo4j Version:5.27.0 Edition:community 2、python3.11 3、graphiti_core0.10.5

Error: neo4j.exceptions.CypherTypeError: {code: Neo.ClientError.Statement.TypeError} {message: Property values can only be of primitive types or arrays thereof. Encountered: Map{summary -> Map{description -> String("The customer is experiencing an issue with their Allbirds shoes, specifically the sole coming off after only 2 months of use. They have reached out to support for assistance and have been asked to provide their order number."), title -> String("Summary"), type -> String("string")}}.}

I checked the prompt and found that the node's summary is a dictionary placed inside the node's attributes. Below is a JSON snippet generated by the final node, where you can see the nested dictionary: summary='', attributes={'properties': {'summary': {'description': 'A customer reported an issue with their Allbirds shoes, stating that the sole is coming off after only 2 months of use. The customer contacted support for assistance and was asked to provide their order number.', 'title': 'Summary', 'type': 'string'}}, 'required': ['summary'], 'title': 'EntityAttributes', 'type': 'object'}),

Here is a snippet of the system prompt: \n\nRespond with a JSON object in the following format:\n\n{"properties": {"summary": {"description": "Summary containing the important information about the entity. Under 500 words", "title": "Summary", "type": "string"}}, "required": ["summary"], "title": "EntityAttributes", "type": "object"}'}]

tom1978 avatar Apr 29 '25 02:04 tom1978

Which LLM are you using?

prasmussen15 avatar May 04 '25 14:05 prasmussen15

I used the DashScope model qwen-turbo-latest and encountered the same problem.

runtuchixigua avatar May 11 '25 04:05 runtuchixigua

Graphiti makes heavy use of structured outputs. If the model is incapable of reliably outputting the required format, Graphiti will error out in this way. Please see the note here: https://help.getzep.com/graphiti/graphiti/installation#openai-compatible-llm-providers

danielchalef avatar May 11 '25 16:05 danielchalef