speaker 1: Chances are you've already experimented with generative AI, and you've probably gotten some results that have been helpful and maybe some that fell short. Throughout this course, AI experts at Google will teach you the difference between a good prompt and a great prompt, so you can work faster and smarter with gen AI at your side. And we'll share practical examples of where you can use gen AI at work. Hi, I'm Amina. I work on generative AI at Google. In this course, my colleagues and I are going to teach you how you can get the most out of gen AI. You'll learn when to use gen AI and how, by designing better prompts to get the best results, you'll apply what you've learned with hands on activities and quizzes to level up your prompting skills. After you've completed this course, you'll have lots of practice applying gen AI I in ways that mattered to you and your job. As recognition of your work, you'll earn a certificate from Google to share with your network and potential employers. We have a lot of exciting stuff in store, so let's get to it. speaker 2: Hi, I'm Timothy, a director of developer relations at Google. For the last 14 years, I've been helping developers and Google work better together. I've recently been working a lot more with gen AI to do things like technical writing and generating code. I've also been helping more developers integrate gen AI into their apps. Prompting is a new skill that a lot of us are learning and trying to get better at, myself included. Now, my first experience using gen AI that was transformative was for a pretty simple task. I needed to quickly collect everyone's availability for an important team meeting. I asked over chat, and everyone responded in a different format, as people are likely to do. And it was a lot to track. But with the help of gen AI, I was able to organize everyone's availability into a table and then transposed it so the table was sorted by date, not by chat message. A task that would have taken forever manually. Only took me a few minutes with gen AI. And that was my breakthrough moment, using gen AI in my everyday tasks to turn things that used to be a headache into something simple and easy. And that's what this course is about, using gen AI to help you get your job done. So what is prompting anyway? What simply prompting is the process of providing specific instructions to a gen AI tool to receive new information or to achieve a desired outcome on a task. Those instructions are called prompts. When we write a prompt for a gen AI tool, we're giving it a series of inputs and telling it what we would like it to generate. Some gen AI tools can generate text or images, while others generate video, audio, or even code. A prompting is both an art and a science. To get the best results, we need to be precise in defining what we need. Now, this is similar to the way you would help your teammget started on a new project. Providing context and setting parameters will get you the best output from gen AI I. The first thing you'll learn is the prompting framework. It's a formula for writing great prompts. You'll use this framework throughout the course. And after that, it's all about putting prompts to use on specific tasks that can save you time in your job. You'll use gen AI to brainstorm ideas, develop plans, and draft emails for different audiences. We'll teach you how to summarize meeting notes, assign action items and more. We'll also teach you how to analyze data and spreadsheets. With gen AI, you'll write prompts that can help you find insights buried in data. You'll then use gen AI to turn those insights into individuals and eventually turn it all into a slide deck with talking points for a presentation. Next, you'll learn advanced prompting techniques to help you untangle complex tasks. For example, you'll learn how to create prompts that can help make long term, complicated projects easier to plan and execute. You'll also learn how to design a prompt to create your own personalized AI agent to do things like practice before an interview or prepare for difficult work conversations. And finally, you'll learn how to use gen AI responsibly, including guidelines for using it in your job and on your team. This is crucial. Gen AI tools help you with the work that you do, but they don't do it for you. Anyone using gen AI should always be evaluating and fact checking outputs. There are a lot of gen AI tools out there. And in this course, we're gonna to demonstrate how to prompt using Gemini and other Google AI tools like Gemini for Google workspace and Google AI studio. But all of the techniques and best practices you'll learn in this course can be applied to other gen AI tools like ChatGPT, Copilot, or clad. Last thing, we designed this course to give you skills that you can use at work right away. So all of these lessons and techniques you're gonna to learn are rooted in real world scenarios. You should experiment and play around to figure out what works best for you. And as you go through this course, feel free to pause the video and test what you just learned with something you're working on right now. Now let's get started with our first prompts. In this lesson, you're going to learn how to create effective prompts. A good prompt follows a simple framework, task context, references, evaluate and iterate. If you ever forget a step, just remember thoughtfully create really excellent inputs. First is task. You need to describe the task you want the generative AI tool to help you with. Now, this should include a persona and a format preference so that the task is specific. Persona refers to what expertise you want the gen AI tool to draw from. You can ask the tool to take on a persona, like a professional speech writer or a marketing executive with 15 years of experience. Or you can ask it to create output for a specific audience, a customer, or even your manager. You can be as detailed as youlike when adding a persona to your task. Format refers to how you want the output to appear, whether that's a bulleted list, short sentences, or a table. So there you have it. Task. Next, you'll include context or the necessary details to help the gen AI tool understand what you need from it. This is the difference between writing. Give me some ideas for a birthday present under $30, and give me five ideas for a birthday present. My budget is lar $30. The gift is for a 29 year old who loves winter sports and has recently switched from snowboarding to skiing. Sometimes you'll add references for the gen AI tool to use while creating its output. You just asked a gen AI tool to give you ideas for birthday present, right? Well, if you add examples of birthday presenyou've given in the past as references, the gen AI tool can give you a more useful output. There aren't always going to be clear references of what you need, especially if you're working on something more abstract or searching for ideas and inspiration. Once you have your output, it's time to evaluate. Ask yourself if the input you provided gave you the output you needed. This leads us to the final part of the framework, iterate. If you evaluate your output and determine that you're not getting what you need, you can try again by adding more information or tweaking your prompt. And this is a key part of prompting effectively, and we'll explore it in depth later on in the course. One more note on the framework. There are plenty of ways to construct an effective prompt. The order of how you construct a prompt is less important than the substance of the prompt itself. As long as you're thoughtfully creating really excellent inputs, your outputs should be great. Let's put the framework into action. First, we'll log into Gemini and then use the tool to help us brainstorm ideas for a new high performance sneaker line. First, let's add the task. Generate five ideas for a new high performance sneaker line. Okay, we've asked Gemini to complete a task, but we're not really applying the prompting framework yet. Remember, thoughtfully create really excellent inputs. This prompt is all task and nothing else, which might give us an output that's too broad and not very useful. Still, Gemini generated five ideas with unique names and descriptions. This isn't a bad start, but we can do better. Let's add some more details like our desired format and a more specific task for the tool to complete. List the concepts and materials for each sneaker in an outline that's much better. Now we have a set of unique ideas for a sneaker line that includes the materials for each show, and it came in our preferred format. I think we can do even better, don't you? Let's add some context. The sneakers should be made for athletes doing cross training activities. With the new information, Gemini created five new sneaker ideas that are more suited to our specific goals. Remember, getting tailored outputs means we need to provide a gen AI tool with more details and context in order to generate more useful results. Success is all about the details. So let's give references a try. References give gen AI tools examples to work from, and that can mean asking a gen AI I tool to learn from the tone, style or length of a given reference. Providing multiple references is also known as few shot prompting. Shots are just references or examples, and the term is used a lot. There's also single shot prompting, which means we're giving it one reference, and zero shot prompting, which means we don't give the AI tool any references. Now, most of the time, between 25 references is the sweet spot for a gen AI tool to few references. And we don't give enough context, too many. We could skew the results and limit creativity to practice few shot prompting. With our new sneaker line, let's include descriptions of shoes that already exist. One of them is from a budget line of shoes, and the other one has a new adaptive soul. We can input those descriptions like this, keep the five ideas generated, but refine them using these two examples as references. Here's what we'll paste in the references. Uthere's a lot of choices here, and they all seem like good options for the task. And this is cool, a shoe that regulates temperature. Evaluating the output and iterating might be the last parts of our prompting framework, but they're also where we get to experiment and get creative. Each new output is an opportunity to further refine your prompt until you get the response you want. In fact, we've been evaluating and iterating this whole time. We evaluated the sneaker ideas from our first prompt, and we iterated by adding context. We evaluated the output again, and we iterated by adding references. And remember, we can always add details or tweak phrasing in order to change our outputs. We like to say abi, or always be iterating. Give the prompting framework a try yourself. Remember, it's always better to start simple and then slowly add complexity, iterating as you go. If your outputs start to lose quality, you might need to go back and make your prompts simpler, and that's okay. Learning what works and what doesn't is all part of the journey. If you ever get stuck, just remember to thoughtfully create really excellent inputs and you'll get back on track. There are going to be times when your prompt simply isn't giving you what you want, but instead of scrapping all your work and starting again from zero, think about how you can always be iterating or abi to try and mold the outputs into something more useful. By the end of this video, you'll learn four helpful iteration methods. The first method is to revisit the prompting framework and make sure you're providing enough specificity in your task context and references. For example, if you wrote give me five blog post ideas, a generative AI tool might respond better if you adjusted your prompt to include the persona and format. For example, you are an expert on sports nutrition. Provide five blog post headlines that summarize the biggest trends happening in the industry for an audience of physical therapists working with professional basketball players. The second method is to separate your prompt into shorter sentences. Start by taking a long input and breaking it down into smaller tasks. This is the long input. Summarize the key data points and information in this report, then create visual graphs from the data and shorten the key information into bullets. You can break this up into shorter sentences and input them as separate prompts. You'll input each prompt, receive an output, and then follow up with a new prompt until all of your tasks have been submitted. First, summarize the key data points and information in this report, then follow that up with create visual graphs with the data you summarized, and finally shorten the key information you summarized into bullets. Sometimes shorter sentences can yield more precise results, because the gen AI I tool can parse one small task at a time, instead of identifying the relationships between all of them at once. You can also try using different phrasing or switching to an analogous task, which is a task that is very similar to the one you're trying to complete, but different enough to trigger a new response. For example, if you're asking a gen AI tool to help write a marketing plan for a product or service, you could instead ask it to write a story about how this product fits into the lives of our target customer demographic. By moving from write a marketing plan to write a story, you're asking the gen AI tool to approach the task differently, which might lead you closer to a useful output. Finally, introducing constraints might also help focus a gen AI tooutputs. Maybe you want to make a playlist for an upcoming road trip, and you're trying to figure out what artists you want to include. You've added some context about your favorite genre, but the results are kind of boring. You've heard all these songs a million times before. To get better output and something more unexpected, you could start adding constraints like specifying you only want artists from a certain region, or artists that have released music in the last five years. Adding constraints to your prompt will help the gen AI I tool narrow down its outputs and give you something more helpful or unique. The better you can evaluate and iterate, the better your output will be. Images and visuals can be as important as words when you want to communicate ideas. In this lesson, I'm going to teach you how to use generative AI tools to create visuals. So far, we've asked gen AI tools to produce responses. And what's called a text based modality modalities are the different formats in which gen AI tools receive or produce information, whether that's text, images, video, audio, or code. Different gen AI I tools are better at working in certain modalities. Be sure to check the gen AI tool you're using to find out which modalities it's capable of using or producing. Let's start with image generation. Some gen AI tools can create images a sunrise, a bouquet of flowers, or even a crab, right? The dolphin. But those same tools can also make images for a business or a professional presentation. Maybe you're a musician playing a gig in New Orleans and you want to promote your concert, so you use a gen AI I tool to help you create a poster to advertise the show. Let's prompt Gemini to create both text and images so we can discuss the subtle differences between prompting for each modality. We'll start with the text first. Remember to keep the thoughtfully create really excellent inputs framework in mind. Text based prompts work best when we specify our task and add some clear context so we could prompt generate headlines for a poster promoting a rock concert in New Orleans. And to add a little more context about the task, we could write the concert is one night only, and the headlines should encourage the audience not to miss out. By specifying our task and adding context, we're guiding the gen AI tool to the text based output we want. And just like that, Gemini came up with a few catchy headlines for the poster. And this is a good one right here. Nola. This is it. Unforgettable rock one night only. It's catchy and it gets to the point. Now, in order to prompt the gen AI tool for an image, we'll need to tweak our language. We'll still use the prompting framework, but we'll need to provide more vivid descriptions that help the gen AI I tool determine the type of image it needs to create. This means specifying the size, color and position of things in the image and the overall aesthetic we want. So first, we'll specify our task and format. Generate an image of an electric guitar for a poster. It should be a photographic style. And how about some vivid descriptions? The guitar should be glittery or sparkly and create a sense of excitement. The guitar should be in the foreground and give a sense that it's floating in the sky. Great. Gemini created four different images that you can use on your poster. So how can we make these images even better? Let's break down how to iterate and refine a prompt for images. We're still going to use the prompting framework, but with a few little tweaks for the concert poster. Maybe you liked the appearance of the guitar, but you want na make it even more exciting by adding a storm with lightning striking the guitar. We could refine it by writing now make the sky stormy with lightning hitting the guitar. There we go. You could keep this image or keep evaluating and iterating again and again, adding relevant details from each new output until you get one that works. Okay, we just use text to create an image, but we can also use an image as part of our prompt to create a different type of output. Let me introduce you to multimodal prompting. The essence of multimodal prompting is using different types of media to prompt a generative AI tool like inputting image and text or audio and text. This can be especially useful in the workplace. You can take a picture of a chart and ask a gen AI tool to explain the data in plain language. You could upload different logo options for your company's rebrand as a set of references, and then prompt the GenAI tool to give you more choices based on each direction. Or you could capture audio of another language and ask for a transcription in the language you understand. Here's an example where we'll prompt with both image and text to receive a text based output from Gemini. Let's imagine you're an entrepreneur who needs help creating social media captions for a new design of nail art you're selling. You can take a picture of your nail art and ask for help writing a caption. Here's a photo of the nail art, and we'll input this into Gemini and prompt write a social media post featuring this image. The post should be fun, short, and focus on the fact it's a collection of new designs I'm selling. Note that in addition to including a reference photo of the nail art, we still used the other elements of our prompting framework. We specified our task, added some context, and included the format. Besides the image itself, we didn't provide other references, but if we have a specific tone or voice we want the gen AI I tool to match, we could always input a few captions from previous posts to reference. This is great. Gemini analyzed the image and created a fun caption you can use to market the nail art. Notice how it uses emojis to break up the text and how it engages followers by asking a question about their favorite design. The cool thing about multimodal prompting is that it reflects the way you experience the world. You don't just discuss the words or images in a work presentation. You build connections between them to get a fuller understanding of the topic in question. A mix of text, images and other modalities can open up new ways of solving problems or saving time. You could use a gen AI tool to turn a picture of a city map into a list of notable landmarks, find key insights within an audio file, or quickly extract a list of room names from an office floor plan. Here's another example. You go to a conference and receive a schedule of events, and you want your team to focus on a few of the events. In particular, I want to send a reminder to my colleagues about certain events from a conference schedule, extract the times of the keynote speaker and two panel discussions from this schedule into a table. Again, we specified our task, provided helpful context and included the format. Before inputting the picture of the schedule, let's check it out. Great. The table makes it really easy to see where your team needs to go and when. You can even take it a step further and prompt Gemini to draft an email about these events. We'll get into prompting for email drafts later in the course. Just remember to keep the prompting framework in mind no matter what modality you are prompting in to achieve the best results. How might you leverage different modalities in your prompts to help you at work? Generative AI tools are powerful, but like any tool, it's important you use them responsibly, especially at work. First, consider the problem you're using gen AI to help you solve. Does it align with your goals and your obligations to your clients and coworkers? What about your organization's policies and local laws about using gen AI to perform this type of task? If it doesn't align, then you should rethink your process and whether or not a gen AI tool is right for the job. Second, consult your company's rules or policies before entering confidential or sensitive data into gen AI tools. You can also check if your company has an enterprise version of a gen AI tool that is okay for other types of use. And remember, if you're using gen AI tools for personal use, avoid entering personal or confidential information about yourself into publicly available tools and always check how the data you enter might be used. Finally, being a responsible gen AI user means evaluating outputs for potential bias and errors, and disclosing any use of gen AI when sharing content with others. While it's okay to enlist the help of gen AI, you'll still need to evaluate the outputs for accuracy the way you would for any output. The same goes for hallucinations, which is when a gen AI tool provides outputs that are inconsistent, incorrect, or even nonsensical. Hallucinations most often happen when someone gives a gen AI tool vague or unclear instructions, or when a tool guesses at an answer to something it didn't quite understand. Hallucinations can be hard to recognize. That's why it's so crucial to fact check and cross reference outputs to confirm if a fact or statement in an output is. Remember, gen AI tools aren't thinking critically the way humans can. It's important to keep what we call a human in the loop approach, meaning a human should verify gen AI I outputs before using them. I recently generated an image for a presentation. I wanted to have a bunch of cats on a rocket going to the moon. Now, instead, the output was a little bit off. The cats were on top of the rocket rather than inside it. And that's not exactly safe for cats, is it? While I did write in my prompt that ks needed to be on a rocket, I didn't mean that literally, but the tool didn't know that. So I iterated and specified that the cats should appear safe and sound inside the rocket instead of on top of it. Some gen I tools, such as Gemini, have a built in fact checker that allows you to cross reference the outputs using Google search. Comparing outputs side by side makes it easier to determine how accurate your initial output is and to find any discrepancies. So how can you avoid these issues before they become a problem? Try to recognize biases and outputs and the negative consequences they can have. They may appear as stereotypes or unfair representations of a group of people. Avoiding bias to negative outputs starts with inputting specific, detailed prompts and iterating as needed. Another key part of this is using language that includes people of all backgrounds, genders, and ethnicities, and avoid stereotypes and generalizations in your inputs. For example, if you were using a gen AI I tool to help you write the description for a job posting, you should avoid the gendered terms like servicemman or workman. Instead, use service person or worker, so the tool doesn't write a description that only speaks to someone who identifies as mail. Remember, gen AI tools are only tools. They don't think critically and can't understand nuance the way humans can. Is your job to bring that human perspective every time you use a gen AI tool?