To check the if the relationship already exists between two nodes and if it already exists then it should merge the relationship not the Nodes.
I have faced same issue of duplicate relationships getting created between two nodes in Knowledge Graph.
...