From the course: ChatGPT: Crafting Exceptional GPTs for Enhanced Productivity and Innovation

GPTs and ChatGPT: Programming with prompts for effective AI instructions - ChatGPT Tutorial

From the course: ChatGPT: Crafting Exceptional GPTs for Enhanced Productivity and Innovation

GPTs and ChatGPT: Programming with prompts for effective AI instructions

- To really use generative AI effectively, we have to start thinking about programming it. Now, if you're not a software engineer or a computer scientist, this may seem alien to you, but it's really quite simple, and it's important for actually really getting the potential of generative AI. And I want to show you what I mean by this. So I want you to start thinking about programming generative AI to do something. Now, what does that mean? Well, let's take a look at a really simple example. I've gone into ChatGPT, and I've said, "I'm going to the grocery store." Really simple statement, not a lot of context about what this means, what it's supposed to do, and how does it respond? "That's great! Do you need help with making a shopping list, or perhaps some tips to what to buy?" You see, I'm just giving it a simple statement. Now, what if when I want it to respond, I want it to respond in a happy, excited, over the top way rather than something sort of really flat? What would I do? Well, I could go into this conversation, I could say, "Redo your last response and make it really exciting." But there's another way to get there, and it's to start thinking about time, telling it what to do in the future before you've given it the message that you want it to change its response. So this is, is I could go now and I could say, update your response, "Make your response really excited and over the top," like that. And now it says, "Oh wow, that's absolutely fantastic! Heading to the grocery store is like embarking on a thrilling adventure." But the challenge with this is, right, I had to go after the fact and tell it what I really wanted. I had to go and give it that additional context. And let's say you were trying to build some type of custom GPT for somebody else to use. You don't want them to have to know to go in after the message and say what you want. You want to be able to tell them upfront, go do whatever you want and it will figure out the right way to respond. So let's see how we can do that. Rather than thinking about just saying, here's the message, instead, we can start giving it time and programming it. We can say, "From now on," and this is really important, we're saying in the future, messages to come, "Respond to every message with a super excited and happy tone, be way over the top." So what I'm doing is I'm not giving it a message for right now, I'm giving it a message about what to do in the future. And when you start thinking about that, describing what you want done in the future is programming. That is programming how it's going to respond in the future when you give it a message, or maybe you're creating a custom GPT and somebody else gives it a message, but it's creating that context. So "From now on, respond to every message with a super and excited, happy tone, be way over the top." "I'm going to the grocery store." And now we get that excited message that we saw before. "Wow, that sounds like an epic journey!" And so you see, we're programming it to respond differently. Now, what are the types of things we might want to program in? We might want to program in tone like we have right here. How, what does it sound like when it responds? Is it really formal? We could have gone in and we could say, "From now on, respond in an extremely formal way." That's one thing we could have done. We could have said, "Be really over the top and excited." We could say, "Be neutral." And so we can adjust the tone that it uses to respond to the user. What else can we do? Well, I'm going to go in and I'm going to ask it, "Give me some unique ideas for how to use generative AI that combine all of my roles and what you know about me." Now, it doesn't know anything about me, doesn't know who I am, doesn't know my name, doesn't know where I live, doesn't know what my job title is, and it gives me a bunch of sort of generic stuff. Some of 'em actually, I think randomly hit the nail in the head, personalized learning and development tools. Well, that would be something that's interest to me. Creative content generation data-driven wellness, not so much of an interest to me. AI-assisted project management, innovative problem-solving sessions, enhanced environmental initiatives, interactive historical learning experiences. All of these are exciting things, but they're not really about me. They're not personalized to me. So what's something else we can do to program it? Well, we can program it with background knowledge. It could be knowledge about who I am and where I live, or it could be knowledge about my business, about my university. It could be knowledge about how I want things done in terms of like, here's background knowledge and process that you should know. And so I can do that, I can give it background knowledge. I can say, "From now on, remember the following things and use them to help you respond. My name is Jules White. I'm a Professor in Computer Science at Vanderbilt University. I'm the Senior Advisor to the Chancellor in Generative AI and Enterprise and Education Solutions. I live in Nashville, Tennessee, and I teach a large class on Prompt Engineering on Coursera." So now I've given it background information about me. And now if I go and I say, "Give me some unique ideas for how to use GenAI that combine all the roles you know about me," now I get things that are based on where I live, Nashville-themed AI-generated educational content, AI-driven enterprise innovation workshops. And you see it's pulling information it knows about me. I've given it background information. So we can program tone, we can program it with background knowledge that it should base its answers on, not just the knowledge that it was trained on, but we can actually give it new knowledge that's just baked in. Now, people talk a lot about having to train a new model, but in reality, most of the time you don't even need to train a new model, you just need to tell it, "Here's the information that you don't know today that you need to know in order to respond or solve the problems that I want you to solve." What else can we do with programming then? Well, I've gone through and I've taken Vanderbilt's webpage and I just copy and pasted, I just highlighted everything on Vanderbilt's webpage here, and I have dumped it into ChatGPT. So it's got tons and tons of unformatted information. What does it do with this, right? Well, what it does is it starts summarizing because that's a common use case that a lot of people use it for. So it starts summarizing all of this stuff, which is great if that's what I wanted, but I wanted something slightly different. I wanted to say, "From now on, turn everything I give you into CSV." This is a comma-separated value or tabular data like you could import into a tool like Excel or Numbers. And so I want it to, no matter what I dump into it, it gives me structured information out. That's a very different way of behaving than ChatGPT normally does. I'm totally changing its standard behavior and reply to do something much more complex, which has turned into data. I'm basically giving it instructions about what to do and how to respond by default. It says, "Okay, I understand." And now I go and I dump all that same Vanderbilt information from the webpage into it. And now you see what it's doing. It's turning it into data. So it's creating a version of ChatGPT that's customized, that knows no matter what I give you, turn it into structured data that I can do something with. So you're beginning to see that we can program the large language model to do unique and new things that we normally don't think it can do. We normally think, "Oh, it doesn't know about me, it doesn't know my background," or "It won't know the user's background that comes in and starts interacting with it." 'Cause when we start thinking about customizing it for other people, we want it to know who they are. Or if we start thinking about customizing it for other people and we're going to be representing our organization, we may want to customize the tone that it takes, and how it communicates with people. If we're a law firm, we might want it to be very formal and very, very careful in what it says. And if we're a really fun brand, we want it to be over the top and excited about what it's doing. "Great job that you're going to the grocery store." But in order to do that, we have to customize that tone. So programming it is all about telling it what's going to happen in the future. We go from being able to just say, "I'm going to the grocery store," and getting a flat response to this, to going and saying, "From now on," which are really powerful words, everything into the future, go and do this differently. And now we get the big over the top answers like we have here with emojis and wow, we could program what it knows in the about you or the user, the background information it has. We can program really complex things like, that no matter what you give it, it turns it into data. And suddenly we can build office applications, work applications, all kinds of complex things, and these all come from the simple idea that we can program how it responds in the future in the conversation. That's the key to really, really building exciting customized versions of large language models like ChatGPT.

Contents