Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
3,280 changes: 3,280 additions & 0 deletions Google-Prompts-Engineering/gemini-for-google-workspace-prompting-guide-101.md

Large diffs are not rendered by default.

Binary file not shown.
156 changes: 156 additions & 0 deletions Google-Prompts-Engineering/prompts-advance-tutorial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
# Advanced Prompting Tutorial for Gemini for Google Workspace

This advanced tutorial builds upon the foundational skills for writing effective prompts, delving deeper into techniques to collaborate with Gemini for Google Workspace for enhanced productivity and creativity across complex tasks.

## Mastering the Four Pillars of an Effective Prompt

While the basic structure involves Persona, Task, Context, and Format, mastering them involves nuance and strategic application. Effective prompts often weave these elements together seamlessly.

**Key Principle:** The more clarity and relevant detail you provide, the better Gemini can understand your intent and deliver high-quality, relevant results. Remember, a clear **Task** (usually starting with a verb) is always essential.

### 1. Persona: Guiding Gemini's Voice and Expertise

Defining a persona helps Gemini adopt a specific viewpoint, style, and knowledge base. This goes beyond just a job title.

* **Specificity is Key:** Instead of just "You are a manager," try "You are a seasoned project manager in the software development industry, known for clear communication with both technical and non-technical stakeholders."
* **Implied Persona:** Sometimes the persona is implied by the task and context, but explicit definition yields more tailored results, especially for communication tasks.

**Advanced Examples:**

* **Executive Comms:** "You are the CEO of a rapidly growing tech startup. Draft an inspiring yet candid internal memo to all employees addressing the recent market downturn and our strategy for navigating it. Focus on resilience and innovation." (Combines persona with tone and complex context).
* **Technical Explanation:** "You are a senior cybersecurity analyst. Explain the concept of zero-trust architecture to a board of directors who have limited technical background. Use analogies and focus on business benefits. Format as a 2-page briefing note." (Persona influences complexity of explanation and language choice).
* **Creative Brainstorming:** "You are a lead game designer for a fantasy RPG. Brainstorm three unique questlines for a newly introduced desert region, considering lore consistency and player engagement for level 15-20 characters." (Persona drives creative output style).

### 2. Task: Defining Clear and Actionable Objectives

The task is the core instruction. It should be an unambiguous command.

* **Use Strong Verbs:** "Draft," "Analyze," "Compare," "Generate," "Summarize," "Brainstorm," "Translate," "Outline," "Create a plan for..."
* **Compound Tasks:** For highly complex requests, it's often better to break them into smaller, sequential tasks (see "Advanced Techniques" below).

**Advanced Examples:**

* **Data Analysis (Sheets):** "Analyze the sales data in @[Q3 Sales Report Spreadsheet]. Identify the top 3 performing product categories by revenue and calculate their percentage growth compared to @[Q2 Sales Report Spreadsheet]. Then, generate a bar chart visualizing this growth."
* **Strategic Planning (Docs/Advanced):** "Develop a comprehensive go-to-market strategy outline for a new B2B SaaS product targeting small to medium-sized enterprises in the healthcare sector. Include sections for target audience, value proposition, pricing strategy, marketing channels, and sales strategy based on insights from @[Market Research Report] and @[Competitive Analysis Doc]."
* **Content Creation (Slides/Docs):** "Generate a 5-slide presentation outline for a workshop on 'Effective Time Management for Remote Teams.' For each slide, provide a title, 3-4 key bullet points, and a suggestion for a relevant visual. The target audience is newly remote employees."

### 3. Context: Providing the Necessary Background and Data

Context is crucial for relevance and accuracy. The richer and more specific the context, the better the output.

* **Leverage Your Data with `@` Mentions:** The ability to reference your documents in Google Drive (e.g., `@[My Project Plan Doc]`, `@[Customer Feedback Sheet]`) is a powerful way to ground Gemini's responses in your specific information.
* **Provide Key Details:** Include names, dates, goals, constraints, previous discussions, relevant URLs, or snippets of text.
* **Implicit vs. Explicit:** While Gemini can infer some context from an ongoing conversation, explicitly stating or referencing key contextual elements is more reliable.

**Advanced Examples:**

* **Personalized Email (Gmail):** "Draft a follow-up email to [Client Name] after our meeting on [Date] regarding [Project X]. Reference their concerns about [specific concern mentioned, e.g., budget constraints from @[Meeting Notes Doc]] and reiterate how our proposed solution in @[Proposal Document] addresses these. Maintain a confident and solution-oriented tone."
* **Report Generation (Docs):** "Using the data from @[Annual Employee Survey Results Sheet] and the summary of findings in @[HR Analysis Report Doc], draft an executive summary for the leadership team. Highlight key trends in employee satisfaction, identify top 3 areas for improvement, and suggest one actionable recommendation for each. Format as a one-page memo."
* **Cross-Document Synthesis (Drive/Advanced):** "Compare the Q4 financial forecasts from @[Finance Q4 Forecast Sheet] with the actual Q4 performance data in @[Actuals Q4 Data Sheet]. Identify key variances (greater than 10%) by department and provide a brief potential explanation for each variance, drawing insights from the commentary in @[Q4 Departmental Reports Folder]."

### 4. Format: Shaping the Output for Clarity and Usefulness

Specifying the format ensures the output is structured in a way that meets your needs.

* **Common Formats:** Bullet points, numbered lists, tables, email, memo, report, script, blog post, summary, outline, code block.
* **Constraints:** Word count, paragraph limits, number of suggestions, specific sections to include.

**Advanced Examples:**

* **Comparative Analysis (Docs/Sheets):** "Create a comparison table of three competing software products: [Product A], [Product B], and @[Product C Internal Spec Sheet]. Columns should include: Key Features, Pricing Model, Target Audience, and a 'Pros/Cons' summary for our company's use case detailed in @[Internal Needs Assessment Doc]."
* **Structured Brainstorming (Docs):** "Generate a list of 10 potential names for a new eco-friendly cleaning product line. For each name, provide a brief rationale (1-2 sentences) and a suggested tagline. The names should evoke themes of nature, purity, and effectiveness."
* **Meeting Agenda (Docs/Gmail):** "Draft a detailed agenda for a 1-hour project kick-off meeting for [Project Alpha]. Include time allocations for: Introductions (5 min), Project Goals & Scope overview (from @[Project Charter Doc]) (15 min), Roles & Responsibilities (10 min), Key Milestones & Timeline (15 min), Q&A (10 min), and Next Steps (5 min). Assign [Team Lead Name] to present the goals and scope."

## Leveling Up Your Prompt Writing: Advanced Techniques

Based on the insights from the "Gemini for Google Workspace Prompting Guide" (page 67), here are techniques to further enhance your prompts:

1. **Break It Up (Sequential Prompting):**
* **Explanation:** For complex tasks involving multiple steps or outputs, break them into a series of smaller, more focused prompts. This allows for iterative refinement and better control over each part of the process.
* **Example:** Instead of "Write a complete marketing plan for a new product including research, strategy, content, and budget," try:
1. "Conduct market research for a new [product type] targeting [audience]. Identify 3 key competitors and their main strengths/weaknesses."
2. (After reviewing) "Based on the previous research and our product features in @[Product Spec Doc], outline a marketing strategy focusing on [channel1] and [channel2]."
3. (And so on for content, budget, etc.)

2. **Give Constraints:**
* **Explanation:** To get more specific and usable results, include limitations or requirements in your prompt.
* **Examples:**
* "Summarize @[Long Research Paper] in 500 words or less."
* "Generate 5 distinct subject lines for an email campaign announcing a new feature."
* "Draft three alternative opening paragraphs for this blog post, each with a different hook."

3. **Assign a Role (Enhanced Persona):**
* **Explanation:** This is a deeper application of the Persona pillar. By explicitly telling Gemini to act as a specific professional, you guide its tone, style, and the type of expertise it should draw upon.
* **Example:** "You are the head of a creative department for a leading advertising agency. Brainstorm a tagline and a visual concept for a campaign promoting sustainable travel to millennials."

4. **Ask for Feedback (Clarifying Questions from Gemini):**
* **Explanation:** In a conversational platform like Gemini Advanced, you can encourage Gemini to ask clarifying questions to better understand your needs before generating a full response.
* **Example:** "I need to create a presentation on the impact of AI on the retail industry for a mixed audience of executives and store managers. The goal is to both inform and inspire action. What questions do you have for me that would help you provide the best outline and key talking points?"

5. **Consider and Specify Tone:**
* **Explanation:** The tone of the generated content can significantly impact its effectiveness. Explicitly request the desired tone.
* **Examples:**
* "Draft a response to this customer complaint. Use an empathetic and apologetic tone." (From Customer Service section)
* "Write an upbeat memo announcing the new intranet site using @[Intranet Launch Plan Notes]." (From Communications section)
* "Generate potential answers for each question that use a confident but firm tone." (From Executives section, COO Town Hall)

6. **Say It Another Way (Iterate and Rephrase):**
* **Explanation:** If the initial output isn't what you expected, don't just give up. Rephrase your prompt, add more context, clarify your task, or adjust the persona or format. Iteration is key.
* **Example (Conceptual):**
* *Initial Prompt:* "Write about our new product."
* *Refined Prompt:* "You are a marketing copywriter. Draft a 200-word promotional blurb for our new product, @[Product X Details Doc], highlighting its top 3 benefits for busy professionals. The tone should be exciting and benefit-driven. Format for a website landing page."

## Crafting Conversational Prompts & Iteration: A Walkthrough

Many of the most powerful interactions with Gemini involve a conversation—a series of prompts that build on each other. Let's look at an example adapted from the "Startup Leaders" section (pages 62-64) of the guide:

**Scenario:** A startup founder wants to process notes from a whiteboard brainstorming session and then ideate further.

**Initial Prompt (Multi-modal - if using Gemini Advanced with image upload):**

```
I am a founder at a startup focused on [sustainable packaging solutions]. I was brainstorming with colleagues about [our Q3 marketing strategy], and we took notes on this whiteboard. [Uploads image of whiteboard notes] Turn these notes into structured text, categorizing by main themes if possible.
```
* **Persona:** `I am a founder at a startup focused on [sustainable packaging solutions].`
* **Task:** `Turn these notes into structured text, categorizing by main themes if possible.`
* **Context:** `I was brainstorming with colleagues about [our Q3 marketing strategy]... [Uploads image of whiteboard notes]`
* **Format:** `structured text, categorizing by main themes`

**(Gemini Advanced processes the image and provides a text output of the notes, possibly categorized.)**

**Follow-up Prompt 1 (Deepening the Brainstorm):**

```
Thanks, that's a great transcription. Now, based on these notes and our focus on [sustainable packaging solutions], suggest three follow-up strategic items we should discuss for our [Q3 marketing strategy]. Specifically, what potential blind spots or missed opportunities might exist in our initial brainstorm regarding reaching [target audience: e.g., eco-conscious SMEs]?
```
* **Task:** `suggest three follow-up strategic items... what potential blind spots or missed opportunities might exist...`
* **Context:** `Based on these notes (previous output) and our focus on [sustainable packaging solutions]... regarding reaching [target audience: e.g., eco-conscious SMEs]`
* **Persona:** (Implied continuation from the founder persona)
* **Format:** (Implied list or descriptive paragraphs)

**(Gemini provides suggestions and points out potential gaps.)**

**Follow-up Prompt 2 (Generating Actionable Output):**

```
Excellent points. Now, please draft a concise meeting recap email to the team based on the transcribed whiteboard notes and your suggested follow-up items. Use an upbeat and collaborative tone. The email should clearly list: 1. Key takeaways from the whiteboard session. 2. The three strategic follow-up items you identified. 3. A call to action to prepare thoughts on these items for our next meeting on [Date].
```
* **Task:** `draft a concise meeting recap email...`
* **Context:** `based on the transcribed whiteboard notes and your suggested follow-up items... next meeting on [Date].`
* **Format:** `concise email... upbeat and collaborative tone... clearly list: 1. Key takeaways... 2. Three strategic follow-up items... 3. Call to action...`

This iterative process allows for deeper exploration and leads to a more refined and useful final output.

## Final Review: The Human Element

Even with advanced prompting, always critically review Gemini's output. Check for:
* **Accuracy:** Are the facts and figures correct, especially when drawing from provided documents?
* **Relevance:** Does the output directly address your prompt and meet your underlying need?
* **Clarity & Coherence:** Is the language clear, well-structured, and easy to understand?
* **Completeness:** Does it cover all aspects of your request?
* **Tone:** Is the tone appropriate for the intended audience and purpose?

Generative AI is a powerful collaborator, but the final judgment and responsibility for the output remain with you.

---
*This advanced tutorial is inspired by and expands upon the principles and examples in the "Gemini for Google Workspace: A quick-start handbook for effective prompts, October 2024 edition."*
52 changes: 52 additions & 0 deletions Google-Prompts-Engineering/prompts-tutorial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Effective Prompting Tutorial for Gemini for Google Workspace

This tutorial provides foundational skills for writing effective prompts when using Gemini for Google Workspace, enabling you to collaborate with AI to boost productivity and creativity.

## Understanding Prompts

A prompt is a conversation starter with your AI-powered assistant. You might write several prompts as the conversation progresses. While possibilities are virtually endless, consistent best practices can be applied.

## The Four Pillars of an Effective Prompt

When writing an effective prompt, consider these four main areas. You don't need to use all four in every prompt, but incorporating a few will significantly improve the results. **Always remember to include a verb or command as part of your task; this is the most important component of a prompt.**

1. **Persona:** Define the role or perspective you want Gemini to adopt.
2. **Task:** Clearly state what you need Gemini to do.
3. **Context:** Provide relevant background information, details, or specific documents (e.g., by typing `@file name` to reference your files in Google Drive).
4. **Format:** Specify the desired structure or style of the output.

### Example of a Prompt Using All Four Pillars

This prompt could work well in Gmail and Google Docs:

```
You are a program manager in [industry]. Draft an executive summary email to [persona] based on [details about relevant program docs]. Limit to bullet points.
```

Let's break this example down:

* **Persona:** `You are a program manager in [industry].`
* This tells Gemini to adopt the mindset, knowledge, and communication style of a program manager in a specific industry.
* **Task:** `Draft an executive summary email...`
* This is a clear command, telling Gemini the primary action to perform (draft an email) and the type of content (executive summary).
* **Context:** `...to [persona] based on [details about relevant program docs].`
* This provides crucial background: who the email is for (`[persona]`) and the source material Gemini should use (`[details about relevant program docs]`). Referencing specific documents with `@` is a powerful way to provide context.
* **Format:** `Limit to bullet points.`
* This specifies how the output should be structured, ensuring conciseness and readability.

## Quick Tips for Getting Started with Gemini for Google Workspace

1. **Use natural language:** Write as if you're speaking to another person. Express complete thoughts in full sentences.
2. **Be specific and iterate:** Tell Gemini exactly what you need it to do (e.g., summarize, write, change the tone, create). Provide as much context as possible. If the initial results aren't perfect, refine your prompt and try again.
3. **Be concise and avoid complexity:** State your request in brief—but specific—language. Avoid jargon where possible, or explain it if necessary.
4. **Make it a conversation:** Fine-tune your prompts if the results don't meet your expectations or if you believe there's room for improvement. Use follow-up prompts and an iterative process of review and refinement to yield better results.
5. **Use your documents:** Personalize Gemini's output with information from your own files in Google Drive by referencing them with `@file name`.
6. **Make Gemini your prompt editor (in Gemini Advanced):** When using Gemini Advanced (gemini.google.com), you can start your prompts with: "Make this a power prompt: [original prompt text here]." Gemini will suggest improvements to your prompt. Review the suggestions, ensure they align with your needs, and then use the improved prompt.

## Key Takeaway

Prompting is a learnable skill. While you don't need to be a prompt engineer, experimenting with different approaches and iterating on your prompts is key to achieving desired outcomes. The most effective prompts often provide sufficient detail and context (averaging around 21 words, based on user experience) rather than being overly brief.

Remember to always review Gemini's output for clarity, relevance, and accuracy before using it.

*This tutorial is based on the "Gemini for Google Workspace: A quick-start handbook for effective prompts, October 2024 edition."*
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Tony Cai

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Loading