Module 2: Core prompting techniques · 8 min
Control the format and length
Models follow format instructions very well. Tell the model the exact shape you need.
- Length: 'in 100 words', 'in 3 bullet points', 'in one paragraph'.
- Tone: 'friendly', 'formal', 'for a beginner'.
- Structure: 'as a table with columns Name, Price, Reason'.
- Machine format: 'reply only with valid JSON using keys title and summary'.
Summarise the text below for a busy manager.
Reply as JSON with keys: "summary" (max 30 words) and "actions" (list of strings).
Text: ...
Putting your text inside clear markers, such as triple quotes, also helps the model see where your instructions end and your content begins.
← Teach by example (few-shot prompting) | Step-by-step reasoning →