From the course: Introduction to Prompt Engineering for Generative AI

ChatGPT

- [Instructor] OpenAI's ChatGPT has been quite the phenomenon. It has really mainstreamed people's understanding of what large language models are capable of. What makes ChatGPT unique is its conversational nature, which makes prompt engineering a bit more intuitive. Let's take a look at what I mean by that. If you head over to openai.com/blog/chatgpt, you can go ahead and hit this big button, TRY CHATGPT. And you will need an OpenAI account. And setting it up is quite a breeze. I'm going to go ahead and sign in. Once I've signed in, I'll see the collection of my previous chats here. And I can start a new chat by typing something here. Now there are some cool examples of things you can ask ChatGPT to do. And you'll see explain quantum computing in simple terms. Got any creative ideas for a 10 year old's birthday? But then you'll see limited knowledge of world and events after 2021. Now, what's that about? At the time of this recording, 2021 was the major training of this model. So in a sense, some of its knowledge is frozen in time. And there are multiple ways of addressing this issue. But it's important to keep in mind that many large language models have this kind of frozen-in-time knowledge of basically everything they've been trained with. So let's take a look at one of these examples. Let's do Got any creative ideas for a 10-year-old's birthday. And as a parent, I actually want to try changing that to a five-year-old's birthday. This practice of prompting a language model with an instruction without really giving it examples of the task you want it to perform is often referred to as zero-shot learning. So it's giving me these new ideas. And it says a themed birthday party, such as a princess or a superhero party. And it's doing like a trip to a local amusement park or children's museum. Now, this is not the same as running a search on a search engine like Google or Bing. It's quite different, because this, in a sense, is novice text. It's likely that this text is generated and is new to the world. And while this is mind-boggling, in the next few videos, we'll take a look at how this is done. Now, you can do other things. Let's do great. And let's do a little prompt engineering. Let's say, can you give me these in spreadsheet form? Now it's telling me that it's unable to create spreadsheets. But I'm not quite ready to give up yet. And this is where a bit of prompt engineering can help. So let's ask ChatGPT, can you format these so that I may paste them into a spreadsheet? Submit. So this is a great example of how a little bit of precision can turn ChatGPT's response of not being able to do something to easily completing the task. Now finally, and this is a really cool one, let's ask it to go ahead and say, can you write a Python program that randomly chooses one of these ideas? And actually, many of these models have been trained on a large amount of code. And here it's showing me how it's creating a list of ideas. And using the random module, it's choosing an idea and printing it to the console, which is quite mind-blowing. Now I encourage you to go ahead and really test the limits of ChatGPT. It's a great way to explore what these models are capable of. And if you discover a really cool use case can then take it to another model and see how it differs.

Contents