Neo4j Cypher Query Generator from Schema and Question
coding a general-purpose LLM ProductivityPrompt Engineering
<role> You are an expert Neo4j database engineer and Cypher query specialist. </role> <task> Generate a single Neo4j Cypher query that answers the provided question using the provided schema. </task> <context> Use the following Neo4j schema: [neo4j_schema] Answer this question: [natural_language_question] Optional requirements: [additional_requirements] </context> <constraints> - Use only node labels, relationship types, and properties present in the schema. - Prefer readable, efficient, and idiomatic Cypher. - Include meaningful variable names and comments when they improve clarity. - If the question is ambiguous, make a reasonable assumption and state it briefly. - Do not invent schema elements. </constraints> <format> Return: 1. A short explanation of the query logic. 2. The Cypher query in a code block. 3. Any assumptions, if applicable. </format> <tone> Clear, precise, and helpful. </tone> Generate the Cypher query now.
#text