-
Prompt Engineering Best Practices
-
-
-
Part 2/4 in Promevo & Google Workspace's Gemini AI Adoption Series
-
-
Prompt Engineering Best Practices: Gemini Adoption Series
In this video, we dive deep into the world of prompt engineering, focusing on best practices to get the most out of Gemini, Google's powerful AI platform.
This session explores the nuances of crafting effective prompts to ensure quality responses from Gemini. We discuss the importance of context, specificity, and intentionality in prompt creation, along with pro tips for better results. The video also covers the functionality within Google Workspace apps like Drive, Docs, and NotebookLM. Whether you're a beginner or experienced user, this guide provides essential insights to enhance your AI prompting skills.
00:00 Introduction and Session Overview
02:23 Understanding Prompt Engineering
06:30 Key Elements of a Good Prompt
08:30 Optional Components and Examples
15:06 Pro Tips for Effective Prompting
18:21 Using Gemini for Prompt Creation
22:38 Q&A Session
27:02 Closing Remarks and Contact Information
Helpful Links and Resources
Looking to Increase Your Gemini Adoption?
Transcript
Brandon Carter: All right, so what's the topic today? Prompt engineering best practices. So for those of you that were in Tuesday's session, we talked a lot about how does Gemini work, how does it work within the confines of Google workspace prompting within the app notebook, ln. And one of the things that Colin talked about is it's not.
Always as easy to get the output that you want. It's not always as easy as just putting in, Hey, write me an email that says this. He talked a little bit about how to make a great prompt. He talked a little bit about how to make a prompt that gives you a great prompt that you can then place back into Gemini there really is a little bit of a science and a little bit of an art form to it that is really good to understand.
Session two today, we are going to dive into prompting and what makes a great prompt. And ultimately a prompt is just a conduit to get what you want AI to tell you. [00:01:00] So just as a reminder, this is part two. Part one was Tuesday and that's available on demand for you to see on the Gemini adoption HQ page.
And we have two more live editions coming up. The first one will be next Tuesday after Memorial Day . We'll reconvene and talk through the Gemini app and we'll do some deeper dives on those workspace specific apps. So if you wanna see, I. What functions are available when using like the sidebar in Google Drive.
We'll get into that stuff on Tuesday and then we'll wrap up the series on Thursday with NotebookLM my personal favorite tool and what I think is like the game changing tool of Gemini. And also as a reminder, we have, besides session one from Tuesday, we also have deep dives on Google Vids.
And security and privacy settings. Trying to give you all the information that you could possibly need to help roll out Gemini in your organization and take these videos and share 'em with your employees too, if you want. It's a good way for them to [00:02:00] understand how best to get the most out of Gemini.
I'm gonna introduce Lauryn Thomas. She is one of our customer engineers. Again, some of you have probably already encountered her on your projects and your trainings. If not. Reach out to Prevo and let's talk. But with that I'm gonna hand it over to her and we're gonna do a deep dive on prompt engineering.
Go ahead Lauryn.
Lauryn Thomas: Thanks Brandon. Hello everyone. Let's get started. So first off, what is prompt engineering and why does it matter? Prompt engineering is the art of crafting a prompt for Gemini to be able to give you a quality response back. And why it matters is because the context and the details that you include in your prompt will ultimately give you a good response back or a bad response back.
And so here at Promevo we like to say garbage in and garbage out. And what that means is the outputs of generative AI are only as good as what you write. So that's why it's [00:03:00] really important to craft something that makes sense for the model to understand because there's vast amount of data that this model is processing that Gemini is processing.
So it's very important that we focus in on what exactly we want so we can get it back from Gemini. And so there are some specific ways to do that, and that's what we'll get into today. I. But before we get into that safety first I just wanna mention that within Google Workspace, all of your prompts that you enter into Gemini Google is not using that to train or improve its model.
If you are on your work or school account as well as. If you are putting prompts into Gemini, it will not share these prompts out with other users, coworkers in your organization. Your prompts are your prompts unless you decide to copy and paste your prompt to one of your coworkers. However, even if you did that you would get a totally different response from Gemini back and then finally.
All of your organization, [00:04:00] security, privacy, and access controls are in play when you're using Gemini. So whatever your organization has set up, it still applies. So if you were to ask Gemini a question about a document that you don't have access to, you either wouldn't get a response or the response you would get back is that, you know that I can't find this information or I can't give you this information. Something like that. So just some things to be aware of. When you are using Gemini and you're using prompting. And so did you know that the most successful prompts average around 21 words, however, most people use a little bit less than that, they are using around less than nine words.
And typically about five at average. But we like to say the most successful prompts are about 21 words. It doesn't always have to be 21 words, but we like to use this as a general. Standard for when you're crafting these prompts, because as I said before, the more context you provide, the better the AI will understand your needs leading [00:05:00] to better results.
And so if you think of it this way LLMs like Gemini process, vast amount of data, as I mentioned. And so a detailed prompt will provide the necessary context for them to leverage that data effectively. So well-crafted, prompt isn't just a suggestion. It's key to unlocking the full potential of these powerful tools, and it will significantly improve your experience and the output while you're using it.
And so it's not hard to collaborate with ai, but how do we do it successfully and how do you get it to give it what you want? And that's what we're really gonna get into today. And so to do that, we need to learn how to ask for things from Gemini or from these large language models, and that is what we call prompt engineering.
And so good prompting is all about clarity, specificity, and intentionality. So a well-crafted prompt is gonna guide the model, specifically Gemini, to produce your desired [00:06:00] outcome, and it'll also leave room for exploration. So if you have been using Gemini today, or if you haven't used it yet and you're gonna get started using it, you will notice that Gemini will actually sometimes even go outside of the bounds of your prompt and give you even something.
Even more amazing that you're not expecting. And that's outside of your box and something you didn't think of. But that also comes from a good prompt because you're allowing that room for it to happen. So that's really important as well when you're doing your prompting. And so there's four key elements we like to include.
In addition to that 21 words that we recommend those elements are persona, task, context, and format. So persona, that's who you are. Or it can also be the target audience. So who is this task for? An example of that would be you are a senior UX designer, you're a director of engineering, you're a math major At MIT Task, task is the goal or the specific thing you want Gemini [00:07:00] to do for you.
So that can be writing an email or writing a blog post. Context, that's any additional information that you could provide to Gemini to help it craft its response for you. So in the case of an email, what needs to go in the email? What is the email about? Or in the case of a blog post, okay, what is this blog post about?
What are we focusing in on? And then finally, format. Format is exactly how you want the output to look. So if you want, if it's a blog post, maybe you want paragraphs. If it's a email, maybe you want a combination of paragraphs and bullet points. So you could really specify what exactly you're looking for in your prompt.
Which is really important. 'cause like I said, that's gonna determine the response you get back. And then some optional components you can add. So you don't always need to use all of these as well. I wanna mention too you don't always have to use all four of those characteristics I just explained.
You don't always have to use a persona and you don't always have to add a [00:08:00] bunch of context or a format. You also don't always have to use 21 words. However, I just wanna. Tell you that it is important if you are getting, starting out on prompting to follow these guidelines because that will help you in your Gemini era and as you're working through this, if you start from there.
So that's why we like to suggest these things. However, as mentioned, you don't always have to use all of them. You can use bits and pieces, whatever works best to create the response that you're looking for. But some optional components that you can add here. Examples. So you can give an example of exactly what you're looking for.
So maybe let's say if it's an email, you already have an email template, you maybe wanna reference that. Or if you have a blog post and you wanna reference a blog post, any examples, you can give it in order. So it can create something similar to that would also help in your prompt follow up. So it's not.
You send one prompt off and then that's the end of it. You get what you get and you don't get upset. You can [00:09:00] continue to ask Gemini additional questions or provide additional tasks or even reformat your prompt if it's not giving you what you're looking for so you can continue to follow up from your initial prompt to get exactly what you're looking for in that response.
You can also do limits is another optional component. Limits provide guardrails within your prompt and for Gemini to give you the re the response you're looking back for. It also helps prevent hallucinations, which if you don't know what hallucinations are. This is when sometimes LLMs, they will present an answer to you that looks completely correct.
It gives you details, it gives you all of these things back and it looks like it's the correct answer, but it's not necessarily I. Correct. You do have to be mindful sometimes when you are using these models, and so that's what an hallucination is. But to prevent that or reduce that, you can give the model guardrails and saying, it must stay within, this range, or it must be this thing [00:10:00] in order to prevent that from happening.
I. And finally, you can also do style and tone. And so if you want it to be a certain way or you want your response to sound a certain way, you can include that in your prompt. So say for example, you're writing a paper, or you're writing, going back to the blog post, you're writing a blog post. You want it to be able to be read by someone who's in fifth grade.
You can include that. In your prompts, and so then your response would be in that style and tone of someone who would be able to understand it, who is in fifth grade. And then here's an example of a prompt and how to structure your prompt. So you are a Google Cloud account executive. That's who you are.
That's the persona. Draft a door, open an email. That's the specific task that you want. Gemini to produced for you. So an email to persona. So this is an example of where you can add that target audience here. And that would be another example of persona based on challenges in the customer's [00:11:00] 2023 Q4 quarterly report.
I. So this is all of the context that we need here in order to draft this email. This is exactly what we want to be in the email. And then finally, limit to 250 characters and use bullet points. So this is specifically how we want it to be formatted. We don't want paragraphs, we don't want this long drawn out answer.
We want it specifically to be 250 characters and use bullet points. And so that's an example of how to craft a prompt using those four main things there. And then here's another example of a prompt. So steps for user journey for someone who's downloading an app. So here you'll see in this first prompt, it's not very detailed at all.
We don't really have a persona who is the user that we're writing steps for. We also don't have any details about the app. What type of app is it? Where are we downloading this app for? And also how even, how do we want the steps to be formatted? We don't really have any of this in our first prompt, which makes it not as great [00:12:00] as you'll see.
The second prompt is, so in the second prompt, you'll see create a table that outlines the steps for the user journey for a young person downloading a new puzzle game from the Google Play Store for their pixel phone. So here this prompt is much, much more detailed. We specifically want it to be in a table format, which we didn't know that we wanted it that way before.
And there's also a clear task here which it wasn't really clear in the first one. It just said, we just want steps. But it wasn't specific in how we wanted those steps or what we actually wanted to do. And then specifically, we also now have a persona. We have a target audience that's a young person.
And why that matters is because the steps we write for a young person may be different for the steps we write for maybe someone who's an older person. So that matters in comparison for those prompts as well. And then finally, we have exactly what type of game it is. It's specifically a puzzle game.
So again, that may be different from a different type of game that's not involved in puzzles. And then finally, we know it's coming from the Google Play Store and specifically [00:13:00] a pixel phone. So the steps for someone maybe who's downloading. The app from the Apple App Store or an Apple phone or something like that would be different.
So that's why we like the second prompt better because it contains all of these details that we were missing in our first prompt. And if we were to give that first prompt to Gemini, we can get an array of responses back. And it may not be exactly what we're looking for. So we really wanna be detailed in that aspect.
An example of a second prompt we have here is how can we boost our marketing efforts? There's really no detail here if you're looking at this prompt. Because how specifically do we wanna boost our marketing effort? Is there a reason we wanna boost these marketing efforts? Who, where's the persona?
There's really no details in this first prompt, and so that's why we wanna move on to something in the second prompt that's a little bit better. Which is suggest three marketing strategies that could increase our customer base by 20% in the next quarter, [00:14:00] considering a limited budget and a target audience of millennials.
And so why this prompt is better is because of it being specific. Once again we have context about why we wanna include our marketing efforts. 'Cause we wanna increase our customer base. We also have some limits here and some guardrails because we specifically wanna do it by 20% in the next quarter.
And we also have to consider the fact that we have a limited budget. We didn't mention that in our first prompt. So in our first prompt. Jim and I may think we have an unlimited budget and we don't have any timeline to do this by next quarter. So that's why it's really important to include this in our new prompt.
Here. And then finally, we have our persona or our target audience, and that is millennials again, I. This is different for millennials or, gen Z, whatever. That's why you have to be specific in what you're looking for because again, the response that you're gonna get back is gonna be different depending on what you do in your respo in your prompt.
So the more details, the more [00:15:00] context you can add, the longer your prompt is the better response you'll get here. And then some more prompter writing tips we have here. So for better results, write instructions instead of questions For image generation consider including a subject, a setting.
This for in particular if you're trying to use Gemini for in image generation. I found that it's really useful to use examples in this context referencing images, other images or things and just providing details so you could get. Something that you're looking for with the image. Because here it can get very ambiguous if you're not really specific for image generation.
So some things to call out there. And then after you've generated your text, you can send feedback to Gemini about what they produced for you by either clicking the thumbs up or the thumbs down button. You will not hear Gemini's feelings if you press one of these buttons. It just simply lets Jim and I know Hey, I really like this suggestion.
Let's keep. Providing more suggestions [00:16:00] like it, or, Hey, I really didn't like this wasn't good. Don't keep providing me with those same suggestions. So just rate Gemini if you want to with those responses and send feedback. Always welcome. I. Edit your prompt. So you can always have the option to edit your prompt.
So again, once you send your prompt off, that doesn't mean you can't edit it. That doesn't mean you can't continue to ask questions or anything. You'll have the ability to edit it afterwards if you wish. And then from there you can send it off again and get a new response. And then you can also create a new version of the text the response that you get back from Gemini.
Once it does the response, if you don't like it or maybe you like parts of it, you can recreate the whole thing. And it'll generate something completely different from you for you depending on the prompt you gave. And then finally, you also have the ability to rewrite the suggested text. So say we're in Google Docs and we had Gemini.
Generate some text for us, or we wrote some text for ourself. Maybe we already typed up the [00:17:00] document, but we wanna polish it or we want to make it more formal. You have the ability to do that with Gemini by choosing the refine option. So as I mentioned, you can formalize it, you can shorten it, you can elaborate the text that you already have, and you can rephrase it.
And then once you go through this. Steps of refining. You can either insert it into your document or you can completely replace it. So those are some other tips that you should consider when you're using Gemini and Google Workspace. Then Google has a prompting guide that will be sent out to you. That, or you can go into search for it on Google yourself.
And basically this prompting guide has a bunch of different examples for how you can prompt Gemini if you're having trouble, creating prompts. This is a great place to start. It has prompts for specific roles. It also has prompts for the specific. Specific Google workspace applications that you can utilize as [00:18:00] well.
So this is a great starting point. Or even if you have already started on your Gemini era and you've already been using it but you're still having trouble creating prompts, this is a great resource to always come back to. I always come back to it myself, in fact. So look at that. If you're having some trouble and you need some new ideas.
And then here are some shortcuts to great prompting. The first shortcut being let Gemini do the prompting for you. You have this tool at your disposal, so why not work smarter instead of harder. So instead of trying to use your own brain power to create and draft this prompt, thinking about persona, task context, thinking about all of these things that you need to do to create a cur.
Great prompt. You can instead let Gemini do it for you. Maybe you have an initial idea of what you wanna do, an initial prompt. But it needs to be better. What you can do is if you go into the Gemini app you can say, turn this into a power prompt, and then give it [00:19:00] your prompt. And then from there, Gemini will give you several examples of power prompts that you can utilize for.
Your actual prompting, you can choose the one you like and copy and paste it in a new chat window and then have it generate a response for you. And so an example for that is so we have our original prompt turn this into a power prompt, which the prompt is help me write a congratulation note to my team for the wonderful effort on the daily work, which that's a fine prompt, but it could be better.
And so a better thing that Gemini may output for you is draft a concise, yet heartfelt message to my team, acknowledging their consistent hard work and dedication to their daily tasks. Highlight the positive impact their efforts have had on our overall success, and express my gratitude for their contributions.
And so you see in this power prompt that Gemini created for us there is a clear goal here, a clear task for this email as well as there's also some tone here. We want the emails. Specifically to be heartfelt and [00:20:00] meaningful as well as there's a lot of more context within this power prompt for what we want to be included in the email compared to our first and our original prompt that we created ourselves.
So you can actually use Gemini to do the work for you in creating these prompts. Another way you can use Gemini to create these prompts for you is through gems, which if you don't know what gems are we'll get into this a bit later, but we are gonna have an session specifically on gems to show you how to use them.
But just as a prereq, a gem is essentially like. Your assistant it prevents you from doing those tedious tasks over and over again. And so instead of constantly prompting Gemini to create a power prompt for you, what you can do is create a gym. Give it all of the instructions upfront as well as some examples as well.
And so then instead of constantly prompting Gemini to create a power prompt for you, or constantly prompting it with all of these things you need in your prompt, you simply just send off the prompt that you [00:21:00] have and it'll. Automatically created for you based off of the instructions that you provided it before.
And so you don't have to keep doing the same thing over and over again. And there's some instructions on how to create that for yourself. And so an example of that one would be create a process map for identifying and resolving blockers. So again, we don't have to say turn this in the, to a power prompt.
We don't have to give it any instructions or anything because the gym already has this background knowledge. So we send off our prompt and then immediately we would get back a new prompt following the instructions that we gave in our gym. And so our new prompt would be, you are process improvement specialist experience in combine methodology.
Develop a comprehensive process map for identifying and resolving blockers in a combine system. This process map is intended for combine teams and project managers. This process or present process map in a visually clear and easy to follow format, including steps, decision points, and feedback loops. Use a [00:22:00] concise and professional tone.
This process map should be detailed enough to guide users, but avoid unnec unnecessary jargon or complexity. So again, this. Completely amplified our original prompt. We have a persona here. We have a lot of context about what we want to be included in this process map. We have a target audience. There's also information about tone here.
So again, it completely revamped our prompt for us. We didn't have to go through the process of trying to remember or do each of these steps when trying to create our prompt. We let Gemini do the work for us. So that's also an option here. And now we have some time for questions.
Brandon Carter: So thank you, Lauryn. Great job.
That was awesome. And one of the things that occurred to me while you're going through this is what makes a good prompt for an AI tool is probably also a good prompt when you're asking a person for something like, add as much [00:23:00] context as you can. I always tell my team if you feel like you have to read my mind to get something out of me, then ask again or tell me that as much context as I can provide when I'm asking you it's just. Good feedback in general, but in particular with AI tools, it makes for the best way to get what you're looking for to get the most useful information. We did have a question come in, which as a reminder, this is q and a time. Those of you that are out there in the audience, you're welcome to use the chat bar over on the site to drop in.
Any questions? And we did have a couple that were submitted ahead of time, but one that just came in is the first thing that I. The first question that I had when I saw the Gems functionality. And Lauryn, the question is, can we share Gems with colleagues in our workspace?
Lauryn Thomas: Great question. It is the question of the year, honestly, Brandon, everyone wants to share those Gems.
'Cause it's a really useful tool to have. At this point in time you cannot share Gems. However, I can say that it is coming and it's coming this [00:24:00] year. So you can rest assured with that in the near future.
Brandon Carter: Yeah, that was the first thing that popped in my head when I learned about Gems and we've set some up.
We use it quite a bit on the marketing team, and I've just basically had to instruct my team on how to recreate it themselves. Coming soon super important functionality that Google is definitely aware of. Lauryn, one of the questions that we had submitted ahead of time is when, and maybe it's more of a technical question, but when you.
Insert a prompt, let's say in the Gemini like chat interface, does that prompt hold? So in other words, do you have to continue to add like context to every further drill down question that you ask? Or is that sort of set the instructions for that chat window? I.
Lauryn Thomas: Great question. Yeah, so it already has that context, which is why I mentioned before during the presentation, you don't always have to continue to have those four things.
Persona, context, like you don't always have to have that. And the reason I say that is because [00:25:00] you're utilizing the same chat. So it already has all of the context and all of the. Things that you've said before within that chat window, so you don't have to keep doing that. And then I liked earlier you were saying, if you're talking to a human and they don't understand what you're saying, they'll ask again.
And that's the same thing you can do with Gemini too. You give it your prompt, you get a response, you don't really understand it, you need more context. You can ask again, you can give another question, but you don't have to use that same format that we're always using.
Brandon Carter: That's a great point. One thing that I am definitely I'll admit it publicly that I am not ashamed to go in and tell the Gemini to explain it to me as if I'm a fifth grader.
For example, like, all right, what you just said doesn't make sense to me 'cause I'm not intelligent enough. One another question, Lauryn, is when obviously this sort of like very context rich prompt applies to. The Gemini chat window. Is it a good idea to have that same sort of [00:26:00] deep context when you're interacting, let's say within Gemini and Google Workspace, like Gemini within drive or a prompt within Google Docs or notebook?
Li is. Can you be a little more lenient with how you prompt in those elements or those environments or Hey, just as much information as you can give it is always a good idea. I.
Lauryn Thomas: Yeah, great question. I think it depends on what you're trying to do. Let's say for example, we're in drive and you just wanna know a question about a document.
Alls you gotta do is send off that question. You don't have to let Gemini know who you are or provide any context. You just have to provide the. Specific question you want, or the specific questions you want. If you're in drive, but let's say you're in Docs and you're trying to create something new you probably want that prompt because you're looking for something really specific that you want Gemini to create for you.
So it really just depends on the context and what you're doing and what you're trying to achieve in that aspect. If you're using it in Google [00:27:00] Workspace.
Brandon Carter: Fantastic. It looks like that's all the questions that we have. Now, I'm going to flash up a quick banner. If there's something, maybe you're being shy, you don't wanna ask.
Here, or maybe 10 minutes after we wrap this thing up, a question hits you. Send an email to this address, updates@promevo.com. If you want us to address something in one of our upcoming sessions. I'd love to hear from you. These emails go directly to me so I guarantee you they will be seen and responded to.
Thanks to everybody out there for joining. So glad that you guys are here with us again.
Reach out with any questions. And with that we are gonna call it a rep and we will see you all Tuesday.
Presenter
Choose your Google Workspace edition. Try it free for 14 days.
- Gmail
- Drive
- Meet
- Calendar
- Chat
- Docs
- Sheets
- Slides
- Keep
- Sites
- Forms
Custom and secure business email
100 participant video meetings
30 GB cloud storage per user
Security and management controls
Standard Support
Custom and secure business email
150 participant video meetings + recordings
2 TB cloud storage per user
Security and management controls
Standard Support (paid upgrade to Enhance Support)
Custom and secure business email + eDiscovery, retention
250 participant video meetings + recordings, attendance tracking
5 TB cloud storage per user
Enhanced security and management controls, including Vault and advanced endpoint management
Standard Support (paid upgrade to Enhance Support)
Custom and secure business email + eDiscovery, retention, S/MIME encryption
250 participant video meetings + recordings, attendance tracking noise cancellation, in-domain live streaming
As much storage as you need
Advanced security and management and compliance controls, including Vault, DLP, data regions, and enterprise endpoint management
Enhanced Support (paid upgrade to Premium Support)
Business Starter, Business Standard, and Business Plus plans can be purchased for a maximum of 300 users. There is no minimum or maximum user limit for Enterprise plans.
Contact Sales
