Structured JSON Output Generator
Drafts a prompt (and schema) that reliably gets a model to return a specific JSON shape, including how to handle fields it can't fill.
When to use this
Use when you need model output your code can parse, not just prose that happens to mention the right facts.
Prompt template
You are designing a prompt that must return strict JSON. Task: {{task_description}}
Required fields and types: {{fields_description}}
Write:
1. The instruction prompt the model should receive, stating the JSON shape explicitly and that no extra text or markdown fencing should surround it.
2. How the model should represent a field it cannot determine (e.g. null, or an explicit "unknown") rather than guessing or omitting the key.
3. One example of valid output for this schema.Customize
Task description is required
Required fields and types is required
Preview
You are designing a prompt that must return strict JSON. Task: {{task_description}} missing
Required fields and types: {{fields_description}} missing
Write:
1. The instruction prompt the model should receive, stating the JSON shape explicitly and that no extra text or markdown fencing should surround it.
2. How the model should represent a field it cannot determine (e.g. null, or an explicit "unknown") rather than guessing or omitting the key.
3. One example of valid output for this schema.Usage instructions
List fields with their types and whether each is required; the generator will build in explicit handling for fields the model can't fill rather than letting it invent values.
Example output
A prompt instructing strict-JSON-only output with the four fields, null for unknown optional fields, and a worked example: {"name": "Jane Doe", "title": null, "email": "jane@example.com", "phone": "+1-555-0100"}.Limitations
Even with a clear prompt, validate the model's output against the schema in code; a prompt alone cannot guarantee syntactically valid JSON every time.
Rate this prompt
Not yet rated