Crafting Effective Prompts for ChatGPT
Lesson 2: Context and Constraints — The Two Highest-Leverage Components
Lesson Objectives
By the end of this lesson, students should be able to:
- Write context that answers the four key background questions
- Apply at least six types of constraints in their prompts
- Distinguish useful from unnecessary context
- Recognize when a constraint is implicit vs. when it must be stated explicitly
Lesson Content
The four context questions.
Strong context answers: Who are you (role, background, experience), What is the situation (specific context), Who is the audience (who receives or is affected by the output), What is the goal (the outcome you are trying to achieve).
What NOT to include in context.
Context should be relevant. Including irrelevant personal history clutters the prompt without improving the output. If removing a piece of context would not change what ChatGPT produces, it probably does not belong.
The six most valuable constraint types.
- Length: "Under 150 words." / "No more than three bullet points."
- Tone: "Professional but warm." / "Direct and confident â€" no hedging language."
- Exclusion: "Do not mention competitor products." / "Avoid academic jargon."
- Inclusion: "Must include a clear call to action." / "Include at least one specific data point."
- Format constraints: "Use headers." / "No bullet points â€" prose only."
- Accuracy constraints: "Flag any claim you are uncertain about." / "Note where this may vary by jurisdiction."
Implicit vs. explicit constraints.
Constraints that depend on context you know but have not shared must be stated explicitly. An audience's sensitivities, organizational constraints, or communication norms cannot be inferred â€" they must be stated. When in doubt, state it.
Enroll to continue this lesson.
The preview above shows the lesson objectives and opening lesson content. Enroll to view the full lesson, complete the practice work, and take the lesson quiz.
