daBongo LMS AI Training Courses

Crafting Effective Prompts for Gemini

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 between useful and unnecessary context
  • Recognize when a constraint is implicit vs. when it must be explicit

Lesson Content

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:

  1. Who are you? (Your role, experience level, and industry)

"I am a mid-career HR director with 12 years of experience at large organizations, currently at a company undergoing a merger."

  1. What is the situation? (The specific context of this task)

"I need to communicate a new PTO policy to a workforce that is already anxious about the merger and skeptical of management communications."

  1. Who is the audience? (Who will read, receive, or be affected by the output)

"The audience is approximately 800 employees across three time zones, ranging from hourly workers to senior managers."

  1. What is the goal? (What outcome you are trying to achieve)

"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.

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.

Log In / Create Account Back to Course