ChatGPT Prompt Engineering, Role Prompts, and Chain Prompting


ChatGPT Prompt Engineering, Role Prompts, and Chain Prompting
ChatGPT Prompt Engineering, Role Prompts, and Chain Prompting

In this course, you will see prompt engineering in action. We explain what prompt engineering is, give you some common rules that help obtain results from ChatGPT, and cover the concept of giving ChatGPT an identity.

Learning Objectives

  • Understand the concept of prompt engineering
  • Learn what role prompts are
  • Learn how to use previous prompt results for refinement through chain prompting

Intended Audience

  • This course is intended for anyone who wants to learn about ChatGPT


  • This course requires no prior knowledge 

ChatGPT Prompt Engineering, Role Prompts, and Chain Prompting. And I am Farish Kashefinejad, Software Development Domain Lead at Cloud Academy. And let's take a dive into prompt engineering and what does it mean?

Prompt engineering is a relatively new term, but it is frequently used in the context of ChatGPT. To demonstrate what prompt engineering is, I will begin by asking ChatGPT a question. And the question I will ask is, can you tell me about AWS services? After speeding up the answer, there is a lot of information on the screen, in fact, too much information. I'm going to ask ChatGPT to shorten it. Using a 200-word summary, can you tell me about AWS services. And here's the completion, much shorter than before. Around 250 words actually, but there's still too much information here.

So, I'm going to shorten this again. Using a 100-word summary, can you tell me about AWS services. And this completion is around 105 words, much better than before, and this description given really works for the information I was looking for. So, what is prompt engineering? Prompt engineering is the process of refining a given prompt to obtain the best possible answer that fits your scenario. Now, there are some general roles for prompt engineering, but they are opinionated ones. They are based on the personal experiences from many others sharing the information that they've discovered. The first role, when possible be specific with your prompt. I had asked ChatGPT, can you tell me about AWS services. Now, AWS services is a very broad topic, but in this case, it was the main focus of this prompt. Now, if my goal was to get more information on AWS DynamoDB, then I should specify my prompt for it. The next rule is to force ChatGPT when needed to be more concise.

The first time I asked ChatGPT to tell me about AWS services, the response was long, too long for my needs. Realizing that, I asked ChatGPT to provide a 200-word summary. That is the example of trying to force ChatGPT to be more concise when giving an answer. And when I felt the summary was still a little too long to my liking, I asked the AI again for a shorter, more concise 100-word summary. And this time the completion, the response from ChatGPT was acceptable. And this is that part of prompt engineering, where it's a process of refinement, continuously pushing to find the best possible answer. The last role that I will discuss is giving ChatGPT an identity, also known as role prompting. To demonstrate this, I will begin by asking ChatGPT another question. As a copywriter creates some attention-grabbing tag lines for AWS services, and here is a list of attention-grabbing tag lines. So, what is role prompting? Role prompting is asking for the AI to assume a given role, also referred to as an identity, before performing a given task. In this case, act as a copywriter. And with this I'm also going to demonstrate this concept of chain prompting, which is asking a new prompt that relies on the answer given in the previous prompt.

In this case, I'm going to ask ChatGPT, can you make some of these taglines humorous. And I will speed up through this completion, and some of these taglines are humorous. Now, I'm going to put this all together for a final demonstration. I will ask ChatGPT, as an SEO expert, can you give me some keywords on AWS services? And it has generated a list of 20 keywords, but it would be nice if I had descriptions explaining each keyword. And I also want this formatted in a way that is easier to read. So, I'm going to ask, can you put these keywords in a table with some descriptions? And after speeding this up, here is a list of keywords in a table with their corresponding descriptions. Now, there is a problem with this ChatGPT response. If you look at the very last description, it isn't completed. Even though my prompt was very short, I wasn't concise enough. As a result, ChatGPT ran out of tokens, and what I need to do is shorten this. So, I will ask, can you do this again, but only with the top five keywords and shorter descriptions? And here is a smaller table, really well formatted with concise, short descriptions. 

And that's it, thanks for watching at Cloud Academy.


About the Author
Learning Paths

Farish has worked in the EdTech industry for over six years. He is passionate about teaching valuable coding skills to help individuals and enterprises succeed.

Previously, Farish worked at 2U Inc in two concurrent roles. Farish worked as an adjunct instructor for 2U’s full-stack boot camps at UCLA and UCR. Farish also worked as a curriculum engineer for multiple full-stack boot camp programs. As a curriculum engineer, Farish’s role was to create activities, projects, and lesson plans taught in the boot camps used by over 50 University partners. Along with these duties, Farish also created nearly 80 videos for the full-stack blended online program.

Before 2U, Farish worked at Codecademy for over four years, both as a content creator and part of the curriculum experience team.

Farish is an avid powerlifter, sushi lover, and occasional Funko collector.