From the course: Demystifying ChatGPT and Generative AI: What Every Professional Needs to Know

Unlocking the power of ChatGPT: How generative AI understands your prompts - ChatGPT Tutorial

From the course: Demystifying ChatGPT and Generative AI: What Every Professional Needs to Know

Unlocking the power of ChatGPT: How generative AI understands your prompts

- So what do we need to learn and what does our workforce need to learn in order to be effective with this new interface to computing? How do we use generative AI appropriately and effectively? It's all just a bunch of text, right? Well unfortunately our mental model of a text box is an internet search. And that's the wrong model for thinking about generative AI. Now why is it the wrong model? Well, in internet search, you go in, you type in what you want and it gives you a set of facts back. And that's not what generative AI is for. That's not the right use case for this technology. And people are still stuck thinking about it as something that generates facts and then pointing out all the flaws in its facts. No, that's not how it's going to transform our world and the workplace. Now the other problem is, is that we think when we see this text box that we can type in anything we want and if the answer that comes back isn't great, it's not our fault it's generative AI's fault, that somehow we should be able to express anything we want in there as poorly as we want and it should be perfect, whatever it produces. And that's wrong too. Neither of those models is right. We have to learn how to go and use it effectively. And so let's take a look at what we need to know in order to be effective users of generative AI. Now, to start off, I want to give you some intuition for how these large language models were trained. These models like ChatGPT. So when you hear large language model, what they're talking about is these models where you go and can essentially prompt them to get some output. ChatGPT being a large language model. Now there are lots of nuances beyond what I'm about to show you, but this is sort of some fundamental intuition you can have that'll help you in understanding that whole space. So the way that these models were trained is they were taught to predict the next word in a sentence. So they would've gone and they would've shown it something like Mary had a little, and then they would've tried to get it to predict, lamb because they're trying to get it to predict the nursery rhyme. And Mary had a little lamb, it's fleece as wide as snow. And so they would've gone and shown it the first few words or large amount of words, and then they would've tried to get it to predict the next word. Similarly, they would've said Mary had a little lamb and they would've tried to get it to predict its, they would've then said, Mary had a little lamb, its, and they would've tried to get it to predict fleece. And they did this over and over on huge amounts of text from the internet. And over time these models learn patterns in human language and how they predict what word should come next. Now, if you think about what we've talked about, basically what we're seeing on the left hand side is the prompt and on the right hand side is the output. So it's basically learning how patterns in the language and the prompt impact what comes next. And prompt engineering, part of prompt engineering is the discipline of understanding how do you word things in order to get the output on the other side that you want and how to solve different problems by wording your request differently, how to structure your request effectively, how to overcome issues that you're dealing with. But it's also broader than that. It's also about how do you take these things and validate them. How do you make sure that they stay, you know, correct and accurate over time? How do you version these things? How do you build architectures of it all? All these things are part of prompt engineering. It's much broader than just the wording, although the wording is possible, is part of it as well. But prompt engineering is like software engineering. It encompasses a lot of different things from architecture to best practices to the individual wording of different prompts. And so it's a large field and it's going to be evolving and really important in business over time. Now what we study at Vanderbilt and we're talking about is prompt patterns. And that's basically documenting patterns in the language that can be used to solve different problems. And then providing these patterns is building blocks to people so that they can learn them and then build off of them and go and innovate within their individual departments or disciplines. Now when I say prompt pattern, this sounds like this crazy thing, like some, you know, really out there thing, but if you think about it, we know patterns in our language that we use all the time. If you go to write a former letter, a formal letter, you'll say, dear so and so, comma, and that dear is to indicate that this is a formal thing and the person is indicated. So it's you know who it's addressed to in the comma to say, okay, now this is what comes next. And that's a pattern that we use in our language. And there are things like that that are easy to learn that they can help people become very, very powerful with these tools. So I'm going to start off with an example of a pattern that we documented that you see in use all over the internet. And it's a really, really powerful first pattern to know and hopefully you'll go and experiment with ChatGPT or a Claude or one of these other generative AI tools afterwards. 'cause this is one that's really, really valuable. And it's called the persona pattern. So the idea behind this is in the real world, if you have a problem you need solved, you know who to go to to get the answer or to get the solution or you know what organization to go to or what department to go to in order to get the solution or organization. But you don't know what they're going to say to you or how they're going to arrive at their answer. You just know if I have this problem solved, this is where I go for the solution. Now the persona pattern is all about doing this within a large language model. It's about replicating that real world experience. And what we do is we go and we tell the large language model, act as some persona, act as a nutritionist, act as a chief information security officer, act as a computer science professor, act as the IRS. And then whenever you produce an output, produce the outputs that persona would produce, basically what we're telling it is, go and act like that persona and do what they would do. Now this seems kind of wild and out there. How is this going to actually work? What can it really do? Well, let me give you an example. My wife is a speech language pathologist. She works for the school system and she tests kids typically three or four before they go to kindergarten to determine if they need special educational supports. Now this is a persona that I can fact check. And so, but I, at the same time I don't know anything about it. So I go and I say act as a speech language pathologist. I'm going to tell you what a three-year-old said, and you'll write an assessment for me. The child said, "I meed way woy." And I tried to think about what my son sounded like when he was three and try to capture that in words. My wife promptly told me that this isn't exactly how they sound typically at that age, but bear with me. Now, what does ChatGPT say? In response to this, it says, "Assessment. Based on the provided speech sample, it appears that the child may be experiencing some phonological and articulation errors which are common in children around this age. Consonant errors. It seems that the child is having difficulty with the production of some consonant sounds, specifically the /n/ and /l/ sounds. The child said meed instead of need and woy instead of toy, assuming the intended words were need and toy. This indicates the child may be experiencing difficulty with the production and differentiation of these consonant sounds. Syllable structure, the child's production of the word way may indicate some difficulty with the correct syllable structure. It is possible the child intended to say play but produced way instead, which suggests a substitution of the initial consonant cluster /pl/ with a single consonant /w/. This could be an example of a simplification process called cluster reduction." That's wild. Notice what I didn't ask it for, I didn't ask it for phonological errors or articulation errors or syllable structure or consonant cluster reduction. 'cause I wouldn't even known how to ask for those things. So is doing and allowing us to access computing in a completely different way. Normally if I had to program that, I'd have to go and tell it in explicit detail every single thing it needs to do and exactly how. But in this case, I'm just telling it who to act like or what organization to act like or what department or inanimate object to act like. And then it's going and reasoning and providing outputs that look like they came from that. Now I fact checked this with my wife and also with some other speech therapists and the feedback I got was, "Hey look, we're not going to diagnose a child based on one speech sample, but what it's saying is accurate relative to that speech sample you gave it." That's wild that it can go in reason at that level of capability simply by saying act as some persona. These patterns, these prompt patterns are building blocks that you can teach people in your organization to help them go and innovate. They can then take these patterns and adapt them and use them to be able to do things that are really powerful, like thinking about a particular issue from a different perspective. Act as a chief information security officer and tell me why I shouldn't do what I'm about to do. And it'll probably give you some insightful feedback on why you maybe shouldn't click that link in the phishing email. But it's a really transformative new way of computing that we really begin have to begin teaching people. We have to teach the workforce and we have to do it in a structured way that's not just look at a thousand different prompts people came up with, but instead we start giving them building blocks like the beginning of a formal letter should look like this. We can teach them prompt patterns like the persona pattern that they can then take off and apply, take and imply and all of their individual disciplines and departments. And they can lead the innovation by adapting the pattern to their context and where they're working.

Contents