Context, Format & Constraints

How to provide the right background information and control the shape of AI output.

7 min read
3 quiz questions

Context is the background information that makes the difference between a generic answer and a tailored one. Think of it as briefing a new employee — they need to understand the situation before they can be useful.

  1. Situational context: "I'm a startup founder preparing for a Series A fundraise"
  2. Document context: Paste the actual document, email, or data you want the AI to work with
  3. Audience context: "The reader is a non-technical CEO who needs to make a budget decision"
  4. Historical context: "We tried X last quarter and it didn't work because Y"
  5. Goal context: "The purpose of this email is to get a meeting, not to close a sale"
When pasting documents, use clear delimiters: ``` ---BEGIN DOCUMENT--- [your text here] ---END DOCUMENT--- ``` This helps the AI distinguish your instructions from the content it should work with.

Format specification is the highest-ROI prompting technique: it takes 5 seconds and dramatically improves output. Without format instructions, AI defaults to long, essay-style paragraphs. With format instructions, you get exactly the structure you need.

  • "Format as a table with columns: Name, Pros, Cons, Rating"
  • "Return a numbered list of exactly 5 items"
  • "Structure as: Executive Summary, Key Findings, Recommendations"
  • "Respond in valid JSON with keys: title, summary, tags"
  • "Use markdown with H2 headers for each main section"

Constraints are rules that prevent the AI from going off track. They're especially useful for preventing common AI tendencies you don't want: excessive length, unsolicited caveats, overly formal tone, or off-topic tangents.

Effective constraints: - "Keep the response under 150 words" - "Do not include disclaimers or caveats" - "Use only information from the document I provided — don't add external knowledge" - "Write at an 8th-grade reading level" - "Do not use bullet points — write in prose paragraphs" - "If you're unsure about something, say so instead of guessing"

Context + Format + Constraints Example

Demonstrates how context, format, and constraints work together.

Context: I run a small e-commerce store selling handmade candles. Last month's revenue was $12,000 (up 20% from the previous month). Our best-selling product is the lavender soy candle. We're entering the holiday season.

Task: Create a marketing plan for the next 30 days.

Format:
- Week-by-week breakdown (4 weeks)
- For each week: 1 primary action, 1 social media focus, 1 email campaign idea
- End with a 30-day budget breakdown

Constraints:
- Total budget: $2,000
- We only sell on our website and Etsy
- No paid ads — organic and email only
- Keep it practical for a one-person team

Prompt Templates

Document Analysis with Full Structure

Structured template for analyzing any document with clear boundaries.

Context: [Describe your situation and why you're analyzing this document]

---BEGIN DOCUMENT---
[PASTE DOCUMENT]
---END DOCUMENT---

Task: [What you need from this document]

Format:
- [Specify output structure]
- [Include any headers or sections needed]

Constraints:
- Only use information from the document above
- [Length limit]
- [Tone or audience requirement]

Constraint-Heavy Prompt

Heavily constrained template for when you need very specific output.

Write [CONTENT TYPE] about [TOPIC].

MUST include:
- [Required element 1]
- [Required element 2]

MUST NOT include:
- [Excluded element 1]
- [Excluded element 2]

Length: [WORD COUNT]
Tone: [TONE]
Audience: [WHO]
Reading level: [LEVEL]

Test Your Knowledge

Knowledge Check

1 / 3

What is the highest-ROI prompting technique?

Key Takeaways

  • Context types include situational, document, audience, historical, and goal context
  • Use delimiters to separate instructions from content the AI should analyze
  • Format specification is the highest-ROI prompting technique — always include it
  • Constraints prevent common AI tendencies: excessive length, caveats, off-topic content
  • Context + Format + Constraints together transform generic output into tailored results