An output specification defines the required response structure, fields, data types, and validity constraints. In a natural-language-to-Cypher pipeline, it serves as the final prompt component that directs the model toward structured JSON output. section 14.7.2
A complete specification sits after the prompt has assembled:
- The user’s question, delimited for clear instruction boundaries. section 14.7.2
- The annotated graph schema that the generated Cypher query must follow. section 14.7.2
- Intent-dependent requirements, examples, optional user selections, and knowledge-graph-specific annotations. section 14.7.2
Natural language to Cypher
A prompt asks an LLM to translate a user question into a Neo4j Cypher query, supplies the graph schema and requirements, and specifies structured JSON as the response format. section 14.7.2
Figure 14.11 The complete flow of transforming a natural language question into a Cypher query, showing how three inputs are processed through structured prompt components. The process is organized into three stages (Input processing, Context building, and Final guidelines) that culminate in structured JSON output.
The pipeline diagram connects input processing, context building, and final guidelines before producing structured JSON output. section 14.7.2
