LESSON 4 of 6 Beginner

Controlling Tone and Output Format

How to make the model write with a specific voice and structure, including JSON, tables, and code blocks.

5 min read 2 quiz questions

Tone is the voice the model uses; format is the shape of the answer. You tell the model both.

How to control tone (simple):

  • Say the voice and who the reader is. Example: “Write in a warm, conversational tone for busy parents.”
  • Give one example sentence if you want a very specific voice to copy.

How to control format (simple):

  • Be exact about structure. Example: “Return a JSON object with keys: title (string), summary (string, max 140 chars), tags (array of strings).”
  • Tell the model to include only the machine-readable block: “Provide only the JSON object and nothing else.” Use code fences if you want a clean code block.

Example prompt asking for JSON (copyable):

You are a data extractor. Read the text and return a JSON object with keys:
  - "title" (string)
  - "summary" (string, max 140 characters)
  - "tags" (array of strings)

Return only the JSON object and nothing else.

Why this works: the model knows who to be, what to output, and the exact format. That reduces errors when your app parses the result.

Quick tips:

  • Use short examples to show exactly how the output should look.
  • Prefer exact counts and types (e.g., “3 bullets”, “max 120 chars”).
  • When building programs, prefer strict machine-readable formats (JSON, CSV) and validate outputs on the server.

Quick Quiz

Test what you just learned. Pick the best answer for each question.

Q1 Which instruction best controls tone?

Q2 How do you ask the model for machine-readable output?