# Issue with LLM Understanding Relationships with Properties in Neo4j Schema

**URL:** <https://community.neo4j.com/t/issue-with-llm-understanding-relationships-with-properties-in-neo4j-schema/71890>\
**Category:** GenAI\
**Created:** [December 16, 2024, 12:00am UTC](https://community.neo4j.com/t/issue-with-llm-understanding-relationships-with-properties-in-neo4j-schema/71890 "2024-12-16T00:00:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![srilekhap7720](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/srilekhap7720/32/33590_2.png) [@srilekhap7720](https://community.neo4j.com/u/srilekhap7720)\
**Post date:** [December 16, 2024, 12:00am UTC](https://community.neo4j.com/t/issue-with-llm-understanding-relationships-with-properties-in-neo4j-schema/71890/1 "2024-12-16T00:00:26Z")

</div>

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:

1. Recognize and utilize relationships with property keys effectively in generated Cypher queries.
2. 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.

1. How can I better configure `GraphCypherQAChain` to handle relationship properties dynamically?
2. Is there a built-in way to improve schema validation or force property recognition for relationships?
3. Suggestions to address incomplete or incorrect Cypher queries when properties of relationships are involved
