From the course: OpenAI ChatGPT: Creating Custom GPTs
Creating a GPT from scratch - ChatGPT Tutorial
From the course: OpenAI ChatGPT: Creating Custom GPTs
Creating a GPT from scratch
- All right, let's create a GPT from scratch. To do that, you go to ChatGPT, go to Explore, and then select Create a GPT. Here you have two options. You can either use a conversational interface to talk to the GPT builder and have it build the GPT out for you, or you can go to configure it manually by giving it a name, adding a photo, giving you a description, and putting in the prompt yourself. But you don't have to choose here. You can start in the create column and then switch over to configure to refine your information, then go back to create and continue creating. These two features work together to help you create your GPT. So in my example, I want to create a GPT that helps me write better code for web development projects, and importantly sources information from trusted sources on the web to do so. First, I'll give it some basic instructions. So it's asking me, what would you like to make? And I'll say web development assistant that gives me tips on how to build standards based accessible front and web projects. When I send off this request, the GPT builder will figure out what I'm trying to do and start building out not only the GPT, but also the main prompt for the GPT. Once it's done, its initial work, it asks me, what do you want to call this GPT and it gives me a suggestion. Web Dev Wizard. I can choose to use that by just saying yes or I can give it another name so I'll just say yes. And you'll notice when I say yes, it'll apply this name to the GPT. Once the name is created, it'll also start generating an automatic profile picture for me. And for this, it uses DALL-E three. When the generation is complete, it asks me, is this a good image or do you want me to do another one? Do you want to make any changes or do you want to try something else? So here I can either accept the image as is, or I can ask it to make changes to it. So I'll just say, use this one. Now the system starts asking me questions about how the GPT should behave, and here you can be as descriptive as you want. Now keep in mind this is a chat bot and you're really talking to ChatGPT here, so it'll be quite wordy and you can actually like intercept it and just tell it what you want. You don't need to wait for it to type out the entire instruction because quite honestly, it talks too much and it can be really annoying. But I'll give it some instructions here to just give it a general direction of where I want to go. The core piece of this particular bot is I always wanted to consult MDN web docs for further reading and provide relevant links to the examples. So this instruction needs to be very clearly stated in the instructions to the GPT. Now, keep in mind you're working with a large language model here, not an actual person. So even if you're giving it super strict instructions here, it will not always follow those instructions exactly as I'm sure you'll see when we run some examples on this. Okay, now it says, now let's think about Web Dev Wizard should interact with its users. How do you envision a tone style of communication? Should it be strictly professional and straightforward or more friendly and casual, especially when explaining complex concepts? I'll say professional, curt, to the point as just because I like documentation that just gets to the point right away. Then the GPT builder goes into two questions that seem to be programmed into the system. The first one is, is there anything specific you'd like this GPT to avoid discussing or doing? Like is there a certain topic you don't want to touch on or is there a certain type of advice you don't want? So this is a way of constraining the bot so that the user can't like help the bot walk out across the fence and do other things. So I'll say stick to front and Web Dev topics only, and the system will try to confine itself to those topics. Again, it's a large language model so it won't always succeed, but at least this gives some level of confinement of the subject matter. And the final question it usually asks is some form of how do you want to respond when the user isn't giving enough information? Or in this case, should it address users in a specific way or adjust its responses based on the user's skill level in web development? So I'll say based on the skill. Alright, so now I'll let the system finish that instruction and once it's done, we can test it right in this interface to see if it's creating the output we're looking for. The initial build process is now complete and we can start testing it. So here in the preview, you see the Web Dev Wizard has four starter questions we can choose from how do I make a website more accessible? What are the most best practices for responsive design and so on. So I'm going to ask you something very specific. How do I make CSS gradient? Now based on my instructions, the system should now go and not only give me a code example, but also reference documentation from MDN. So let's see if it does that and look at that. Here we have documentation directly from MDN, which means the system not only answered my question to my specifications, but also went online and found relevant information from the source I specified. Now that the initial state is complete, we can go look at the configure tab to see what actually happened. We got a profile picture, we got a name. You can edit that name to anything you want. A short description. This is the description that appears in the initial display. Then we have the instruction. So this is the initial prompt here. You can go in and edit the prompt in any way you want, add anything you want in addition, and basically do whatever you want. This is prompt engineering. This is where you do it. Then below we have a series of conversations starters. So those are the starters that you saw when we started working with the bot. And here you can edit them or change them or add in new ones if you want to. These again are just strings of texts. There's no actual functionality associated with them. So you can really write whatever you want. This is just to get users started using the GPT. And then finally below here you have some additional features we'll talk about more later, including uploading knowledge, capabilities and actions. So in this case, because this bot is doing searches on the web, I'm going to activate just web browsing. So I'll go in here and turn off DALL-E image generation and quote interpreter. When I do that, you'll notice the preview changes because I'm changing the bot and I can now safely just save and exit. Now, when I choose to save, I have three options. I can save this GPT only for me, meaning I'm the only one who can use it. I'm the only one who sees it. I can save it for only people with a link, meaning you can send the link to others and they'll be able to use it or I can save it publicly. And if I do, this GPT may appear in the GPT store or marketplace, which will be coming soon. So if you want to just share your GPT with the world and have other people discover it organically, you choose this option. For me, I'll select only me and click confirm. This saves my GPT and I go back to ChatGPT with the GPT activated in the browser. So now I can play around with this GPT, and if I go back to explore, you'll see it sits right here, Web Dev Wizard. You can also see that it says that it's locked, so only I can use it. And if I want to, I can go and delete it right from this interface. I can click edit to go back into the editing interface where I can keep chatting with it and give it new instructions to alter its behavior. I can go in and configure it more specifically if I want to, and I can also delete it from right within here. That's the entire process of creating a GPT. So if you're just looking to create a customized interface of some kind, inside ChatGPT the process I just walked you through is all you have to do.