Crafting Effective Prompts for Gemini Log in and enroll to track lesson completion. By the end of this lesson, students should be able to: Why context and constraints are the highest leverage. Of the five components, context and constraints produce the biggest quality improvements for the most users – because they are the two most commonly underused. Task and format are relatively intuitive. Role is optional for many tasks. But context and constraints require deliberate specificity that most users skip. Writing rich context: the four questions. Strong context answers four questions: "I am a mid-career HR director with 12 years of experience at large organizations, currently at a company undergoing a merger." "I need to communicate a new PTO policy to a workforce that is already anxious about the merger and skeptical of management communications." "The audience is approximately 800 employees across three time zones, ranging from hourly workers to senior managers." "The goal is to communicate the policy change clearly and honestly, reduce anxiety, and avoid triggering another wave of merger speculation." With these four questions answered, Gemini has enough context to produce output that fits your situation – not a generically correct response to a generically described task. What NOT to include in context. Context should be relevant. Including irrelevant personal history, excessive organizational detail, or information that does not affect the task clutters the prompt without improving the output. A useful test: if removing a piece of context would not change what Gemini produces, it probably does not need to be there. Constraints: the six most valuable types. 1. Length constraints: "Under 150 words." / "No more than three bullet points." / "One paragraph." 2. Tone constraints: "Professional but warm." / "Direct and confident – no hedging." / "Conversational, not formal." 3. Exclusion constraints: "Do not mention competitor products." / "Avoid technical jargon." / "Do not include pricing – that will be discussed separately." 4. Inclusion constraints: "Must include a clear call to action." / "Include at least one specific example." / "Must address the timeline explicitly." 5. Format constraints (overlaps with the Format component): "Use headers." / "No bullet points – write in prose." / "Present as a numbered list." 6. Accuracy constraints: "Flag any claim you are uncertain about." / "Note where my specific jurisdiction might affect this analysis." / "Point out if any of your suggestions require professional verification." Implicit vs. explicit constraints. Many constraints are context-dependent and must be stated explicitly – Gemini cannot infer them. "This is for a very conservative audience" needs to be stated; Gemini has no way to know your audience's sensibility without being told. When in doubt, state it. A nonprofit director needs to draft a fundraising appeal to major donors after a difficult year in which several programs were cut. Without strong context and constraints, she asks: "Write a fundraising letter." With them: Context: "I lead a nonprofit serving homeless youth in [city]. We had a difficult year – we cut two programs due to funding shortfalls, and our major donors know this. I am writing our year-end major donor appeal." Constraints: "Do not minimize or spin the difficult year – our donors appreciate honesty. Do not use guilt-based language. Do not promise outcomes we cannot guarantee. Keep it under 400 words. The tone should be honest, forward-looking, and confident in our mission." These constraints explicitly exclude the manipulative tactics common in fundraising appeals – which is exactly what her donor relationships require. Without stating these exclusions, Gemini might default to common fundraising language patterns she wants to avoid. After receiving a strong response, ask Gemini to articulate what it assumed about your context and constraints to produce that response: "What did you assume about my situation, audience, and goals to write that response?" This reveals the implicit assumptions – and shows you where to add explicit context or constraints in future similar prompts to avoid those assumptions being wrong. Log in and enroll to take this lesson quiz.
Lesson 2: Context and Constraints – The Two Highest-Leverage Components
Lesson Objectives
Lesson Content
Practical Example
Lesser-Known Tip
Lesson Quiz