AI Prompt Engineering Pro Learn Build and Optimize AI Prompts | Stephen Koel Soren | Skillshare

Playback Speed


1.0x


  • 0.5x
  • 0.75x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 1.75x
  • 2x

AI Prompt Engineering Pro Learn Build and Optimize AI Prompts

teacher avatar Stephen Koel Soren, AI Engineer and Automation Expert

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

    • 1.

      Introduction

      3:00

    • 2.

      Prompt Anatomy

      13:10

    • 3.

      Instructions Context Examples Output Formatting

      21:42

    • 4.

      Zero Shot vs Few Shot

      8:27

    • 5.

      Chain of Thought Prompting

      7:49

    • 6.

      Tree of Thoughts Prompting

      19:18

    • 7.

      Role Prompting

      9:27

    • 8.

      Prompt Chaining

      8:20

    • 9.

      Evaluation & Iteration

      8:19

    • 10.

      Class Project - Identify Role Prompt

      6:33

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

6

Students

--

Projects

About This Class

Welcome to Prompt Engineering Pro, a comprehensive class designed to take you from beginner to advanced level in the art and science of communicating effectively with Artificial Intelligence. Whether you are a student, professional, entrepreneur, educator, content creator, marketer, developer, or business leader, this class will help you unlock the full potential of modern AI tools such as ChatGPT, Gemini, Claude, Co-pilot and other Large Language Models (LLMs). So this is a class become expert how you will write prompt for AI and how its works.

This class is ideal for anyone who wants to get more accurate, reliable, and useful responses from AI systems. This is a beginner to advanced level class so no prior experience with prompt engineering is required. The class starts with foundational concepts and gradually progresses to advanced prompting techniques used by AI professionals and power users.

What You Will Learn:

  1. Prompt Anatomy
  2. Zero-Shot vs Few-Shot Prompting
  3. Chain-of-Thought Prompting
  4. Tree-of-Thoughts Prompting
  5. Role Prompting
  6. Prompt Chaining
  7. Evaluation & Iteration

After Completing This Class, You Will Be Able To

  • Write clear, structured, and effective prompts.
  • Generate higher-quality AI responses consistently.
  • Use advanced prompting techniques for complex tasks.
  • Apply AI effectively in business, education, marketing, and content creation.
  • Design prompt workflows that automate and streamline work processes.
  • Evaluate and optimize prompts for better performance.
  • Create professional AI-assisted content faster and more efficiently.

This class includes a hands-on Class Project that allows you to apply everything you learn throughout the class. You will design, test, refine, and present your own prompt engineering solution using the techniques covered in the lessons. The project is designed to help you gain practical experience and build confidence in creating effective prompts for real-world scenarios.

Supporting Resources

To support your learning journey you will have Downloadable resource files. These resources will help reinforce concepts, accelerate learning, and provide practical tools you can continue using after the class is complete.

We look forward to helping you master Prompt Engineering and unlock the full potential of Artificial Intelligence.

Meet Your Teacher

Teacher Profile Image

Stephen Koel Soren

AI Engineer and Automation Expert

Teacher

Stephen Koel Soren is an experienced AI Engineer, Digital Educator, and Instructor specializing in Artificial Intelligence, Automation, and Creative Technologies. He is passionate about simplifying complex AI concepts and turning them into practical, real-world skills that beginners and professionals can apply with confidence.

With a strong focus on hands-on, project-based learning, Stephen teaches students how to use AI tools, automation workflows, and design technologies to solve real problem

See full profile

Level: All Levels

Class Ratings

Expectations Met?
    Exceeded!
  • 0%
  • Yes
  • 0%
  • Somewhat
  • 0%
  • Not really
  • 0%

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Introduction: Hello, everyone. Welcome to Prompt Engineering Pro class. And this is a comprehensive class designed to take you from beginner to advanced level in the art of science of communication effectively with artificial intelligence or AI. So whether if you are a student, professional, entrepreneur, educator, content creator, marketer, developer or business leader, this class will help you to unlock the full potential of modern AI tools such as ChatGPT, Claude, Gemini Co-pilot, and other large language models. So this is the class. From here, you will be expert at how to write prompt for AI and how this prompt algorithm is working. So where is this class work? This class is ideal for anyone who want to get more accurate, reliable, and useful response from AI system. And this class is designed from beginner to advance level. So if you have zero experience, then you don't have to worry about because this class start with the foundational concept and gradually process to advance prompting technique used by EI professional and power users. So let's take a look what you will learn from this class. From this class, you will learn about the prompt anatomy, Zero-Shot vs Few-Shot Prompting, chain of thought prompting, tree of thought prompting, role prompting, prompt chaining, evolution, and iteration. And let's take a look after completing this class, what you will be able you will be able to write clear structured and effective prompts, generate higher quality AI response consistently, use advance prompting technique for complex task, apply AI effectively in business education, marketing and content creation, design prompt workflow that automate and streamline work process, evaluate and optimize prompt for better performance and create professional AI assisted content for faster and more efficient. Okay. And this is a project based class. So you will have class project, and this class project will help you to practice while you're learning. And you will have all the supporting resource for this class. And this class already have the JonboRsource file, and it will help you for making easier the class for learning. So what you are waiting for, we're looking forward to learn together about Prompt Engineering, and it will help you unlock the full potential of artificial intelligence prompting. 2. Prompt Anatomy: Hello, everyone. We'll come to the very first lesson of learning, prompt engineering pro class. In this lesson, we're going to learn about the prompt anatomy. At first, you need to know what the prompt is and then you will be able to understand about the prompt anatomy. So just as a sentence has a subject, verb and object, a highly effective prompt is built from specific structural component. So understanding this anatomy is difference between getting generic unhelpful AI response and precise expert level of outputs. So if you're already familiar with Jamini ChatGPT, Cloud and all other AI platform, you know how to use these things, right? And if you are totally unknown about the AI, then you don't have to worry about we're going to learn from the very beginning. So if you have the basic knowledge about the giving command in JATGPT or in Gemini, or in Cloud or in copilot, then what you are writing on the box, that's called the Prompt. But you can type a prompt and you will get the result from the AI engine. But maximum time, you will not get the exact things what you're looking for. So if you need any precise output, in that case, you need to know the prompt engineering, and this is what we're going to learn in this class. So the prompt anatomy have total four pillar, right? So if you consider about the prompt anatomy, you have to focus on instructions, context, examples, and output format. So the four pillar are the core feature of prom anatomy. So now let's take a look practically. And you can see in my screen, I opened a couple of tab in my browser, and all the tab is about AI website or AI platform. So at first, I'm going to show you the most popular and trending AI platform in my screen, that's called ChatGPT. And it's from OpenAI. And secondly, I'm going to show you about the Gemini is one of the most popular as well as ChatGPT. And this Gemini is an AI platform from Google. Then you can take a look this is called the Co-pilot, and this co pilot is a product of Microsoft, and then take a look about the clot. This is from the anthropic, and this cloud is widely using for programming. And you can see another most popular EI platform from G Rock, and this T Rock is an asset of Elon Mask, and this website nowadays is widely using for image and video generation. And now I'm going to show you about a Chinese EI platform that called Deep Sig. This is also working very fine. And if you compare with others, it's have very cheap in price. And for the research, this perplexity is using nowadays widely, right? So these are the most popular EI platform right now. But if you consider about the uses, they all have almost similar type of uses, but they also have some different pattern for providing you the output. So in Chan GPT, you can write, you can ask anything for the knowledge, as well as now, you can create some images. So for creating image or for asking anything or for generating an article for writing, you can use this ChatGPT, right? And for Gemini, they do have almost similar function as like ChatGPT, and ChatGPT nowadays have the programming part that's called a codex. So with ChatGPT, you can write, you can generate the image and you can write the code as well. And as same this Gemini, they do have same things. But Gemini, they have some specific or advanced feature like for creating the videos. In that case, you have to use the Gemini studio. But with this basic search option or with this basic Gemini landing page, you will be able to generate the article, generate the or you can ask any kind of question. You can get the answers as well as you will be able to create image, create music, create videos, and many more. So as Gemini and ChatGPT, they have all the similar feature, but if you consider presently, ChatGPT is not creating the videos, but Gemini do. But Gemini also now capable for coding as well. Now, let's focus on Co-pilot. So this is the product of Microsoft. Co-pilot have very minimal and clean outputs. If you consider the output with the ChatGPT and GMNE, Jin can generate a long article with a weighted version as well as ChatGPT. They are providing the widely and elaborately detailed explanation. But if you consider the Co-pilot, Co-pilot is one of the good AI platform for providing or getting the minimal and clean output. They will basically provide you the short answers with the perfect information, right? And one more thing I want to tell you that this co pilot is also available for the image generation as well as the coding. So in that case, you have to consider the Github Co-pilot, if you consider, for the better output, in that case, you have to use the Github Co-pilot for the coding platform. Now let's focus on the cloud. And as I was saying that cloud is the product of anthropic. Nowadays, Claude is widely using for coding purpose, actually, and they do have the latest version, and they're upgrading always for the smoothing the coding experience. Clod is basically widely using for coding as well as the clot is good for writing, and nowadays, Cloud also implemented the design part. So if you need to design a website, if you consider designing the front end, in that case, you will be able to use the clod as well as the back end. So ultimate web development or software development with the EIUx you will be able to use clod for the web development or any kind of application or SAS development. Right? Then let's focus that Joc. This is the product of Elon Musk, as I was saying, and this Elon Musk Grock is now widely using for social media actually. This rock also very good at answering and writing, but they're basically widely using for social media. This Grock is very good at generating the images as well as the videos. And the one things I want to tell you that nowadays image generation and video generation is not free with Grock. But if you are using the paid version, I'm going to show you later about the difference between the free and paid version and how the token system is working. I'm going to show you a little later. But with the paid version, you will be able to create nice rails, nice videos for social medias, as well as the nice images for any kind of users, right? Now let's consider about the Deep Sik. This is a Chinese AI platform, and if you consider between the pricing, this dip Sik provides a very cheap API cost, and they do have the good at writing, good at thinking. But for commercial uses, you can consider the Dip Sik for very cheap pricing. And finally the perplexity, this perplexity is very useful for research purpose. So if you were associate with some research or if you need some deep knowledge, in that case, you will be able to use perplexity, and it will get very good output for the research purpose, right? Now, let's take a look at the difference between free and paid version. So, let's consider about the ChatGPT Gemini and Claude. These three things, I'm going to show you for the difference between the free and paid version. So this ChatGPT, it's a free version. You can see this is the free version and you will have some limitation. But if you consider about the Gemini, you can see, I'm using in here this Gemini pro version. And this pro version is not for free. It's half a monthly subscription. And Gemini, they will have a one month free offer for trial for the pro version. And after end of the trial period, in that case, they will be able to use a you will not be able to use after getting paid. If you are satisfied with the trial version, then you can make the payment, and then you can take the subscription version for the month or for the years. But now let's take a look what the difference. So with free version, you will be able to use all the feature. Like, you can create image in here. You can create image in Gemini as well as ChatGPT. But with ChatGPT, you will be able to get very few output with the free version. You can get the T Biz version for along with a free version, but you will not be able to generate a couple of the bunch of image from the JatGBT with the free version, as well as Gemini two. So the free version have some limitation. Also, the paid version, they do have the limitation too. Now, let me show you the limitation of the paid version. So this is my free version of ChatGPT, and this is my paid version of Gemini. And in another browser, I have opened the cloud, and this cloud also a paid version. But if you take a look inside the settings, you will get the user's option inside the clot. Then what you are getting, you can see in here, I have some session limit, I have some weekly limit, and you can see here is the user's data Bag. Right? Yeah. So in Cloud, you can take they have some session limit. Like if you're using the paid version, then you won't be able to use paid all the time, or the paid version because they have some current session limit, and every session is about four to 5 hours. So every four to 5 hours, if you are using for the heavy uses, in that case, it will hit the limit. And once it will hit the limit, then you won't be able to use the current session. Then you have to wait for the reset of the session, then you will be able to use the next session. And after using the current session, they have the weekly limit. So if you are a heavy user, like you were doing you were developing some SAS, in that case, you have to use a heavy quad for the programming purpose, but they do have also a weekly limit. So you won't be able to use unlimited with the pro version. Therefore, you have to go for the higher subscription. So this is how the plan is using. As same as this Cloud version, this is my paid pro version, and this is my GME Pro version and this is my ChatGPT free version. So with the ChatGPT, you can create around four to five image at a time, then they will limit you the uses. Then you have to wait for around four to 5 hours or 6 hours. Sometimes it could take around 8 hours. Then you have to wait until the limit is reset it, right? So free version have very lower limit for uses. Then the pro version, they have the higher limit. And if you need more than the pro version, in that case, you have to go for the plus version, like Google they will have a plus version as well as this Claude, right? So free have lower uses and paid have the higher uses. And this is the difference between free and paid version. 3. Instructions Context Examples Output Formatting : Hello, everyone. Welcome back once again. In this lesson, we're going to learn about the instruction, context, example, and the output formatting about the prompt anatomy. So let's focus on instruction. So what is instruction for prompt? It will instruction that tell to the AI that what AI has to do. It's very simple, and this is the main task or rules. So you can see in my screen, I opened ChatGPT and Jamin E, so I'm using ChatGPT free version and Gemini version. So this two version will help you for understanding how free version is executing with the instruction as well as the paid version. So let's take a look the real example of instruction. So you are just going to tell to AI that what AI have to do. So I'm writing here, write a Facebook post about AI tools for student. I'm writing here. Okay, so I have written, write a Facebook post about AI for students. Actually, this is the instruction, and I've been hitting the enter button, and you can see ChatGPT is started generating the result and here is the result and you can see ChatGPT created a Facebook post. This is the very simple way for understanding the instruction. And if you want to learn about the more detail, in that case, you can write that write a Facebook post explaining five AI tools that student can use to save study time and use simple language and keep it engaging. This is just a simple instruction. But when you will put in more detailing for the instruction, then how it will look like. So take a look the output. Here is our output, and now I'm going to put a more detailing for the instruction. And therefore, I'm going to write here, write a Facebook post explaining five AI tools, students can use to save study time. And I want to write here for using the simple language and for keeping it engaging. That's why I'm going to write here, use simple language. And keep it engaging. Okay. So the first one is instruction, and now this one is also instruction. But in here, I have written some detailed instruction. This is this prompt is about creating the Facebook post, and in here, this is also about creating the Facebook post. But if you consider between two command or two instruction, this is just a simple instruction. And in here, I have written detailed instruction. So let's identify the difference between the symbol instruction and the detail instruction. In here, I have mentioned that five AI tool. But in here, I have not written about any number or any tools. And in here, I have written the five AI tools, okay? And for what they will use for saving their study time, in here, I have mentioned for saving the star times. So this is single prompt or single prompt instruction, and here is the detailed prompt instruction. So let me hit the entry button, and then we will get the result from ChatGPT. So you can see here here is the output for simple instruction, and in here, it's the detailed output. So you can see ChatGPT already given five tools name. So this is also a Facebook post, and this is also a Facebook post. I hope you got the idea how the instruction is working. Now let's focus on context. So what the context is, you have to understand that context give background information so the AI can understand the situation. So now let me tell you with context and without context. So as an example, without context, write about a freelancing. So I'm writing here, write about freelancing. And I' hit the intro button and here is the output. So you can see ChatGPT started generating the output for just freelancing. And now let's focus about the context. So this is this prompts without context. And with context, what I'm going to write, my audience is Bangladeshi University student age 18 to 25 who want online income opportunities but have little technical knowledge, right? So let me write here. Then you will understand about practically about the context, and I'm writing here my students or audience is Bangladeshi University students aged 18 to 25, who want online income, opportunity. But have little technical knowledge. Okay. Now let's focus about the two context. The first one, this is without context. And in second one, it's context. And now with this prompt, now, A I know who the audience is, skill level, situation, and the tone of direction. And context usually answer who, why, for whom, and what the situation. So this is how Context is working. Now let me hit the intro button. Then you will get the output about the prompt with context. Right? So you can see here is the output, and here is the output. This one is without context, and this one is with context. And you can see in here, the curuntry name is indicated and who are you can see, who are the targeted audience that university students. So ultimately, who the audience is, skill level, situation and tone of direction is already declared inside the result. So therefore, if you want to, if you want to get the proper output with the context, then you have to mention who the audience is, skill level, situation and tone of direction. Again, I'm telling you, context usually answers who, why, for whom and what the situation is. Okay, so we already covered two parts. The first one is instruction, and again, I'm repeating instruction, just tell the AI what to do. And in context, you have to declare who why, for whom and what the situation is. Okay, cool. Now, let's focus about the examples in prompt engineering. At first, you need to know what the example is. In prompt engineering, an example is a demonstration of how a task should be performed. Usually shown as an input output pair inside the prompt. Instead of only telling the AI what to do, we are going to show you how to do it in prompt, and this is called the example, and you have to keep in mind that why example matter. Example help the model to understand the task more precisely, follow a specific output format, match a desert to or writing style, reduce inconsistency or incorrect response. Now, let me show you practically how the example is working. At first, I want to I went to write some prompt without example. And already I already prepared some prompt for showing you because it will save time. And I will give you I will give you all the necessary prompt file along with these classes. So you just have to download it and then you can do practice along with me and you don't have to write again and again the prompt. Okay? So in my notepad, I have written a prompt, and this prompt is about without example. And what I have written here, summarize the following text in one sentence. Artificial intelligence is transforming industries by automating tasks and improving decision making, right? So this is actually without example, and I'm copying this prompt from this notepad and I'm pasting in here. And I'm hitting the Enter button. And this model describes the style and the structure on its own. Okay. So what we got the result, artificial intelligence is changing industries by automating work and helping people make better decisions. So what we have written, artificial intelligence is transforming industries by automating tasks and improving decision making. So this was our prompt, and this is our result. So if you take a look deeply in between prompt and output, there is nothing more changes, just few, right? So you can see artificial intelligence is transforming and instead of transforming here is written changing. And then it's written industries by automating task. And you can see here, industries by automating work. So instead of task, it's written work. And then it's written here, improving decision making. And in outputs written helping people for making better decisions. Not so many changes is here, because we did not apply the example. But when we will apply the example, then ChatGPT or AI will follow the input, and according our input, they will provide you the output. Now let's take a look with example, and therefore already I already written some prompt example in node pad, so I have to copy from the node pad. And this is with example. This prompt is with example. And that's why I'm going to copy from node pad and I'm pasting and I'm hitting them into a button. Okay, now take a look what we got the output. So as an example, we have written the example that text artificial intelligence is changing the way business operate. And the summary, AI is reshaping business operation through automation and smarter decision. So I already I already given to AI about examples, what the text will be and what will be the summary and what will look like. So this is what I already given him the input, and I told him what will be the output. So this is the input, and this is the output. And then I already given a new task to AI that this is my text and now give me the output as summary. And here is our result. So you can see according according to our instruction, the way we have given the example, the way we got the out So this is how the example is basically working. And the model is clearly helping us to understand about the output length, sentence structure, and the level of details, right? So I hope you got the idea how the example is working with the AI prompt. Now let's focus about the last word of prompt anatomic that is output formatting Prompt Engineering. So output formatting in prompt engineering, it means explicitly defining how the AI response should be structured, organized, and presented. So ultimately, you're not only telling the model the what to generate, but also how the final answer must look like this is what you are also telling, that's called output formatting. And do you know why the output formatting is important because it will help you use paragraph when you want to use bullet points. It will help you to mix explanation with the answer. It will help you to change structure across the response. So with the output formatting, you will be able to ensure consistency, readability, easy copy or paste or automation. And this is also the machine friendly output like JSON tables, list, et cetera. Now let's focus on practically how the output formatting is basically working. And you can see in my screen, I opened another tab in my browser, and in here, the common output formatting method is written. So I just told you earlier the common output formatting or the output formatting Prompt Engineering is included about the bullet point, number shaped, table format, fixed heading, character, and structured data. So you can see the example is given here. Explain the cloud computing output format. You can see the bullet point format is given here. And in second one in number shape, explain how to create a website output format. It's a number shape. Here is the number shape and here is the bullet point shape. Okay? Now, I hope you got the idea how the output formatting is working, but we want to apply the real prompt for including output formatting, and we want to write the real output formatting prompt for getting the actual output formatting. That's why, again, we're getting back to our main ChatGPT tab, and in here, I'm going to show you the real prompt example of output formatting. And therefore, I already added a prompt for output formatting and that prompt is added to our notepad. And you can see in my notepad, I have added another prompt, and this is the example of output formatting. So I'm going to copy the prompt from here and I'm going to paste it. Now, let's take a look how the things is working. So I have given a task, and the name of the task is summarize the following article. And here is the article, and you can see here is the article is given here, this article part. And in output format, I have mentioned title Max six word, three bullet point, each bullet point with max 15 words, no extra explanation. So this is my main key structure of output formatting. So I already declared in here that the title will be within six word, and there will be three bullet point and each bullet point will have maximum 15 word and no extra explanation. Okay, so this is the article, and we have to summarize these things with this output format. Now, you can click this SendPmpt option or you can hit the entro button from your keyboard. So I'm clicking here the SendPmpt button, and now ChatGPT will give you the output. Cool. So what we have written, we got our idea, and the task is about to summarize the article, and we got the idea in here. So you can see if you consider the output formatting with the comment or with the prompt and with the output. So entitled What I We Got entitled Maximum six Word. And in here, the title is within six word. And then what we have got three bullet points, and we got the three bullet point in here. And each bullet point maximum 15 word. And each here is the bullet point, and you can see it's not exceeded more than 15 words, and the words in between I mean, less than 15. Okay. And no extra explanation. And you can see no extra explanation is given in here. Now, I want to show you, I want to show you a little more about output formatting. Therefore, I want to make some changes, right? So in here, instead of these things, instead of 15 words, I want to write, each bullet point max 50 words. So instead of 15, I have written here 50 words, and instead of no extra explanation, I'm going to write detailed explanation, right? And I'm going to copy this entire prompt once again, and now I'm going to paste in here and I'm going to click the Sen pron button. Now let's take a look how the things is working. Right. So here is the output. So you can now get the clear vision of how the output formatting is working. So in our earlier prompt, what we have written three bullet point and each bullet point with max 15 words. But this time, I have written max 50 word, and here is the output. You can see in here, it had less than 15 words, and now it's have maximum 50 words. And you can see the first output was with a single line, and in here, we got the double line. Okay. And in here, it's written no extra explanation, but in here, I've written detailed explanation, and we got a detailed explanation. That's why we got the two lines. And with the two lines also contained within the 50 words. So I hope you got the idea how the output formatting is working. And again, you have to remember that output formatting is very important when you will use the AI for writing purpose, because if you want to go for the print version or for writing some article 0R for news, in that case, you have to focus on the output format. Because it's really important and how you will write on output format, AI will give you the exact direction as you write on output format. Okay. So we come to the end of our lesson, and we have learned about the instruction context, example and output format for prompt Engineering. So one more thing I want to tell you, these four things is the pillar or the key feature for creating the prompt in prompt engineering. So therefore, you have to do some practice, then you will have the idea how these four things is working for prompt engineering. So I hope you enjoy this lesson, and I'm expecting you to have you in our next lesson till there Take care and goodbye everyone. 4. Zero Shot vs Few Shot : Hello, everyone welcome back once again. And in this lesson, we're going to learn about zero shot versus fuhot in prompt Engineering. At first, you need to know what the difference between zero shot and the few shot. So I prompt engineering, it helps AI model to generate better response by giving clear instruction and example. And therefore, there's two common technique are available in prompt engineering. The first one is zero shot prompt engineering, and the second one is few shot prompt engineering. Okay? So let's take a look at the difference between zero shot and a few shot. So zero shot means giving the AI only instruction without any example, right? So it's very simple. You don't need to put the broad instruction I'm zero shot in zero shot, you just have to give a very simple instruction without any example. And do you know when to use zero short? And it's basically using when the task is very simple and clear and you want a quick response, and the AI will understand the topic as well, and you don't need to put the strict output style and others, right? So let's take a look the practical example of zero shot. So for practical example, I'm using ChatGPT and for understanding the hero shot, I'm going to write here that, How are you today? And then I'm writing translate this in French. Okay, then I'm hitting the intro button. So you can see here is the simple output, right? I have written a very simple comment but how are you today translated in French language, and here the output is. And here is the output. So this is a very simple way. And if you are going to look for another example, it will help you for better understanding. Therefore, I'm going to write another prompt that write a short motivational quote about success. Write it short, motivational. Code about success. Okay. And I'm hitting the intro button. And you can see here is a simple output because we didn't provide any broad instruction. That's called the zero shot, and here is a simple output. And if you compare in between advantage and limitation for zero shot, that is, it's have a couple of advantage, it's very fast and simple save token and cost if you are using the paid version, and it's good for common task, but it do have some limitation like less consistence formatting and it can misunderstand complex task and output quality may vary. So this is the limitation, and this is about the advantage. So I hope you got to understand about the zero shot. Now, let's focus about the few shot. So fushot means it's giving the AI a few example before asking it to perform the task. So when you have to use Fust when you need a specific format and the task is complex, it's have some consistency matters. You want better accuracy and when I need pattern guidance, right? So let's take a look practically about the few shot. So in our resource file, and I have prepared some example for few shot, and therefore, I'm opening the resource file, and you can see here is a prompt is given inside the resource file. So you can see convert sentence into Imoges, right? So here, two example are already given, and you can see, I am happy and here is the Imoge style. And for the second one, I la pizza. And here the emoji how the Imoge will look like. Here the example is given. And now for the third task, so in here in third task, I have just given the sentence, but till yet, the emose is not placed, and I want I want the emosee for the third sentence, right? And that's why I'm going to copy this prompt from the resource notepad and I'm going to paste it in here. I'm going to hit the intro button or clicking the send prompting. And you can see, I got my expected emosi. So you can see here, I have given the example. What will be the output style? I have already given the example, and chat DPT is the same way as I told to chat TPT. And here is our output for the feeling sleepy and I am sleepy, and this is our emosie, right? So now let's focus on another example for feshot. So in here, I have given another prompt example for future and what's written here, classified as sentiment. So what the text is the movie was amazing, and here the sentiment is written as an example, the positive. For the second one, I hated the ending. So sentiment is negative. So for the third task, what will be the sentiment? This is what you have to ask to the judge, but you with the example. So we already given the example and the way or the pattern JAGPT will follow and give you the exact output according to your example. Okay? So the product is okay. So what will be the sentiment? So let's take a look how the things is performing. And therefore, I'm going to copy this text or prompt, and I'm going to paste it on ChatGPT. And now let's take a look the output. So what will be the product? What will be the sentiment for the third one? The product is okay. So the sentiment section was the empty and we were looking for the sentiment, and ChatGPT given us the new flow sentiment. So I hope you got the idea how the few shot and zero shot is basically working. So now let's take a look at the compare between the advantage and disadvantage and about some other steps, and I'm going to show you another image. And with that image, it will be helpful for you for understanding these things. So you can see in my screen, I have opened an image, and I also given these things inside the resource folder. So the difference between zero shot and fus shot, you can see example included in zero shot, there is no example, but in few shot there is example is given, therefore, the answer is yes in few shot. So speed, you can see in zero shot, you will get the faster result, and in few shot, you will have the slower speed or slower result. In accuracy, zero shot is moderate and accuracy in fusiot is higher because you already given the proper instruction with the examples. And the zero shot is based for simple task and the few shot is based for complex and pattern task. And if you compare the token uses, in that case, zero shot have low token uses, and few shot have higher token uses. And if you take a look, there are quick rules of thumb, use zero shot when the task is straightforward, and use few shot when you need structured, accurate or consistent output, right? So I hope you got the idea how the zero shot and the few shot is actually working. So I hope you enjoyed this lesson, and I'm going to jump to our next lesson until there Take care and goodbye everyone. 5. Chain of Thought Prompting: Hello, everyone. Welcome back once again. And in this lesson, we're going to learn about chain of thought I called in Prompt Engineering, COT. And this stands for chain of thought. So at first, you need to know what the chain of thought or COT is in prompt engineering. So COT prompting is Prompt Engineering technique where the AI is encouraged to rezone step by step before giving the final answer. So basically, this COT is widely using for mathematical purpose, and instead of jumping directly to the output, the model explain the intermediate thinking process, right? So the chain of thought prompting guide EI for breakdown the problem, analyze each word, reason logically and produce a final answer. And it's basically helpful for math problem, logical rezoning, multi step analyzing, decision making task and complex coding problem. So here is the explanation, and now we're going to take a look practically about the chain of thought or COT prompting with chattib. So you can see in my screen that I have opened the ChatGPT, and here I'm going to write a basic structure or a standard prompts, and later on, we will type about the chain of thought prompt. So I'm writing the standard prompt or the basic structure. That is what is 25 by 12, right? I'm just written for the mathematical purpose, and I'm hitting the entry button. And you can see here is the answer. So it's only given 300. So I was multiplying 12 with 25, and this is what we just got the basic answer. Now, let's consider about the difference between the standard primer basic structure with the chain of thought prom. So in here for applying that chain of thought prompt, I'm writing what is 25 multiplying with 12, I'm putting the question mark, and in second paragraph, I'm writing, think step by step. Okay. So what I have written, what is 25 multiply with 12. And here I put the question mark. And then in second line, I have written things step by step. So if you were unfamiliar with how you will put the second line, in that case, you have to press Shift and Enter button for getting in second line. And now I'm going to I'm going to click the send prompt, or you're going to hit the intro button. And now you will get the difference between the standard prompt and the chain of thought prompt. So in here, we got direct answer with the standard prompt. And with chain of thought prompt, what we got to calculate 25 by 12, break 12 into ten plus two, and here is the output. You can see. At first, it's multiply with 25 by ten, and here is the result 250. And then 25 by two is equal to 50. Now add them to 50 plus 50 equal to 300. So 25 by 12 is equal to 300. So ultimately, here, the output comes how these things is working with the thinking steps. So we got every steps how the AI was thinking for getting the 300, right? So this is the difference between standard prompt and chain of thought prompt. Okay. Now I'm going to show you another two example for COT prompting with two different style like the math rezoning and logical rezoning. And that's why I have given some prompt inside the resource folder, and with that prompt, it will help you for understanding in better ways. So let's open the resource folder, and here is the resource folder. And I have given two prompt. First one is math rezoning, and second one is logical reasoning. And these are basically using for COT. So you can see, I have written a prompt that a shop sold 15 book on Monday and 27 book on Tuesday. Each book cost $1. How much money did the shop earn in total? Think step by step. So this is about the meth rezoning, and this is the prompt and let's take a look how the output works, right? So I'm going to copy this prompt from the resource note pad, and I'm going to paste it on ChatGPT, and I'm clicking the send prompt button. And you can see, we have written here things step by step. And here, all the output is given with step by step. So you can see in Monday, it sold 15 book in Tuesday, it sold 27 books. So total books sold 15 plus 27 is equal to 42. So each book cost $8, so multiply 42 with eight is equal to $336. So the shop earned in $336 in total. Right? So this is the simple COT for math reasoning. And now let's focus about the logical reasoning. And that's why I have given another prompt in here and it's basically help you for understanding the logical reasoning. And in here, what we have written, John is taller than Mike. Mike is taller than Sam. So who is the tallest? Explain step by step. So I'm going to copy this prompt, and I'm going to paste it in here and I'm hitting the entro button. So you can see at end we have written explain step by step. So it's given the explanation. Like, let's compare the step by step. John is taller than Mike, and you can see here, John is taller than Mike. Mike is taller than Sam. So here is Mike is taller than Sam. So the order from tallest to shortest is John than Mike than Sam. So therefore, John is the tallest. So this is how COT is widely using for math reasoning and logical reasoning. So you got the two idea how this math reasoning is working and here how the logical reasoning is working, right? So this is the explanation for using COT in prompt engineering. 6. Tree of Thoughts Prompting: Hello, everyone. Welcome back on second. And in this lesson, we're going to learn about tree of thoughts or TOT in prompt Engineering. In our last lesson, we learned about COT that was the chain of thought, but this time, we're going to learn about tree of thought, that's TOT. So ultimately, COT and TOT have some lots of difference, and it's also important for learning TOT for prompt engineering. So tree of thoughts or TOT prompt is an advanced prompt engineering technique where the AI explore multiple rezoning path instead of following just one linear chain of thought. Rather than thinking step by step in a single direction, the model generates multiple possible ideas or solutions, evaluates each path, choose the best option, and continue rezoning from the strongest path. And it works like a decision tree for rezoning. So you can see in my screen, I opened an image, and here it's written. What is the tree of thought or TOT prompting? So basically, the traditional chain thought is following this direction. You can see start step one, step two, and the final answer. This is the basic or standard procedure for basic prompting for chain. But when you will compare the TOT or t of thought, it's expand the reasoning into branches. So you can see here is the structure. At first, it's a start and it will generate three or multiple ideas for TOT, right? So you can see, after starting it generate idea, A idea, B, and idea, C. After that, AI will evolve with Idea A, idea B and idea C. And after evaluating every idea, then it will give you the best reasoning path. So ultimately, after exploring lots of alternatives, it will give you the final and the best reasoning path. And this is how the tree of thought is working. So it's allow AI to explore alternatives, as I was saying. It will help you for back track if needed, compare strategies, and it will help you solve the harder problem. So now let's take a look the practical example of TOT. So for practical learning about the TOT, I have prepared some prompt for understanding the Tote. So you already know how the general and standard prom is working, but you need to see the difference between the general prompt and the Tot. So you've already seen the general prompt, how these things is working. And now I'm going to show you how the TOT is working. And therefore, I have given the Prompt in our resource file, and you can see, I have created two strategies. Okay? The first one is business strategy, and this is the TOT prompting and another one is puzzle solving, and here is the prompt. So let's focus the business strategy first. So I have written a small coffee shop, want to increase profit, explore multiple strategies step by step, evaluate each one, then choose the best approach. So few moments ago, I have shown you a image where the ideas was showing that idea one idea two and idea three. After compiling all the idea, it's given the main structure, and that was the tree. And this is what actually we have written inside the prompt. So what I have written a small coffee shop, want to increase profit, explore multiple strategies step by step. So in here, not a single strategy will be identified by AI, it will explore multiple strategies, and then AI will evoluate each one. Then from multiple strategies, it will give you the best approach, right? So let's copy this prompt from here and I'm going to paste it in ChatGPT, and then I am clicking the SendPmpt button. And now you can see it's given the better result. Okay? So as we have mentioned, I explore multiple strategies, and therefore, here is the strategy one, strategy two, strategy three, four, five. Okay? So the output is described in multiple ways. At first, in step one, it's identify the possible strategies. In step two, evaluate each strategies, and in step three, it's compare all the strategies, and in step four, it's given the final and the best approach. And in step five, it's given the action plan. Right. So I hope you got the idea how these things is working. You can see we have given a very short prompt, but we got a detailed output. So this is the magic of TOT. Okay? So let's focus or let's describe the steps according to our prompt. So at first, we have written here that the multiple strategies for step by step. So in here at strategy one, it's written increased prices for making the coffee shop profitable. And you can see it's given some example that coffee fries from $4 to $450. Then in strategy two, it's described increase customer traffic. And therefore, it's given some station about the social media marketing, loyalty card discount and local partnership. In Strategy three, it's mentioned that reduce costs, lower operating expenses such as ingredient waste, electricity uses, and overstaffing. In strategy four, it's mentioning sell a higher profit item like pastries, speciality drinks, and combo meals. In Strategy five, it's suggest about the improved customer experience for faster surveys, better setting, free Wi Fi, and friendly atmosphere. So multiple strategy is described elaborately here. Then let's focus about the evaluator strategies. So it's given five strategies. Now, it's time for evaluates strategies. Then it's evaluating increase prices. It's already given the advantage and the risk. And in here, it's written for increased prices, immediate profit increase, easy to implement, but it have some risk like customer may stop buying, competitor may seen cheaper. And evaluation is good for short term gain, but risky if price rise too much. So it's given an evaluation for strategy one. And for strategy two, you can see the advantage it's mentioned about the increased customer traffic and it have some advantage as a risk. So in advantage, it says more sales volume, build long term growth, expand, brand awareness, and it's mentioned about the risk that marketing cost money, result when take time. And in evaluation, it's fine make the evoluation that's very powerful if marketing is effective. Then for the third strategy, it's mentioned about the reduced cost, and in advantage, it's mentioned improved profit without rising prices, efficient operation, help sustainability, and it's mentioned about some rigs that cutting too much can reduce quality. Stuff moral may suffer and in evaluation useful, but saving may be limited. For number four, here is ten sale higher profit item. Advantage increase average order value. Customers often buy add ons impulsively, but it's do have some risk as well, and here is the risk that the required Smart may not design, some item may not sell as well. And in evaluation, strong strategy with relatively lower risk. And the final or the fifth Evaluation is improved customer experience and advantage, it's mentioned that encourage repeat customers, create positive reviews and word of mouth and is further risk may require investment and improvement take time. Evaluation is excellent long term strategy. Now it's compare all the three studies. You can see here is the compare part here is the evaluate part, and here is the strategies part. So we have mentioned these three things very clearly inside our prompt. Explore multiple strategies. Here is the multiple strategies. Evaluate each one. Then you can see here is the evolution part. This is the evolution part, and in final, then choose the best approach. Now, from here, we're going to compare the strategy, and after compare, we will get the best approach. So you can see the compare of strategy is given. And here, the profit potential risk level, speed and long run value is given for increasing price, profit potential is medium, risk level is medium high, speed is fast, and long term value is medium. So for the second one, increased traffic, profit potential is high, risk level is medium, speed, medium, long term value is high. For reducing cost, Profit potential is medium, risk level is low medium, speed is fast, and long term value is medium. And for the fourth one is sell high profit item, profit potential high, risk level low, speed fast, and long term value is high. And for the fifth one, improve experience that the profit potential is high, risk level low, speed, slow medium and long term value is very high. Okay? Now, if you focus on Stage four, choose the best approach. Okay. So ultimately, it's mentioned here the recommended based approach, primary stage, sell higher profit item plus improve customer experience, and it's given why low risk sustainable growth encourage repeat business, increase spending per customers. And after getting the best approach, it's also given the action plan. You can see how the action plan will be executed. It's already mentioned with the phase one, phase two, phase three, and for the final recommendation, it's already given some final recommendation. So what was our main priority from here, we had to choose the best approach, and here is our result. You can see here is choose the best approach. So what is mentioned here, sell higher profit item, okay, and improve customer experience. So after evaluating five strategies. Number four, you can see here is the number four and number five is chosen for the best approach, right? You can see sell higher item and improve customer experience. Here is the number four sell higher item and improve customer experience. So I hope you got the idea now how this TOT is working. So it's very simple. You can see it's very simple in prompt, but you will get a detailed explanation with proper elaboration and proper details. Now I have another example of TOT. Okay? So you can see this prompt was about the business strategy, and now let's focus about some different things that the puzzle solving. So what is written here, you need to cross a river with olf, goat, and cabbage. Explore different possible move and determine the safe solution, right? So for puzzle solving, I'm going to copy this prompt, and then I'm going to paste it on ChatGPT and I'm hitting the entry bottom. So basically hat hibit is giving me two types of response. And in first response, it's focus about the understand the rules, and in second response is about the problem setup. Okay? So you can see they have given two type of result, and from here, you can choose any preference from here. So this type of situation you may face in several times while using the ChatGPT or other platform. But for solving this kind of complication, you have to focus on about your prompt. So what the prompt is actually looking for. So you can see our ultimate result that we are expecting that determine the safe solution. So in response one, it's mentioned about understand the rules. In response two, it's about the problem setup. So we're looking for solving the problem, and therefore, I'm going to use this response to because it's about the problem setup. So if you know the problem set up, then you will have the safe solution. So that's why I'm going to pick this problem setup. Okay? So I'm going to use this. I prefer this response, then it will open on your ChatGPT. So let's scroll a little up. And now let's focus about the answer how ChatGPT is performed according to your prompt. So in here, the problem setup, you must transport a olf, a goat, a cabbage. The rule is the boat can carry only you and one item. If left alone, the wolf eat the goat and the goat eat the cabbage. So the goal is move everything safely across the river. So it also given some stabs for explore the possible first move. So in option A, take the whole first and left side after move goat and cabbage. The problem is the goat can eat the cabbage. In option B, take the cabbage first, lip side after move, wolf and goat. The problem is the wolf eat the goat. Okay? So option C, take the goat first. Lip side after move, wolf and cabbage. This is safe because wolf do not eat cabbage, cabbage do not harm lbs, right? So it's already given some multiple strategies in here in step one, and now in step two, continue form the safe step so in right side, who remains goat and in left side, who remains olf and cabbage. Now, return Alan from the right to left. Then in step three, explore the next move. Okay? So you have to choose between taking the wolf and taking the cabbage. Now, try taking the wolf. In right side, take you can see here the take olf across in right side olf and goat. The problem is wolf will eat the goat unless we bring the goat back. So leave wolf and bring the goat back. Now, in lp side, who remains goat and cabbage and in right side, who remain Wolf. Okay. So ultimately, these things is safe, but now it's time for take the cabbage across. In Stay four, it's given, take the cabbage across. So Wolf and cabbage, they remain in right side and left side, who remains good. So ultimately, then you have to return Alon in final move. So in final move, take the good across second. And then from left side, you will have everything on the right side. So in here, it's mentioned Wolf, good and cabbage. Okay. And final answer is success. So in here, in summary, they have the complete solution. So you can see how the things will be performed. Here, the solution is given step by step. So take the good across, return alone, take Wolf across, bring good back, take cabbage across, return Alon and then take good across. Why this work? Never leave Wolf alone with goat because Wolf will eat the goat, never leave goat alone with cabbage goat will eat the cabbage. So you can see how these things is working for puzzle solving. So this TOT is really working magically for solving puzzle and for business purpose, right? So now let's take a look on advantage and limitation of TOT. So for advantage, it's have better problem solving, explore alternatives, handle uncertainty as well, and improve creativity, reduce reasoning darance. And it's do have some limitation like slower response, higher token uses, more complex prompting can generate too many branches. So while using these things, you have to consider about the advantage and limitation, and after comparing the advantage and limitation, then you can use these things properly. So I hope you got the idea how this TOT is working widely in prompt engineering. 7. Role Prompting: Hello, everyone. Welcome back on second. In this lesson, we're going to learn about role prompting in prompt engineering. Role Prompting is a prompt engineering technique when you assign the AI for a specific role, persona, profession, or expertise level before giving the task. Instead of asking directly till the AI, who should it act as? This role prompting this model is basically helping respond in a specialized style using main domain specific knowledge, using match tones for expertise and produce more focused answer. There are basically bunch of rules are available if you consider the professional role, then the AI can act as a doctor or as a lawyer, as a teacher, engineer, accountant, designer. And if you consider about the creative roles, in that case, the AI can act as a story writer, poet, game designer, screenwriter. And if you are focusing about the communication roles, in that case, that AI can focus or AI can act as a role of motivational coach, interviewer, debate planner, custom support agent, right? So this is how the role prompting is working. Now, I'm going to show you an image. So here is the image and you can see what the role prompting is, and here is the examples given. Act as a cybersecurity expert. Explain how pihing attack works. So what the role is defined here, that's the cybersecurity expert. This is the role, right? And here's the region. Now, AI answer from the perspective of cybersecurity professional. And you can see why rule prompting work, large language model are trained on many writing style and professional domain. A assigning rule helps the AI about activate the relevant knowledge pattern, adjust vocabulary and tone, follow professional reasoning style, and produce context hour response. So I want to, I want to mention one things that the role prompting have some advantages and limitation. So let's focus about the advantages. That it's more realistic responses, better domain expert, improve tone consistency, more tailored. Outputs and stronger contextual reasoning. And if you focus about the limitations how poorly defined role can confuse the model. Overly complex personas may reduce clarity. AI can still produce incorrect expert advice. So you have to keep in mind that the role prompting have some advantage and some limitation as well. So now let's focus about the practical implementation of role prompting with Chachi Bit. So for implementing practical prompt for roll prompting, we have to open our notepad from the resource file, and I have prepared some prompts for understanding the role prompting. So I'm going to open the notepad from the resource file. And you can see, I have mentioned here the interviewer role and I've given a prompt that's mentioned here act as a technical interviewer for a software engineer company. Ask me five Java script interview question from beginner to advance. So what will be the role? The role will be technical interviewer. So as this prompt is for interviewer, and we have mentioned the technical interviewer for a software engineering company. So in here, we have mentioned what the role will be. So role will be technical interviewer, and what will be his task for taking interview and I'm looking for five JavaScript interview question. Okay? So I'm going to copy this prompt, and I'm pasting to ChatGPT, and I'm hitting entro button for the result. Okay? So you can see the ChatGPT is giving the response, and here the response, great, I will act as a technical interviewer. So we were looking ChatGPT to act as interview and now ChatGPT is acting as a technical interviewer. And we have asked for five JavaScript interview question from beginner platfors. So you can see beginner, intermediate functions, and this is what we were looking for. Here is the beginner option, beginner to intermediate options, and here is the advanced options. Okay? So here is the question. So you can see what the difference between Var let and const in JavaScript. So we were looking for the five Javascript question. Here is the question. And the first one is for the beginner. Second one is for the beginner and intermediate, and it's about the function. So it's written what the difference between regular function and arrow function. Then in third, it's mentioned about the intermediate type for a sync Java script. Explain the difference between callback promise and a sync or a weight. And for the advanced level, what is the closure in JavaScript? Or can you explain the output of this code? So here the code is given. So as an interviewer, what exactly we were looking, this is what we got. So you can see we only given two line of prompt, but we got a detailed big output according to our prompt. So this is how the Role Prompting is working. So in here, we mentioned about technical interviewer, and now ChatGPT is working as a technical interviewer. Now let's focus on another example. And this time, ChatGPT will act as a marketing expert. So in marketing expert, we have mentioned in Prompt that act as a digital marketing strategist, write a Facebook ad for a coffee shop targeting students. Okay, so I'm going to copy this prompt and I'm pasting to ChatGPT, and I'm hitting tro button from my keyboard, and here is the output. So we were looking for ad through the ChatGPT and the ad will be for coffee shop and our targeted audience is student. You can see it's given a very easy copy to use result. So you can see we got the copy option from here. So if you use this copy option, then you can just paste it in anywhere. So you can see study H Zips murder. Need a perfect study spot, grab your favorite coffee, free Wi Fi, and couse vibe at Brew corner Cafe. ChatGPT already given a coffee shop name as well, but if you want to modify the the content of the output in that case, you have to mention these things. As an example, the ChatGPT given Brew Corner cafe. This is the name of the cafe. But instead of this name, if you want to change these things or if you have any precise name of the company or name of the store, in that case, you have to mention inside the prompt. Okay? So how the result is started providing here, here is a student focus, Facebook ad designed to attract attention, create urgency and increase walk ins. So now, ChatGPT is acting as a digital marketing strategies, and we were looking for Facebook ads for coffee shop, and this is the output. Okay? So I hope you got the idea how the role prompting is working. So you can use multiple roles, as I said earlier, how many type of roles are available. So you just have to make the prompt, how the ChatGPT will act and which role will be performed. This is what you have to describe on your prompt. Okay, so I hope you got the idea about the prompt engineering. And now I will request you to do some practice. Like I'm going to request you to act as a doctor and give and you need to get the output for first aid treatment for minor injury. So create the prompt. According to act as a doctor and give me the output for the result of minor injury. And this is you can consider as your homework. Okay. So I hope you enjoyed this lesson, and I'm going to expect you to have you in our next lesson till there. Take care, and goodbye, everyone. 8. Prompt Chaining : Hello, everyone. We'll come back on second and in this lesson, we're going to learn about prompt chaining in prompt engineering. At first, you need to know what the prompt chaining is. Prompt chaining in prompt engineering technique where a large or complex task is broken into smaller sequential prompt. So instead of asking the AI to do everything at once, you divide the work into steps where each prompt solve one word of the problem and the output of one step becomes the input for the next step. And this creates a workflow of prompts. Okay? So I'm going to show you an image. This will help you to understand how the prompt engineering is basically work. So you can see in my screen an image appeared, and here, it's clearly explained what is prompt changing? And this is some general type of prompt. So you can see, rather than using one giant prompt, write a business plan, marketing strategy, financial analysis, and a social media campaign for a coffee shop. Instead of this we're going to split the entire task into smaller tasks, right? So in this general prompt, we have written right a business plan, marketing strategy, financial analysis, and social media campaign for a coffee shop. This is a general prompt, but we divide these things into multiple smaller tasks, like we divide the entered things in five steps. So in step one, generate the business idea. Step two, create targeted audience. Step three, build marketing strategy. Step four, estimate finances and Step five, create social media campaign. So this is the prom chaining. Okay? So this is the general, and this is the prom chaining. And each step improve focus and quality. So now let me tell you one thing that is the session limit and about the quality and about the hallucination of AI. When you will give this type of general prompt to the AI, then it will not be able to ensure about the quality because in a single prompt you insured lots of things like business plan, marketing strategy, financial analysis, social media campaign. So a number of things will be generated in a single prompt. Therefore, the quality will not be insured. And one more thing is that if you're using the free version, in that case, you will have some issue about the token or you will have some issue about the limits of uses. And if you want to generate elaborate explanation step by step for each of single strategies like the business plan, marketing strategies, financial analysis, and social media campaign, then if you divide these things in a five different step, then you will have the. You will have the quality, and you will not face issue with the limitation of uses or token issue. Therefore, this prompt chaining is very helpful for generating quality content as well as the detailed explanation, right? Now, time for focus about the practical implementation of prompt chaining. Okay. So for understanding the prompt chaining, I have prepared some prompt for the prompt chaining, and therefore, we have to open our note pad on the resource file, and here is the notepad. And I have separate the entire task in different steps. So you can see a example one, this is the example one. I have mentioned here that blog writing workflow. So I'm going to write a blog, and I have splitted the entire task in three different steps instead of one. In step one, I have mentioned about the generate topic ideas and the prompt is generate five blog post idea about artificial intelligence for beginner. In step two, I mentioned about the create outline. And here I have mentioned in prompt that create a detailed outline for how chatbot work. And in Step three, I have mentioned the write the full article, and in prompt, I have written write a beginner friendly article using this outline. Okay, so we're not going to hit the hit this entire prompt atoms. We will do splitly. So therefore, we will execute this prompt step by step. So let's focus on step one. In step one, I'm going to copy just prompt only. And I have mentioned a generate five blog post idea about artificial intelligence for beginner. So this is the prompt, and instead of these entire things, I made the splitly and therefore, I'm going to copy this prompted only. So this is our first step, and I'm hitting the entro button. Okay, so here is the result, okay? So first step execution is done. Now focus about the Step two. In step two, what it's mentioned, create outline. And here is a prompt, and I'm going to copy these things. Create a detailed outline for how chatbot work. And I'm follow the chaining. Here is the first step one output. And in chaining, here is the prop for second step and I'm hit the enter button. And one more thing I want to ensure you result, this result is associated with the first result because this is the step one output, and this is the second step two or second output. Okay? So I was looking for a detailed outline, and you can see here is the outline. Detailed outline is given. And now time for final or third step. And in here words written, write a beginner friendly article using this outline. Okay, so I'm going to copy these things, and I got the outline here, and now I'm going to paste the third output, and now I'm hitting the inter bottom. And you can see it started and it will give you a big detailed explanation article because this article will be generated from this outline. And this outline, you can see the second step outline is quite large. And the final article will be generated from the second step. So this is the first step and from the first step, we have generated the second step, and from the second step we are now generating in third step. So ultimately, every step, we have spit it out, and now we're generating the result and you can see here is the final output. Here's the conclusion. And let's take a look from the beginning. Okay, so this was our third step, and you can see, we have written that write a beginner friendly article using this outline. So according to outline, now we have a beginner friendly article, and you can see how big the article is. You can see lots of information, lots of text is written. By chat TIBt and it's also provided the conclusion. So this is how you will work prompt chaining, and the prompt chaining is basically using for splitting one task in multiple steps. So this is the very simple process for prompt chaining. 9. Evaluation & Iteration : Hello, everyone. Welcome back once again. In this lesson, we're going to learn about evolution and iteration in prompt engineering. At first, you need to know what the evolation and the I generation is. Ultimately, it's the process of testing, comparing and refining prompt to improve AI output quality. So ultimately, a good prompts are rarely perfect on the first trip. Prompt Engineering continuously test prompts, analyze output and identify weakness, as well as refined prompt with repeat the processes. So this is reliable AI system are built. And when you will try to get the better output, in that case, in a single prompt may it not be possible to get the better output with a single try. Therefore, trying the multiple ways are the best process, and this are the evolution and iteration is the process, right? So let's focus the evolution part of the prompt engineering. So evolution means measuring how well a prompt is performed. So you can check whether the AI output is accurate, clear, consistent, helpful, safe, properly formatted, and it's totally structured. So this is the evolution part. And if you focus about the iteration, in that case, iteration means improving the prompt step by step. So you modify the instruction, examples, roles, constraints, output format, and reasoning guidance, then you are going to test again and again. So this is how the prompt evolution and iteration is basically working. So now we're going to learn practically how the prompt evolution is basically working with iteration. Therefore, I'm going to I'm going to open the notepad from our resource file, and this time, I'm not going to use ChatGPT. This time, I'm going to explain to you how these things is basically working. Okay, so you can see, I have created a scenario inside our notepad. So you can see in scenario, I want that AI to write a professional email. This is our scenario. Therefore, in step one, I have written write an email to a customer about delay order. So this was the prompt. And the AI have given me the output. This is just the output. So what the output was, Hi, your order is delayed. Sorry for the inconvenience. So this was the output, and this was my prompt. So according to prompt, I got a very weak output. So you can see the problem is not described. It's too short. It's don't have the professional enough, no explanation, and no helpful next step. Therefore, we have to improve prompt, and therefore in step two, what we have written, we have changed the prompt because we have modified. And for improving the prompt, I have changed the prompt style, and therefore, here we have written, write a professional and polite email to a customer whose order has been delayed by three days, include an apolosyRason for the delay, reassurance, estimated delivery date, friendly tone, and here is the output. And you can see this time, we have the better output. So previously, we don't have any subject, but this time we got a subject and how it started. Dear customer, we apologize for the delay in your order delivery. Due to unexpected shipping issue, your package will arrive approximately three days later than expected. We understand the inconvenience this may cause and appreciate your patience. Your new estimated delivery date is May 28, thanks for your understanding and support. Best rigored customer support team. Okay. So ultimately, now we got the better result. Looks good, right? Now, in step three, now evaluate the result. So what improves? After modifying the prompt, we got the better improvement, and here is what the improvement we found more professional, clear explanation, better tone, and helpful information included. Now, let's focus what could still improve. Add personalization, include discount coupon, make tone warmer. So previously we got better output according to compare with the first step one. And now we want to make it more better than what we received in step two. Therefore, for more improve, we're going to add personalization, include discount coupon and make the toner warmer. So for the final output or for the final prompt, what we have mentioned that write a warm and professional customer service email to Sara about a delay order. The order is delayed by three days because of bad weather include sincere apolosy reassurance, updated, delivery date, 10% discount coupon, empathic and friendly tune, keep it under 150 words. And now this time, we're going to copy this prompt and we will apply on ChatGPT. Okay? I'm going to copy these things, and I'm pasting here, and I'm hitting the entro button. Now you will have the much better output than before. Now you can see what we got, here is the update result. And this time, we mention the name of the clients. And what we have mentioned here, Dear Sarah, I sincerely apologize for the delay of your order due to severe weather condition. Shipping has been impacted and your package is now expected to arrive within the next three days. We understand how frustrating delays can be, and we truly appreciate your patience and understanding. Please rest assured that your order is on its way, and we're closely monitoring the shipment to ensure it to reach as quickly as possible. As a small token of appreciation, we would like to offer you a 10% discount coupon for your next purchase. Thank you, ten. This is the coupon code. Thank you again for your kindness and support. If you have any question, please feel free to reach out Worm Rigors customer support. So now you can feel the difference between first output, second output, and the third output. So the third output is much better than before. So let's focus for checking or repeating how the output was. So this is our first output. You can see AI output week. I first step, we just had higher order delays. Sorry for the inconvenience, a single line. And in second output, we got much better than before. Here is the output. But if you consider with the third output what we have got through the ChatGPT here, this is absolute a fine tuning output from the ChatGPT. So this is how evaluation and iteration is performing in prompt engineering. 10. Class Project - Identify Role Prompt: Hello, everyone. It's time for class project, and you can consider the class project as a homework. So what you have learned is time for apply in class project. So you can see in my screen, I have opened dog file and I have given this dog file inside the resource folder, so you have to download the resource folder and you will have this dog file inside the resource folder and I have given every instruction that's for class project. Let's focus on class project. That's the name of the class project is identify role in prompt. We learned about the role prompting and in this class project, you have to, you have to identify the role of role from the prompt and you can take a look in description. It's written here. This project helps student understand the concept of role prompting, identity, the role. In prompt engineering, student will learn how assigning a specific ruler identity to an AI model influence the quality, tone, expertise, and style of the generated response. By analyzing the provided prom, students will identify the role assigned to the AI and understand why that role helps produce more professional and targeted content. This exercise demonstrates how rule based prompts can improve the effectiveness of AI generated output. So this was the description of the class project. Now, the main part. That's what you have to do. So you have to perform three P. Okay. At first, in step one, you have to open the ChatGPT. So let's follow the same process. Okay, you can see in my screen, I have opened the ChatGPT, and then in step two, you have to write the prompt, and I have given the prompt already. So you can do the copy as well, or you can write it manually, but I'm suggesting you to copy this prompt from here, and now you have to paste it. Okay? You have to paste it on ChatGPT and you have to hit the send prompt button. Then it will give you the article. Okay. Now, in here in step three, what's written here, identify roll from the prom. So this is the prompt, and after applying this prompt in ChatGPT, we got a nice article. You can see here is the article. And now the main task is identify the role. So we have to identify role from the prompt. So this is the output, but our main task is identifying role from the prompt. So this is our prompt. And in here, we have to find out what the role inside the prompt. So you can see, it's written here. You are an award winning technology journalist with 15 years of experience. Covering artificial intelligence, automation and digital transformation. Write a professional engaging and informative article for business leaders and the entrepreneurs about the artificial intelligence is transforming modern business. Use clear example, practical insights and forward looking perspective. So you know what the main use of prompt engineering. In the last lesson, we learned about the role prompting and you know what the role prompting is. So if you consider the prompt from here, it's all about their role. So what is the role in here? It's it's here. You are an award winning technology journalist. So this is the role inside the prompt, because you know how the role is performing, we have learned already in our last lesson. So in here, technology journalist is the role. So instead of technology journalist, if it's written here, like you are an award winning photographer. Then what could be the role? That's a photographer. So this is how you will identify their role. Okay, now your main task is you have to write a prompt. You can see I have written a prompt in here. You can take the idea from here. Now your main task is you have to write a prompt and after writing the prompt, you have to mention what the role from the prompt. This is your task. Okay? And after writing the prompt, now it's time for where you will submit. Okay? So you can see we have written here where student will submit class project. You can submit your class project inside the project section of class and you can also post on discussion of class. Okay, so now your main task that you have to write a prompt. Then from the prompt, you have to identify what the rule is. Okay, so this is very simple task. So if you need how you will submit the prompt, in that case, I can help you out that here is the prompt I'm copying here, and I am writing in here that this prompt, and you can write in this way, prompt. And in second line, you can write like this Role identyFide. In here, the role is technology journalist. I'm writing technology. Journals. This is the format, how you will submit your class project. I will not suggest you to use the same prompt. I will suggest you to make your own prompt and from there, you have to identify the role. So this is your class project and you can consider these things as your homework. I'm expecting you to you will participate in this class project and I am eagerly waiting to have a look how you are writing your prompt and how you were identifying the role from the prompt.