Intermediate · Shaping the Output
Formatting & speaking for Claude
Claude responds to the structure of your prompt, not just its content. A prompt written as a wall of text asks Claude to produce output that fits the shape of the input. A prompt written with clear sections, labeled parts, and explicit format instructions asks Claude to produce something structured and usable.
This lesson is about how to write a prompt that communicates structure, and how to ask for output in a format you can actually use.
How formatting affects Claude's output
Claude is trained on a large amount of well-structured text. It has seen millions of examples of what a numbered list looks like, what a markdown table looks like, what a code block looks like. When you use these structures in your prompt, you activate Claude's pattern recognition for them.
If your prompt uses bullet points, Claude tends to produce bullet points. If your prompt uses numbered steps, Claude tends to produce numbered steps. If you want a specific format, model that format in the prompt itself.
Explicit format instructions
Modeling format is not enough on its own. Always add an explicit instruction about the output format:
"Explain how HTTPS works. Use numbered steps for the sequence of events. Bold the name of each protocol involved. Keep each step to one sentence."
"Compare these two project management tools. Produce a markdown table with four rows: cost, learning curve, integration options, and best use case. Fill in one cell per tool per row."
The explicit instruction removes ambiguity. Claude does not have to infer what "compare these tools" means as a format — you told it.
What works in practice
Line breaks between sections signal transitions. If your prompt has instructions in one section and data in another, leave a blank line between them.
Numbered lists work for sequential steps. Use them when order matters.
Bullet points work for parallel options or requirements. Use them when order does not matter.
Headers (markdown ## or ALL CAPS) work for multi-section prompts. If your prompt has instructions, examples, and data, give each section a header.
Triple backticks signal code or exact text. Use them when you want Claude to treat the content literally.
What does not work
Burying the format instruction at the end of a long prompt. Put it near the top or just before the data.
Asking for a format Claude cannot produce in the interface you are using. JSON works in a chat with Claude. Rendered markdown tables may or may not render depending on where the output lands.
If you get stuck
If Claude is not producing the format you asked for, add "Produce only the [table/list/JSON]. No introduction, no explanation." This removes Claude's tendency to preface structured output with a sentence of explanation.
If the output structure is close but not quite right, paste the structure you want into the prompt as an empty template and ask Claude to fill it in.
Cross-reference
L9 (Practice — format a JSON output) is the applied version of this lesson. L13 (Building complex prompts from scratch) covers how to use headers and sections to build multi-step prompts.
Deliverable
Pick a comparison you need to make — two tools, two vendors, two approaches. Write a prompt that asks Claude to produce a markdown table with at least three criteria. Run it. If the table structure is wrong, add an explicit empty template to the prompt and run it again.
Try these prompts
- Write a prompt that asks Claude to explain a concept using numbered steps and bold headers.
- Ask Claude to compare [Product A] vs [Product B] in a markdown table with 4 criteria.
Sign in to keep your place and tick off lessons. Reading stays open either way.