You ask an AI for a neat table and get three paragraphs and a bullet list. You ask for JSON and get JSON wrapped in a friendly explanation, with one key renamed and a trailing sentence that breaks your parser. Your format request was one clause buried inside a long sentence, competing with the task and the background, and it lost.
This guide shows how to give a format request the weight it needs: state the shape exactly, in its own section of the prompt, and back it with constraints that leave no room for decoration. The free Prompt Builder on Ovatly helps because it builds a prompt from guided fields, role, task, context, tone, output format and constraints, and assembles them in a fixed order under clear headings.
Contents
- Quick answer
- Why format requests get lost
- State the shape, not the idea of the shape
- Constraints that protect the format
- How to build a strict-format prompt, step by step
- Worked example: a tutoring prompt with a table as the output
- Check the result before you trust it
- Limitations and honest expectations
- Common mistakes
- FAQs
- Conclusion
Quick answer
Write the format as an exact specification, not a wish. For a table, name the columns and their order. For JSON, name every key and say what kind of value each key holds. Put that specification in the output format field of the Prompt Builder, add constraints such as "return only the JSON, with no text before or after it", one per line, then copy the assembled prompt into your AI chat tool and check the answer against your specification, because no prompt builder can force a model to comply.
Why format requests get lost
A prompt written as one block of prose asks the model to sort your sentences into jobs: which part is the task, which part is background, which part is the shape of the answer. Long prompts are where this sorting fails, and the format clause is usually the shortest part, so it is the first to be dropped.
Headed sections fix the sorting problem: they make long prompts easier for a model to follow and easier for you to edit later. When a section is labelled Output format and contains nothing but the shape, the model no longer has to guess which sentence describes the answer's structure, and when the result comes back in the wrong shape, you know which single section to rewrite.
State the shape, not the idea of the shape
"Give me a table" is an idea. A shape sounds like this: a markdown table with exactly three columns, headed Item, Cost and Notes, one row per item, in the order the items appear in my text. The difference is that the second version can be checked: either the columns match or they do not.
JSON needs the same treatment. Name the keys, and for each key say what belongs in it: a string, a number, a list of strings. Show the skeleton in your output format field if the structure is nested. For example:
{
"title": "string",
"score": "number from 0 to 10",
"tags": ["string", "string"]
}
Two habits matter here. First, keep the format description inside the output format field only; if you also describe the shape inside the task field, the two descriptions can drift apart. Second, describe the values, not just the keys. A key called "date" collects whatever style the model prefers; "date as YYYY-MM-DD" collects the style you need.
Constraints that protect the format
The constraints field is where you close the exits a model usually takes. Constraints are split by line: one constraint per line becomes one bullet in the assembled prompt, which makes this field the natural home for short, separate rules. Useful ones for strict formats include:
- Return only the table, with no introduction or summary.
- Use exactly the keys I listed, and do not add extra keys.
- If a value is missing from my text, use null instead of guessing.
- Keep every row; do not merge or drop items.
Each of these bans a specific failure you have probably already seen, so write your constraints from your own disappointments. If a previous answer arrived wrapped in an explanation, ban the wrapping. If keys got renamed, ban renaming.
How to build a strict-format prompt, step by step
- Open the Prompt Builder and fill in the task first: what you want the AI to do, with no format talk in it.
- Add a role and context if they matter, for example who the reader is.
- In the output format field, write the exact shape: column names for a table, or key names and value types for JSON.
- List your constraints one per line, including the ones that protect the format.
- Copy the assembled prompt. The sections appear in the fixed order Role, Task, Context, Tone, Output format, Constraints, and any section you left empty is skipped entirely.
- Paste it into your AI chat tool, then check the answer against your specification before you use it.
Worked example: a tutoring prompt with a table as the output
The builder's own example assembles a tutoring prompt from six fields. Role: "You are a patient maths tutor". Task: "Explain fractions to a complete beginner". Context: "The reader is 11 years old and learns best with food examples". Tone: "Friendly and encouraging". Output format: "Short paragraphs with one worked example". Constraints: "Avoid jargon" and "Use examples from cooking", rendered as two bullets.
Now change one field. Replace the output format with: "A markdown table with three columns headed Concept, Food example and Check question, one row per fraction concept, in teaching order". Keep every other field the same. The shape is now specified tightly enough to verify at a glance. If a row goes missing or a fourth column appears, the failure is visible immediately, and the fix is equally visible: add a constraint line such as "One row per concept; do not combine concepts into a single row".
Check the result before you trust it
The builder does not improve or reword your text, it only arranges it, and nothing in an assembled prompt can compel a model to obey. Compliance is likely when the shape is precise and isolated, but never guaranteed, so verification is part of the workflow.
Check mechanically. For JSON, confirm the output parses, the keys match your list exactly, and no text sits outside the structure. For a table, count the columns and rows against the items in your source. When something is off, the repair is usually one line: tighten the output format description or add the missing ban to the constraints, then run the same prompt again.
Limitations and honest expectations
The builder is template assembly, not AI writing: every word in the result is yours, so a vague format description stays vague after assembly. Finally, some requests fight the format itself: asking for strict JSON and a warm explanatory tone in the same prompt invites the model to add the explanation inside or around the JSON, so keep the tone field out when the structure must stay clean.
Common mistakes
- Describing the format inside the task. The shape then competes with the job. Keep it in the output format field, stated once.
- Naming keys without describing values. You get the right keys filled with the wrong content. Say what each key holds.
- One long constraint sentence. Constraints are split by line into bullets, so write one rule per line.
- Asking for JSON and commentary together. Pick one. A ban on text outside the structure only works if nothing else in the prompt invites text.
- Trusting the first result. A shape that looks right can hide a renamed key or a dropped row. Check against the specification every time.
FAQs
Does this tool use AI to write my prompt? No. It is a template: your own words are placed into headed sections. Nothing is sent to a model and nothing is generated.
Which fields are required? None are forced, but a prompt with only a task and no context usually performs worse. The tool asks for at least one field to be filled before it produces output.
Why use headings in a prompt? Headed sections make long prompts easier for a model to follow and easier for you to edit later. If your chat tool prefers plain paragraphs, the sections still read clearly without the heading markers.
Can I reuse the result as a template? Yes. Save the assembled prompt, and next time swap the task and context. The Prompt Variable Filler tool is even better for prompts you reuse often.
Will the builder make the AI follow my format? No. The builder only arranges your text into sections; it does not improve or reword it, and it cannot enforce anything. A clearly separated format section makes compliance more likely, but you still check the result yourself.
Conclusion
Strict formats stop being a lottery when the shape is specified exactly, isolated in its own section, and defended by constraints written from real failures. The Prompt Builder gives that structure a fixed home, and the companion guide, How to Build a Prompt for Writing Emails That Sound Human, applies the same six fields to tone and facts instead of keys and columns. For more, see the AI and Prompt Tools guides.