Crafting Effective Prompts – Structure, Context, and Constraints Log in and enroll to track lesson completion. By the end of this lesson, students should be able to: Context tells Claude why you are asking. Context is the background that makes your request specific. Without it, Claude answers the general version of your question. With it, Claude answers your version of your question. Think of context as answering: Who am I? What situation am I in? What do I already know? What have I already tried? What is this for? You do not need to share your entire life story. You need to share the relevant facts that change how a good answer should look. What counts as relevant context: Constraints are as important as instructions. A constraint tells Claude what not to do, what to avoid, and what limits to respect. Constraints prevent Claude from producing technically valid but practically useless output. Common constraint patterns: Negative constraints are underused and undervalued. Telling Claude what NOT to include often produces more improvement than adding more positive instructions. If you consistently get outputs full of generic filler advice, "avoid generic advice" is a powerful constraint. If you keep getting long preambles before the answer, "skip the preamble, start with the answer" is a constraint that immediately improves your output. Stacking constraints without conflicting them. You can stack multiple constraints, but watch for conflicts. "Write in a casual tone" and "use formal academic language" will produce confused output. "Under 100 words" and "include a detailed section on each of five topics" is arithmetically impossible. When Claude produces something strange, look for conflicting constraints in your prompt first. An HR professional needs Claude to help draft interview questions. Weak prompt Give me interview questions for a marketing manager role. This produces a generic list of common interview questions that could have come from any HR guide. Improved prompt [Context] I'm hiring a marketing manager for a 10-person SaaS startup. We have no formal marketing function today – this person will be the first marketing hire and will build the function from scratch. Our product is B2B, mid-market. Budget is limited. The role needs someone who can both strategize and execute. The improved prompt produces interview questions that are specific to the actual hiring situation, with usable rationale attached. You can ask Claude to generate its own constraint suggestions before you write the full prompt. Ask: "I'm about to ask you to help me [describe task]. What context and constraints would make your response most useful?" Claude will often identify variables you had not considered – audience level, scope limitations, edge cases – which you can then explicitly address before giving the full request. Be careful about providing personal data or identifiable information about others in your context. If you are asking Claude to help with a personnel issue, a client situation, or a personal conflict, anonymize names and identifying details. Claude's responses are generated in context – do not paste in private information (employee records, client contracts, medical details) unless you are using a configuration that provides appropriate data handling guarantees. Take a task you have used Claude for before that produced a generic output. Rewrite the prompt by adding at least three pieces of relevant context and two explicit constraints. Note whether the output improved. Write down the specific context and constraint additions that made the biggest difference. You should be able to explain the difference between a task and its context, give three examples of useful constraints, and write a prompt that uses both effectively. Log in and enroll to take this lesson quiz.
Lesson 2: Providing Context and Setting Constraints
Lesson Objectives
Lesson Content
Practical Example
[Task] Generate 10 behavioral interview questions.
[Constraints] Do not include questions that assume the candidate has managed a team – this is a solo role initially. Focus on questions that reveal self-direction, prioritization under resource constraints, and comfort with ambiguity. Avoid generic questions like "Where do you see yourself in five years."
[Format] Numbered list. Each question followed by one sentence explaining what it is designed to reveal.Lesser-Known Tip
Safety Notes
Practice Task
Completion Check
Lesson Quiz