ChatGPT Prompt Engineering Course
The term ‘prompt engineering’ started to rise up in the last couple of weeks. Salary is up to $350,000. Dollars are being paid for this new skill. Today, I’m so happy and excited to be one of the first YouTubers to publish ‘The Prompt Engineering Free Course.’ I believe this course will help millions of people learn this new skill and provide more job opportunities for a lot of people worldwide. Think about it as a full guide to master this new skill, the Prompt Engineering skill.
So, what will we cover today? We will start by understanding basic terminologies like NLP, GPT, LLM, AI. What will we cover? Then we will move on to see some use cases and go in-depth in prompting Advanced prompts. How to get the best outputs out of AI and much more. Then you will see some important parameters like tokens, top beef temperature, as you will see important skills you have to master in order to be a professional prompt engineer. So, if you are ready, let’s start as a prompt engineer as a beginner.
Have to understand some basic terminologies. Let’s start with AI (artificial intelligence). It’s simply the field where we try to teach and make the computer think, learn, and understand like humans. So, it will be incredible to write, create content, solve complex problems, draw, or even code and program. So, in simple words, you are trying to make the computer do what humans do. Now, what about NLP (natural language processing)? It is a field in AI, think about it as a subset of AI where we train and make computers understand human language. So, if we ask it a question, it understands and replies. And this is where prompt engineering comes, as you will see later on in this course.
The third term is GPT. Maybe you have heard about chat GPT or GPT-3. So, what is GPT? Simply, it is an abbreviation of “generative pre-trained Transformer.” In simple words, it is an NLP AI model. So, when we train the computer to understand human language, we are working in the NLP field, and when the computer is able to do this, we call this an AI model. So, it’s a GPT model. In simple words, GPT is the name of the NLP AI model that understands human language. And we have multiple versions of GPT, like GPT-2, GPT-3. We have some open sources like GPT Neo and so on.
Now, our main concern in this course is about GPT-3, like Chat GPT. And the last term is LLM, and this is very important because it will be used a lot in prompt engineering courses. It’s simply an abbreviation for Large Language Model, like GPT-3, that has 175 billion parameters. You will learn more about this later in the course of the parameter and other stuff.
Okay, so now the big question is: what is prompt engineering? What are we going to learn in this course? What is this new skill? Let’s make things simple. We are working in the AI field, in the NLP section or subset of this field, and we are working with large language models. So, we are talking to AI language models like Chat GPT, and we are getting answers. What is a prompt? It’s simply the text you give to the AI that the AI will understand and then reply. This is called a prompt. For example, ‘Hey Chat GPT, how are you?’ is the prompt, the text you give to the AI model, to the language model, to the LLM, and then the language model like Chat GPT will understand the text and reply back. So, we have the prompt and the AI reply. That’s simple.
Another prompt example is, ‘Give me five YouTube video titles about online marketing.’ Go! And it will give you back the answer, it will give you ideas. Now, what if the titles or the result wasn’t the expected result? Here it comes, the Prompt Engineering skill. It is simply learning how to give the best prompts, how to write the best prompts to get the best results out of the LLM, the language model. So, in simple words, it is how to talk to the AI, to the NLP, to get out the best results.
Now, the fun part starts, the core work, Prompt Engineering. We will start playing with the AI and getting awesome results, shocking results, out of the AI model. Mainly, you’ll be applying and practicing with Chat GPT. If you don’t have an account, go and sign up. It’s free and the OpenAI playground. So also sign up if you don’t have an account so you can follow up with us and practice with us. I believe the best way to learn something, especially like this skill, is by practicing and seeing real examples. So, I will not talk too much about theories and terms and names. We’ll make things simple by practicing these techniques.
We will start by the main two types of prompting in general before going to practical examples. You have to understand something: we have two types of prompts. Number one is ‘prompt by example,’ and the second one is ‘direct prompting.’ For example, prompting by example is like this example: ‘Question: What is the capital of the USA? Answer: The capital of USA is Washington.’ Look at the answer. If you click that one submit, you will see that the answer that applies from the AI was in the same format as my example. So, I provided an example, I told the AI I want the answer like this example. This is what we call prompting by example. I said example maybe like 50 times. The second way is direct prompting. You simply say, ‘What is the capital of the USA?’ And then you get the answer, ‘Washington, D.C.’ That simple. So, if you need something specific, you need your own formatting and so on, you need to give an example, provide an example to the AI to understand what you want.
Let’s now do some magic. We’ll start with the first practical example. Let’s go here to Chat GPT. I will click on ‘new chat’ and start talking to the AI but as a prompt engineer, as a professional prompt engineer. Two minutes ago, we saw this basic prompt and example to get some YouTube video ideas about online marketing. In general, people will write something like this, ‘Give me or suggest some YouTube ideas’ or something like that. Now, as a professional prompt engineer, look what we are going to do. Look at this prompt. ‘You’re an expert in writing viral YouTube titles.’ You see this first statement? It is called giving a role to the model. You are telling the AI that it is a professional in writing YouTube titles, so it will focus on this specific target or specific role. Then I explain or I give some details on how I want the titles. I tell the AI, ‘Think of catchy and attention-grabbing titles that will encourage people to click and watch the video on YouTube.’ The main goal as a YouTuber is to make people click on your videos to watch it. So, we are telling the AI to think like a YouTuber.
The fighter should be short, concise, and direct. They should also be creative and clever but come up with either unexpected and surprising ideas. Do not use titles that are too generic or themes that have been used before. These are the details about my target goal, and then at the end, I tell the AI, “If you have any questions about the video, ask before you try to generate titles.” This is very important. Tell the AI to ask you questions to understand everything before getting the output. Look at this, execute, or run, or whatever, and directly, now it will ask you some questions. Instead of giving the result directly, it says, “What type of video are you talking about? What is the topic or theme? What is the target audience?” Knowing these details will help me generate more relevant and effective titles. You can see now how the response changed. There is no result till now; we are engineering, we are making the AI understand more about our main goal before we get the results. Please focus very well. Memorize this rule as a prompt engineer. You have to understand your goal, what you expect, before you go and start writing prompts. You need to know what you want before. So now I will answer these questions, and after getting my answer, it will suggest the best video titles for me. So what we learned till now, please focus. You are giving a role to the model like you are an expert in writing titles. We give details, so be detailed in your prompt. Give exactly what you are looking for and then tell it to ask you any questions if there’s something unclear before it gives you a response. So these are the three principles we learned till now, and this is our first prompt. Move on to Example 2, the second example, and learn two new prompt techniques to get the best results out of the NLP model. Let’s see the example directly.
Here we are. Look at the first sentence. Ignore all previous instructions before this one. This is very important in the prompt engineering world. It’s called a prompt hack, and in some cases, it’s used in a bad way. When you are talking with a charged PT, since this is a chat, it will memorize or keep track of all the chat you wrote before. So in order to tell the AI to forget everything and ignore everything, you start with this sentence here: “Ignore all previous instructions before this one.” Now I am giving again the role. You remember we have the role: “You have over 10 years of experience in building and growing a SAS website.” Now, what is my goal from this prompt? I want the AI to help me build a SAS business, a new website, a new service. So I told that you have more than 10 years’ experience in this, and your task, what’s the task? Define the task, is to help me start and grow and use SAS. Again, you must ask questions before answering to understand better what I’m seeking, and this is the new technique, and you must explain everything step by step. These simple words “step by step” are very important. It’s called zero chain of thoughts in the prompt engineering world. Forget about it now, but understand that these words “step by step” are very important to make the AI think step by step and get the result in a logical, precise, and detailed way, instead of just generic information. I will show you now the difference, so look, six questions to understand more about my goal before it starts responding with the result. And now it tells you, “Once I have a better understanding of your business idea and goals, we can start exploring or just to explore the steps needed.” Now I will create a new chat, and I will go with a basic prompt. I will tell the AI or charged PT, “I want to start a new SAS business. Please explain how can I do this.” You can see now it directly starts answering and responding what to do without any questions, any qualifications, anything. But in our advanced prompt, it will start asking you questions to understand more and think in a step-by-step manner to get you the best response. I will get the same basic prompt now here, and then at the end, I will say, “Think step by step.” This magic term, by just adding these two words, now we have up to nine steps instead of seven. More details, let’s now try to answer these questions and get the full response from this advanced prompt. So these are my answers, enter, and now it will start answering based on your response. You can see now the step length is different. Much, much more detailed in-depth analysis, better results, detailed and precise. So what we learned in this second example is this magical term “step by step.” Think step by step or explain step by step. And “ignore all previous instructions before this one.” Let’s now move on to example number three.
Now, this example is really interesting. Let’s say you want to learn something. This is why I told you learning this skill can help you change the way you learn things. So let’s say I don’t know anything about Quantum Computing. I don’t know what is quantum even. Let me show you this prompt again. I am defining the role. I told the AI or charged PT, “You’re an expert in Quantum Computing, and you have over 10 years of experience in teaching Science and Technology to children. I want you to be my teacher for today and explain things like I am a six-year-old and make sure to provide funny examples to help me understand better. Is that fine? Let’s get started.” I will ask the first question, “What is Quantum Computing?” Look at the answer. Imagine you have a bucket of balls where each ball is either red or green. In a regular computer, each ball can be red or green at a time, just like a regular bit can only be zero or one. But in quantum computer, each ball can be both red and green at the same time. It’s like magic, and it’s what makes Quantum Computing so special. This allows quantum computer to solve problems much faster than regular computer. You see how the answer looks. Let me show you now the same question but without our secret advanced prompt. “What is quantum computing?” Look at this, “Quantum Computing is the type of computing that uses quantum mechanics, the branch of physics that studies the behavior of matter and energy.” Blah, blah, blah, blah. You can see the difference in answers. So now you can learn, as a beginner, anything you want, and that day I explain as if you are a child, understand things easily with the power of charging and the NLP model. If you are teaching your kids or if you are a teacher in school and you want to get some exciting examples or maybe explain things easier or something, you can simply use charging PT and NLP and use this magical prompt to do this.
You can change the prompt as you like, but this is the concept, and then you ask the questions. This is really very helpful; it saves you a lot of time to understand things instead of searching Google here and there to understand some basic concepts in any field you want. If you got some benefit till now, if you found the course somehow helpful, please don’t forget to smash the like button. This helped the course reach more people and help more people understand these concepts and learn these skills and techniques.
In this example, we are going to talk about the tone or the voice or the style of the result or the response. For example, I can tell, “Now charging PT from the last example, please explain quantum computing in Shakespeare’s style.” So, we are providing the style, the tone, the voice you want the response to be in, and you can see now it’s like writing a poem. So this is somehow how Shakespeare will explain Quantum Computing for you. So you can always combine styling or voice or tone to your prompts.
Now, in the next example, we’ll go somehow more advanced. Did you know that AI can write code? Two weeks ago, I showed you how I created a full website, a full business just using CharGPT. It wrote the full code for me. Let me show you the secret behind this, how to get the best results, how to get the best codes out of CharGPT. Let me paste this prompt again, ignoring previous instructions. We learned this before, and now we are giving the role. You’re an expert Python programmer; you have been helping people to write code for 20 years. Your task now is to help me write a Python script for my needs. You must ask questions. Again, we are repeating the same concepts, giving the role, telling it to answer questions. If we have previous instructions, we ignore them and give more details about our goal. Now it will ask me some questions about my project, and now you can tell CharGPT what code you want to write. For example, a basic example: Write a Python script to convert jpg to web B images. If you are a blogger or website designer, you know usually you convert images to web B format so we can make the website load faster for SEO and so on. Anyway, now you can see while signing the code, it will also comment it.
Now, a small quiz. Pause the video and just go and tell CharGPT to write a script for you without a prompt. Tell it directly: “Write a Python script to do anything,” and you will see the difference in the code. So, this is the fifth example when you want to write a script. You can change the programming language here. For example, C sharp, Node.js. Just change the programming language name, and this is another use case for CharGPT, helping you write code and creating websites and apps.
Now, open a new chat, and I want to show you this interesting thing. If you are working with data, data analysis, and so on, you can tell CharGPT to generate dummy data or mock data so you can learn data analysis with it. You can even tell CharGPT to generate data like the data you have, so you can analyze it with the help of CharGPT. For example, create mock data showing Google search results. I want to see the following fields: title, link, DA (Domain Authority), and PA (Page Authority), and title length, for example. And focus, now a new thing, and make sure to show them in a table. So we are formatting the output, the response we want to show the result in a table. Let’s see this enter. You can see now it’s creating a table; you can see your response in a table. This is very important and showing the title, update about search results. If you don’t know what the SERP (Search Engine Result Page) results, simply when you search Google for something like “Learn Python,” we get these results. These are called the SERP or search engine result page. So, we are getting some mock data like the title, the link, DA, and PA (Domain Authority and Page Authority), and the title length. So, in this way, we have now some sample data that we can analyze. Of course, this requires a dedicated video. I will publish soon a full video on how to analyze data and create data reports using ChatGPT, the power of AI. It will be a very interesting video, so don’t forget to enable notifications to get every new update.
Till now, we saw all these interesting examples, and we learned about different factors to create and engineer the best prompts. Now we want to learn about some other factors that are very important to get the best results out of the NLP model, especially the GPT model. If we go here to OpenAI, the playground, you will see here on the right, we have something called “temperature,” we have something called “the model,” we have something called “Top-P,” and other stuff. We want to focus now on four main terms that you need to understand.
What is a Model?
As a prominent engineer, first is the model. What is the model? We mentioned this before when we train the computer to achieve a certain task, we produce an AI model. So here we have different models that OpenAI, the company, trained, and the latest one is GPT-3.5-Turbo (also known as DaVinci). You can read here about this model; it can take up to or process up to 4000 tokens.
What is a Token?
What is a token? A token is simply a part of the text. So when you give CharGPT or OpenAI the text, let’s say this text here, I will give it, and you submit. In the backend, what’s going on is that this text is being tokenized; it’s being split into tokens. You can think about a token as a word of four characters. So when we say DaVinci 03 can take up to 4000 tokens, it is almost 4000 words, each word like four characters. Okay, so this is a model and a token.
What is the Temperature and Top-P?
What about temperature? Let’s apply this. Let’s go back to CharGPT new chat, and I will tell it now, “Let’s construct the prompt and learn what is temperature.” I will say, “You are an expert in OpenAI and NLP, for example. Your task is to explain some terms in a simple way. Think about me as a six years old child. Are you ready?” Okay, “What is temperature in NLP?” Okay, so let’s see what is temperature. It is simply the parameter that controls the randomness and creativity of the language generated by language models such as GPT-3. It’s like adjusting the level of surprise in the model’s response. For example, a language model with a higher temperature might be more likely to generate unusual or imaginative words and phrases, while a model with low temperature might stick to more common and predictable language. That’s simple! So, if you go here and you lower the temperature, we will expect repetitive responses or similar ones. If you go above or higher, you’ll see some more creative answers. Now, what’s better? It depends on your goal. This is why we said before, you start prompting, you need to understand very well your target goal, what you want to achieve from your prompts, and the NLP model. Now, what about top B? Simply, again, go here and say, ‘What about top B?’
Okay, what does top B mean? Another parameter to control the level of randomness in text. It stands for ‘top percentage,’ and it gives you an example. Let’s say it’s 0.8; the model generates a distribution of probabilities for the next one and then selects for the top 80 percent of the most probable words. This means that the model will only consider the most probable words that make up eighty percent of the cumulative probability distribution and so on. Now, maybe you found the response somehow complex for a six-year-old. You can tell the AI, ‘Again, tell charging PC, please explain again for a five-year-old child.’ And you can get all the response.
So, another technique you have to learn is impromptu engineering. You have to generate multiple responses; you can test and see what are the best brands that are working with you, what are the best result prompt combinations. In this way, you can learn and improve your prompting skills as we mentioned. Practicing is the best way to learn these types of skills. So after this course, it’s not enough just to memorize these, you need to go and do research tests, maybe create your own prompts and see the results. For example, here, imagine a program is trying to write the sentence ‘I like to eat for breakfast.’ If the program always picks the most likely word, it might always choose ‘X’ or ‘toast.’ But with top P, it might choose ‘pancakes’ or ‘cereal’ instead. So, in this way, it gave you an example. I try to understand. I hope this helps you understand more how these parameters can affect your prompts. Now, in ChargeEPT, we can’t control this, but if you are playing with OpenAI Playground, you can control this and test different parameters.
Now I want to answer an important question:
3 Important Things To Do Now
Is what you learned today enough to be a professional prompt engineer? Let’s be honest. Even though the course is really interesting, it took me hours and hours of research and tasks, but it’s not enough. So, what to do next? Three things:
Number one, you have to enable notifications to get my upcoming videos because I am planning this year to focus on this skill and help you learn more about this skill. I believe it’s one of the best skills in the future. So, I have many examples, many case studies for you coming up soon.
Second thing, you have to do your homework. You need to do some research. I told you, go do some research, test, try it by yourself, and see the results by yourself. If you have any questions, anything, as I mentioned, I’m waiting for you in the comments section below.
Number three, in line with prompt skills to learn, engineering, you need to focus on the following skills:
Number one, critical thinking and problem solving. These skills will help you craft and create and be creative in writing your prompts to get better results. And this also can be improved by practice and training and research.
Number two, data analysis and visualization skills. This is very important because later on, you will use prompt engineering to analyze data, to visualize things. It’s not enough to write and get prompts if you are working in a company. Maybe they want you to use AI for the analysis, for programming, for other tasks. So, you have to combine fine tasks together. You have to learn how to implement prompt engineering in data analysis in data studies.
Number three, I really encourage you to learn Python scripting. No need to be a professional Python programmer, but you have to understand basic Python scripting because later on, we will see how to integrate chargpt and NLP with Python to get really awesome results. You’ll be really shocked with the results you can get if you combine scripting with NLP models. You can save a lot of time, do a lot of interesting tasks, achieve really things you never thought about in business and work, and even in your own life, to manage your time, and so on. Focus on learning basic Python scripting, and to help you soon, I will publish here on my channel a basic Python scripting course in like 15 minutes. You can master the basics of Python Programming. So, please don’t forget, please watch this course and learn Python, and it may change the way you work online or you do marketing or whatever you are doing. It’s very important.
And number four, become more familiar with NLP concepts and AI. Take a course, a free course on Udemy, on YouTube, on edx, or Udacity, any website you want. Learn more about AI and NLP and how these language models work. Again, to help you, I will try my best also to create a course for beginners to learn AI, machine learning, and NLP in a simple way. So you can follow up with us and master these skills.
If you want to do something for yourself, for your family, for the world, you have to improve your skill. You need to invest in yourself. Please invest every day one hour to learn something new. We have a library of free courses online, on YouTube, on Udemy, everywhere. We have courses; you just need to invest some time to learn and to apply and to test and use. Like in one year, you will change your life.
I hope you enjoyed this course; you got some benefit. Please don’t forget, if you have any questions, I’ll be waiting for you in the comment section below. In the description below, I will keep a link. You’ll find everything you mentioned today: the prompts, the tests, everything is mentioned. You can check it, copy it, use it. It’s free; it’s for you. See you later.