JSON is a text-based format for representing structured values. In query-generation workflows, requiring a valid JSON object makes model responses predictable and easy to process programmatically. section 14.7.2
A reliable JSON response defines the expected structure explicitly:
- Specify each field the response must contain. section 14.7.2
- Provide hints for expected value types and comments describing each field's purpose. section 14.7.2
- Reject surrounding commentary so the result remains a valid JSON object. section 14.7.2
Structured query-generation response
A response can define relationships to traverse, a reasoning string, a Cypher query string, and a success boolean. This schema lets downstream code inspect the result consistently. 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 figure maps input processing, context building, and final guidelines to structured JSON output, clarifying the complete transformation pipeline. section 14.7.2


































