I am building a Neo4j-powered chatbot using LangChain's GraphCypherQAChain
. My Neo4j schema includes relationships with properties
While the LLM correctly generates queries for nodes and simple relationships, it struggles to:
- Recognize and utilize relationships with property keys effectively in generated Cypher queries.
- Validate schema details dynamically, leading to syntax errors or incomplete results.
For instance, questions like "What is the highest monthly payment?" generate invalid or incomplete queries, failing to access relationship properties because payment details are a property key of a relationship in my schema.
- How can I better configure
GraphCypherQAChain
to handle relationship properties dynamically? - Is there a built-in way to improve schema validation or force property recognition for relationships?
- Suggestions to address incomplete or incorrect Cypher queries when properties of relationships are involved