Neo4j, Graph, Langchain, Llm, OpenAI.
(c:Chunk)<-[:HAS_CHUNK]-(a:Article) WHERE # EXISTS {(a)-[:MENTIONS]->(:Organization)-[:IN_CITY]->()-[:IN_COUNTRY]->(:Country {name: $country})} AND # a.sentiment < $sentiment # WITH c, a, vector.similarity.cosine(c.embedding,$embedding) AS score # ORDER BY score DESC LIMIT toInteger($k) # RETURN