Asking for the Shape You Want: Format, Tone and Length
Learn how to ask for tables, lists, emails and JSON, how to control tone and length, and how to check structured replies with a real validator.
In this lesson you will
- Ask for the format you need
- Control tone, length and reading level
- Ask for structured data safely
- Check a reply for shape and types
About 22 minutes
The right answer in the wrong shape
Tom runs the Saturday volunteer rota. He asks Claude for a summary of the week’s plan, and gets two lovely paragraphs. He wanted a table he could paste into a spreadsheet. He asks again and gets bullet points. A third time, he gets a table, but with the columns in a different order. The content was fine every time. The shape was wrong. This lesson is about asking for the shape you want: format, tone and length, and checking that you got it.
Format
Say what shape the answer should take, and be specific. Useful formats include:
- Bullet points or a numbered list for steps, options and summaries.
- A table for comparing things. Name the columns.
- Headings and short paragraphs for an explanation or a document.
- An email, a letter or a message, including a subject line if you want one.
- Structured data such as JSON or CSV when another program or a spreadsheet will use the answer.
Compare three ways to advertise the bake sale in a table. Columns: Method, Cost (low, medium, high), Time to set up, Best for. Four rows including a header, nothing else.
| Method | Cost | Time to set up | Best for |
|---|---|---|---|
| Printed posters | Low | 2 hours | Local passers-by |
| Social media post | Low | 30 minutes | Parents and friends |
| School newsletter | Low | 1 hour | Families at the school |
Notice the instructions that shaped it: the column names, the allowed values for cost, and ‘nothing else’, which stops Claude from adding an introduction you would have to delete.
Tone and length
- Tone: friendly, formal, warm, direct, playful, calm. Better still, describe the reader: ‘for a busy manager who skims’.
- Length: use numbers. ‘Under 80 words’, ‘three bullets’, ‘one paragraph’, ‘a five-minute read’. Words like ‘short’ mean different things to different people.
- Reading level: ‘in plain English’, ‘for a twelve-year-old’, ‘for a specialist’.
When another program will read the answer
Sometimes the reader of the answer is not a person but a spreadsheet, a form or a script. That needs strict structure, and strict structure needs checking. JSON is a plain text format for structured information, with named fields in curly brackets, which many programs can read. If you ask Claude for JSON, it will often give it correctly, but sometimes it adds a friendly sentence around it, leaves out a field, or puts text where a number should be. So when the shape matters, check it.
The program below is a checker. It strips away the code fence that often surrounds JSON in a chat reply, tries to read the JSON, and then tests that three fields exist and have the right types: a title that is text, a date that is text, and a number of volunteers that is a whole number. We give it five pretend replies that show the commonest outcomes.
import json, re
REQUIRED = {"title": str, "date": str, "volunteers_needed": int}
def check(reply):
text = reply.strip()
fence = re.search(r"```(?:json)?\s*(\{.*?\})\s*```", text, re.S)
if fence:
text = fence.group(1)
try:
data = json.loads(text)
except json.JSONDecodeError as e:
return "not valid JSON: " + e.msg
for key, kind in REQUIRED.items():
if key not in data:
return "missing " + key
if not isinstance(data[key], kind):
return f"{key} should be {kind.__name__}"
return "ok"
replies = {
"clean": '{"title": "Autumn Bake Sale", "date": "2026-06-10", "volunteers_needed": 8}',
"fenced": 'Here you go:\n```json\n{"title": "Bake Sale", "date": "2026-06-10", "volunteers_needed": 8}\n```',
"chatty": 'Sure! Title: Bake Sale, date: 10 June, 8 volunteers.',
"missing key": '{"title": "Bake Sale", "date": "2026-06-10"}',
"wrong type": '{"title": "Bake Sale", "date": "2026-06-10", "volunteers_needed": "eight"}',
}
for name, r in replies.items():
print(f"{name}: {check(r)}")
print()
print("passed:", sum(check(r) == "ok" for r in replies.values()), "of", len(replies))
clean: ok
fenced: ok
chatty: not valid JSON: Expecting value
missing key: missing volunteers_needed
wrong type: volunteers_needed should be int
passed: 2 of 5
Only 2 of the 5 replies pass. The clean reply passes, and so does the one wrapped in a code fence, because the checker removes the fence. The chatty reply, a friendly sentence with no JSON, fails to parse at all. The reply with a missing field fails with the message that the volunteers field is missing, and the reply with the number written as the word ‘eight’ fails because that field should be a whole number. In real work you would paste the error back to Claude and ask it to fix the reply, which usually works at once. The important lesson is that a reply that looks right is not the same as one that is right, and a few lines of checking catch the difference.
A reliable pattern for structured answers
Return only JSON, with no other text, using exactly these fields: title (text), date (text, format YYYY-MM-DD), volunteers_needed (whole number). If you do not know a value, use null.
Three details in that prompt help: ‘only JSON, with no other text’, exact field names with types, and a rule for missing values. Without the last, Claude may invent a plausible value rather than admit a gap.
Trusting the shape because it looks tidy. A tidy table can still have a wrong number, a missing row or a shifted column. When the answer feeds into something that matters, check it, with a program or by eye.
Some tools offer special settings that force structured output, and they can be more reliable than a plain request. Whether yours does depends on the tool and plan, so look in its help pages. Checking the result stays a good habit anyway.
Practice for this lesson
Check what you learned
Five quick questions. Pick an answer and you will see straight away whether it is right and why.
How should you state length?
- With the word short only
- Not at all
- With numbers, such as under 80 words
- With a colour
Numbers mean the same to everyone, while words like short do not.
Why add the phrase nothing else to a prompt?
- It stops extra introductions you would have to delete
- It makes the reply longer
- It changes the language
- It saves the chat
It keeps the reply to exactly the shape you asked for.
Which reply failed because a field had the wrong type?
- The clean one
- The one with eight written as a word
- The fenced one
- None
The volunteers field should be a whole number, not the word eight.
What should you do when a structured reply fails the check?
- Give up
- Delete the chat
- Ignore it
- Paste the error back and ask for a fix
Claude can usually correct a reply when it is shown the specific problem.
Why ask for a rule for missing values?
- It makes tables bigger
- Without it Claude may invent a value
- It changes colours
- It is required
A rule such as use null stops Claude from filling gaps with plausible inventions.
Summary
- Name the format, columns and limits you want.
- Use numbers for length and describe the reader for tone.
- For structured output, name fields and types and say what to do with missing values.
- A tidy reply can still be wrong, so check it.
Questions
Can Claude make a file for me?
Some versions can create files or documents, depending on the tool and plan. Otherwise, ask for text you can copy into a file yourself.
Why did the table columns change between replies?
Replies are written fresh each time. Name the columns and their order in the prompt to keep them stable.
Is JSON hard to learn?
No. It is just named fields in curly brackets. You can ask Claude to explain a sample line by line.
