daBongo LMS AI Training Courses

Crafting Effective Prompts for Gemini

Lesson 1: The Five-Component Prompt Anatomy

Log in and enroll to track lesson completion.

Lesson Objectives

By the end of this lesson, students should be able to:

  • Name and define all five prompt components
  • Write prompts that include at least four of the five components for complex tasks
  • Identify which components are most critical for different task types
  • Recognize common prompting failures and trace them to missing components

Lesson Content

Why structure produces better prompts.

Most ineffective prompts share a common failure: they tell Gemini what to produce but not enough about the who, why, what kind, or for whom. The five-component structure addresses all of these, consistently producing prompts that get usable first responses rather than generic starting points.

Component 1 – Task: What do you want Gemini to produce?

The task is the core request – the verb phrase that tells Gemini what action to take.

Examples: "Write a…" / "Summarize the…" / "Compare X and Y…" / "Create a list of…" / "Explain how…"

A task alone is rarely enough – but it must be present. Vague tasks produce vague outputs.

Weak task: "Help me with marketing." Strong task: "Write a 300-word LinkedIn post announcing my company's new product launch."

Component 2 – Context: Who are you and what is the situation?

Context tells Gemini about your background, your current situation, and why you need this output. Without context, Gemini guesses – and often guesses wrong.

Examples: "I am a first-year teacher at an elementary school…" / "I manage a team of 12 remote employees…" / "I am preparing for a salary negotiation with a company in the healthcare sector…"

The more specifically the context describes the relevant aspects of your situation, the more targeted Gemini's response will be.

Component 3 – Role: What perspective should Gemini adopt?

Asking Gemini to "act as" a specific role frames its response from that perspective – adjusting vocabulary, depth, analytical focus, and the types of concerns it will raise.

Examples: "Act as a skeptical venture investor…" / "Act as a plain-language editor reviewing this for a non-technical audience…" / "Act as an experienced HR manager…"

Role framing is particularly useful for getting perspective-specific feedback (what would a lawyer notice?) or for adapting tone (what would a teacher say to an eighth-grader?).

Note: Role framing shapes analytical perspective – it does not grant professional credentials. "Act as a doctor" produces medically-framed analysis; it does not produce licensed medical advice.

Component 4 – Constraints: What are the boundaries?

Constraints prevent Gemini from producing output that does not fit your situation – limiting length, specifying what to exclude, defining what style is appropriate, or requiring specific content.

Examples: "Keep it under 200 words." / "Do not use technical jargon – this is for a non-specialist audience." / "Include only options that cost under $1,000." / "Write in an active voice throughout."

Constraints are where most beginners leave value on the table. Adding even one or two specific constraints dramatically improves how usable the first response is.

Component 5 – Format: How should the output be structured?

Format specifies how you want the output presented – which is critical when the output needs to fit a specific use case (a table, a numbered list, a slide outline, a JSON structure, a script).

Examples: "Format as a three-column table with headers: Option, Pros, Cons." / "Give me a numbered list with a one-sentence explanation under each item." / "Format this as a slide outline with a header and three bullets per slide."

Without format specification, Gemini chooses a default format that may or may not fit what you need.

Putting it together: a five-component prompt.

Task: "Write a performance feedback summary…" Context: "…for a mid-year review. I am a manager in a software company. The employee is a junior developer who has been strong technically but struggles with communicating blockers to the team in time." Role: "Act as an experienced people manager who values direct, constructive feedback." Constraints: "Keep it under 250 words. Avoid vague language like 'needs improvement' – be specific. Do not mention compensation." Format: "Format as three sections: Strengths, Areas for Growth, and Suggested Next Steps."

This prompt is likely to produce a first response that is immediately usable – or very close to it.

Which components matter most?

All five matter – but if you had to prioritize:

  • Task and Context are always required. Without these, nothing works.
  • Constraints are the highest-leverage addition for most users who are underusing them.
  • Format is essential when the output needs to fit a specific structure.
  • Role is most powerful for perspective-specific analysis and feedback.

Practical Example

A marketing manager needs to present three campaign options to her leadership team.

Without structure: "Give me three marketing campaign ideas." Result: Generic, off-brand suggestions with no connection to her actual situation.

With structure: "Write three distinct marketing campaign concepts [Task] for a B2B SaaS company targeting small business owners in the retail sector, with a Q4 launch and a $50,000 budget [Context]. Act as a creative marketing director who has run B2B campaigns in this segment [Role]. Each concept should be realistic on the given budget and avoid influencer-based approaches (not our style) [Constraints]. Format each concept with: Campaign Name, Core Idea (2 sentences), Key Channels, Estimated Budget Split, and Expected Outcome [Format]."

The second prompt produces structured, relevant, immediately presentable concepts – not generic ideas she has to rework entirely.

Lesser-Known Tip

When writing a complex multi-component prompt, write the components in the order: Context -> Task -> Role -> Constraints -> Format. Starting with context grounds everything that follows – Gemini reads the full prompt before generating, but context at the start means every subsequent component is interpreted within that frame.

Safety Notes

Role framing ("act as a lawyer," "act as a doctor") changes Gemini's analytical perspective – it does not change the professional review requirements for the underlying content. A legally-framed Gemini response about a contract still requires attorney review before action. Role framing produces useful analytical framing; it does not produce licensed professional judgment.

Lesson Quiz

Log in and enroll to take this lesson quiz.

Scroll to Top