{
  "title": "Structured JSON Output Generator",
  "description": "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.",
  "category": "Prompt Engineering",
  "tags": [
    "prompt-engineering",
    "json",
    "structured-output"
  ],
  "templateContent": "You are designing a prompt that must return strict JSON. Task: {{task_description}}\nRequired fields and types: {{fields_description}}\n\nWrite:\n1. The instruction prompt the model should receive, stating the JSON shape explicitly and that no extra text or markdown fencing should surround it.\n2. How the model should represent a field it cannot determine (e.g. null, or an explicit \"unknown\") rather than guessing or omitting the key.\n3. One example of valid output for this schema.",
  "variables": [
    {
      "name": "task_description",
      "label": "Task description",
      "type": "text",
      "required": true,
      "default": null,
      "allowedValues": null
    },
    {
      "name": "fields_description",
      "label": "Required fields and types",
      "type": "multiline",
      "required": true,
      "default": null,
      "allowedValues": null
    }
  ],
  "usageInstructions": "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.",
  "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."
}